fix ksu support

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/89/head
androidacy-user 1 year ago
parent 43f5cd7ded
commit d31b85dc10

@ -6,8 +6,6 @@
Explore our diverse range of offerings on our [official website](https://www.androidacy.com/?utm_source=fox-readme&utm_medium=web&utm_campaign=github-readme).
<sub>Originally known as Fox's Magisk Module Manager (FoxMMM), we thank Fox2Code for the foundational work.</sub>
[![Latest Release](https://img.shields.io/github/v/release/Androidacy/AndroidacyModuleManager?color=neon&label=Latest%20release&style=for-the-badge)](https://www.androidacy.com/downloads/?view=FoxMMM&utm_source=fox-readme&utm_medium=web&utm_campaign=github-readme)
## Overview and Purpose
@ -87,7 +85,11 @@ By using this application, you agree to abide by our [Terms of Service](https://
## Disclaimer
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ANDROIDACY CANNOT BE HELD LIABLE FOR ANY DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> **Copyright © 2023 Androidacy. All rights reserved.** Logos, names, and brands are property of Androidacy or our affiliates unless otherwise stated and are protected under US copyright law. See LICENSE for information on source code licensing.
> **Copyright © 2023 Androidacy. All rights reserved.**
<sup><sub>This app was originally known as Fox's Magisk Module Manager (FoxMMM). We thank Fox2Code for the foundational work on this app.</sub></sup>

@ -123,7 +123,13 @@ class InstallerInitializer {
if (mgskPth != null && !forceCheck) return mgskPth
val output = ArrayList<String>()
if (Shell.isAppGrantedRoot() == null || !Shell.isAppGrantedRoot()!!) {
return null
// if Shell.isAppGrantedRoot() == null loop until it's not null
return if (Shell.isAppGrantedRoot() == null) {
Thread.sleep(100)
tryGetMagiskPath(forceCheck)
} else {
null
}
}
try {
if (!Shell.cmd(
@ -149,7 +155,9 @@ class InstallerInitializer {
// reset output
output.clear()
// try to use magisk --path. if that fails, check for /data/adb/ksu for kernelsu support
if (Shell.cmd("magisk --path", "su -V").to(output).exec().isSuccess) {
if (Shell.cmd("magisk --path", "su -V").to(output).exec().isSuccess && output[0].isNotEmpty() && !output[0].contains(
"not found"
)) {
mgskPth = output[0]
if (BuildConfig.DEBUG) {
Timber.i("Magisk path 1: %s", mgskPth)
@ -180,7 +188,7 @@ class InstallerInitializer {
mgskPth = null
}
} else {
Timber.e("Failed to get Magisk path (Got null)")
Timber.e("Failed to get Magisk path (Got null or other)")
}
Companion.mgskVerCode = mgskVerCode
return mgskPth

@ -21,7 +21,7 @@ This document serves as a comprehensive guide for developers interested in integ
### MitM and Certificate Pinning
Certificate pinning is supported only from Android 7.0 onwards. Issues related to MitM on unsupported Android versions will not be entertained.
AMM enforces certificate pinning for certain origins and will not allow connections to be established if the certificate is not valid. This is done to prevent MitM attacks and ensure that the application is communicating with the intended server. This behavior cannot be disabled.
### App Hiding
@ -33,7 +33,7 @@ The low-quality module filter is implemented at `com.fox2code.mmm.utils.io.PropU
## Custom Repository Format
This section outlines the JSON format for custom repositories. The feature is slated for release in version `0.6.0`.
This section outlines the JSON format for custom repositories.
```json
{

Loading…
Cancel
Save