Skip to content

Commit af7f3e6

Browse files
fix install
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 4bb2fbd commit af7f3e6

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

app/src/main/kotlin/com/fox2code/mmm/androidacy/AndroidacyActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class AndroidacyActivity : AppCompatActivity() {
419419
if (url == null) return false
420420
for (prefix in arrayOf(
421421
"https://production-api.androidacy.com/magisk/file/",
422-
"https://staging-api.androidacy.com/magisk/file/"
422+
"https://production-api.androidacy.com/downloads/"
423423
)) { // Make both staging and non staging act the same
424424
if (url.startsWith(prefix)) {
425425
return true
@@ -513,4 +513,4 @@ class AndroidacyActivity : AppCompatActivity() {
513513
}
514514
}
515515
}
516-
}
516+
}

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,13 @@ class InstallerActivity : AppCompatActivity() {
338338
)
339339
val installerMonitor: InstallerMonitor
340340
val installJob: Shell.Job
341+
val mgskPath = InstallerInitializer.peekMagiskPath()
342+
val ashExec = if (!InstallerInitializer.isKsu) {
343+
"$mgskPath/magisk/busybox ash"
344+
} else {
345+
"$mgskPath/ksu/busybox ash"
346+
}
347+
341348
if (rootless) { // rootless is only used for debugging
342349
val installScript = extractInstallScript("module_installer_test.sh")
343350
if (installScript == null) {
@@ -365,7 +372,7 @@ class InstallerActivity : AppCompatActivity() {
365372
}
366373
installerMonitor = InstallerMonitor(installScript)
367374
installJob = Shell.cmd(
368-
"export ASH_STANDALONE=1 exec /data/adb/magisk/busybox ash",
375+
"export ASH_STANDALONE=1 exec " + ashExec,
369376
"export MMM_EXT_SUPPORT=1",
370377
"export MMM_USER_LANGUAGE=" + this.resources.configuration.locales[0].toLanguageTag(),
371378
"export MMM_APP_VERSION=" + BuildConfig.VERSION_NAME,
@@ -382,12 +389,10 @@ class InstallerActivity : AppCompatActivity() {
382389
var magiskModule = false
383390
var installZipMagiskModule = false
384391
var mmtReborn = false
385-
val mgskPath = InstallerInitializer.peekMagiskPath()
386392
if (mgskPath == null) {
387393
setInstallStateFinished(false, "! Unable to resolve magisk path", "")
388394
return
389395
}
390-
val ashExec = "$mgskPath/.magisk/busybox/busybox ash"
391396
try {
392397
ZipFile(file).use { zipFile ->
393398
// Check if module is AnyKernel module

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class InstallerInitializer {
5656
* For read/write only "/data/adb/modules" should be used
5757
*/
5858
fun peekModulesPath(): String? {
59-
return if (mgskPth == null) null else "$mgskPth/.magisk/modules"
59+
return if (mgskPth == null) null else "/data/adb/modules"
6060
}
6161

6262
fun peekMagiskVersion(): Int {
@@ -172,7 +172,7 @@ class InstallerInitializer {
172172
}
173173
verCode = 0
174174
}
175-
mgskPth = "/data/adb/modules" // hardcoded path. all modern versions of ksu and magisk use this path
175+
mgskPth = "/data/adb" // hardcoded path. all modern versions of ksu and magisk use this path
176176
if (MainApplication.forceDebugLogging) {
177177
Timber.i("Magisk path: %s", mgskPth)
178178
}

0 commit comments

Comments
 (0)