Skip to content

Commit 8a9068d

Browse files
updates
Signed-off-by: androidacy-user <[email protected]>
1 parent 5fc8059 commit 8a9068d

File tree

5 files changed

+11
-21
lines changed

5 files changed

+11
-21
lines changed

app/proguard-rules.pro

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,8 @@
211211
-keep class com.topjohnwu.superuser.Shell$Result
212212
-keep class com.topjohnwu.superuser.Shell
213213

214-
# fix for Parameter specified as non-null is null: method com.fox2code.mmm.installer.InstallerInitializer.a, parameter context which extends com.topjohnwu.superuser.Shell$Initializer
215-
# a is actually onInit and the code is in kotlin
216-
-keepclassmembers class com.fox2code.mmm.installer.InstallerInitializer {
217-
public onInit(android.content.Context, com.topjohnwu.superuser.Shell);
218-
}
219-
214+
# keep settings fragments Appearance, Credits, Debug, Info, Privacy, Repo, Security, and Update
215+
-keep,allowobfuscation class com.fox2code.mmm.settings.* { *; }
220216
# dontwarn
221217
-dontwarn android.os.SystemProperties
222218
-dontwarn android.view.ThreadedRenderer

app/src/main/kotlin/com/fox2code/mmm/MainApplication.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,10 +502,7 @@ class MainApplication : FoxApplication(), Configuration.Provider {
502502

503503
init {
504504
Shell.setDefaultBuilder(Shell.Builder.create()
505-
.setFlags(Shell.FLAG_REDIRECT_STDERR or Shell.FLAG_MOUNT_MASTER).setTimeout(15)
506-
.setInitializers(
507-
InstallerInitializer::class.java
508-
).also { shellBuilder = it })
505+
.setFlags(Shell.FLAG_REDIRECT_STDERR or Shell.FLAG_MOUNT_MASTER).setTimeout(15))
509506
val random = Random()
510507
do {
511508
secret = random.nextLong()

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ class InstallerActivity : FoxActivity() {
380380
}
381381
installerMonitor = InstallerMonitor(installScript)
382382
installJob = Shell.cmd(
383+
"export ASH_STANDALONE=1",
383384
"export MMM_EXT_SUPPORT=1",
384385
"export MMM_USER_LANGUAGE=" + this.resources.configuration.locales[0].toLanguageTag(),
385386
"export MMM_APP_VERSION=" + BuildConfig.VERSION_NAME,

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
package com.fox2code.mmm.installer
66

7-
import android.content.Context
87
import com.fox2code.mmm.Constants
98
import com.fox2code.mmm.MainApplication
109
import com.fox2code.mmm.NotificationType
@@ -15,17 +14,12 @@ import timber.log.Timber
1514
import java.io.File
1615

1716
@Suppress("unused")
18-
class InstallerInitializer : Shell.Initializer() {
17+
class InstallerInitializer {
1918
interface Callback {
2019
fun onPathReceived(path: String?)
2120
fun onFailure(error: Int)
2221
}
2322

24-
override fun onInit(context: Context, shell: Shell): Boolean {
25-
return if (!shell.isRoot) true else shell.newJob().add("export ASH_STANDALONE=1")
26-
.exec().isSuccess
27-
}
28-
2923
companion object {
3024
private val MAGISK_SBIN = File("/sbin/magisk")
3125
private val MAGISK_SYSTEM = File("/system/bin/magisk")
@@ -160,7 +154,9 @@ class InstallerInitializer : Shell.Initializer() {
160154
Companion.mgskVerCode = mgskVerCode
161155
return mgskPth
162156
} catch (ignored: Exception) {
163-
return if (tries <= 10) {
157+
// TODO: REMOVE THIS
158+
throw IllegalStateException(ignored)
159+
/*return if (tries <= 10) {
164160
tries++
165161
// sleep tries * 25ms
166162
try {
@@ -171,7 +167,7 @@ class InstallerInitializer : Shell.Initializer() {
171167
tryGetMagiskPath(true)
172168
} else {
173169
null
174-
}
170+
}*/
175171
}
176172
}
177173
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
# This option should only be used with decoupled projects. More details, visit
1111
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1212
# org.gradle.parallel=true
13-
#Mon Jul 17 21:53:32 EDT 2023
13+
#Tue Jul 18 21:42:11 EDT 2023
1414
android.defaults.buildfeatures.buildconfig=true
1515
android.enableJetifier=false
1616
android.enableR8.fullMode=true
1717
android.useAndroidX=true
1818
org.gradle.caching=true
1919
org.gradle.configuration-cache=true
2020
org.gradle.configuration-cache.problems=warn
21-
org.gradle.jvmargs=-Xmx1024M -Dorg.gradle.android.cache-fix.ignoreVersionCheck\=true -Dkotlin.daemon.jvm.options\="-Xmx1024M" -Dfile.encoding\=UTF-8 -XX\:+UseParallelGC -XX\:ReservedCodeCacheSize\=768m
21+
org.gradle.jvmargs=-Xmx1536M -Dorg.gradle.android.cache-fix.ignoreVersionCheck\=true -Dkotlin.daemon.jvm.options\="-Xmx1536M" -Dfile.encoding\=UTF-8 -XX\:+UseParallelGC -XX\:ReservedCodeCacheSize\=768m
2222
org.gradle.parallel=true

0 commit comments

Comments
 (0)