Skip to content

Commit d31b85d

Browse files
fix ksu support
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 43f5cd7 commit d31b85d

3 files changed

Lines changed: 19 additions & 9 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
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).
88

9-
<sub>Originally known as Fox's Magisk Module Manager (FoxMMM), we thank Fox2Code for the foundational work.</sub>
10-
119
[![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)
1210

1311
## Overview and Purpose
@@ -87,7 +85,11 @@ By using this application, you agree to abide by our [Terms of Service](https://
8785
## Disclaimer
8886

8987

90-
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.
88+
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.
89+
90+
91+
> **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.
92+
9193

9294

93-
> **Copyright © 2023 Androidacy. All rights reserved.**
95+
<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>

app/src/main/kotlin/com/fox2code/mmm/installer/InstallerInitializer.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ class InstallerInitializer {
123123
if (mgskPth != null && !forceCheck) return mgskPth
124124
val output = ArrayList<String>()
125125
if (Shell.isAppGrantedRoot() == null || !Shell.isAppGrantedRoot()!!) {
126-
return null
126+
// if Shell.isAppGrantedRoot() == null loop until it's not null
127+
return if (Shell.isAppGrantedRoot() == null) {
128+
Thread.sleep(100)
129+
tryGetMagiskPath(forceCheck)
130+
} else {
131+
null
132+
}
127133
}
128134
try {
129135
if (!Shell.cmd(
@@ -149,7 +155,9 @@ class InstallerInitializer {
149155
// reset output
150156
output.clear()
151157
// try to use magisk --path. if that fails, check for /data/adb/ksu for kernelsu support
152-
if (Shell.cmd("magisk --path", "su -V").to(output).exec().isSuccess) {
158+
if (Shell.cmd("magisk --path", "su -V").to(output).exec().isSuccess && output[0].isNotEmpty() && !output[0].contains(
159+
"not found"
160+
)) {
153161
mgskPth = output[0]
154162
if (BuildConfig.DEBUG) {
155163
Timber.i("Magisk path 1: %s", mgskPth)
@@ -180,7 +188,7 @@ class InstallerInitializer {
180188
mgskPth = null
181189
}
182190
} else {
183-
Timber.e("Failed to get Magisk path (Got null)")
191+
Timber.e("Failed to get Magisk path (Got null or other)")
184192
}
185193
Companion.mgskVerCode = mgskVerCode
186194
return mgskPth

docs/DEVELOPERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This document serves as a comprehensive guide for developers interested in integ
2121

2222
### MitM and Certificate Pinning
2323

24-
Certificate pinning is supported only from Android 7.0 onwards. Issues related to MitM on unsupported Android versions will not be entertained.
24+
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.
2525

2626
### App Hiding
2727

@@ -33,7 +33,7 @@ The low-quality module filter is implemented at `com.fox2code.mmm.utils.io.PropU
3333

3434
## Custom Repository Format
3535

36-
This section outlines the JSON format for custom repositories. The feature is slated for release in version `0.6.0`.
36+
This section outlines the JSON format for custom repositories.
3737

3838
```json
3939
{

0 commit comments

Comments
 (0)