Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/89/head
androidacy-user 2 years ago
parent 5fc8059501
commit 8a9068d416

@ -211,12 +211,8 @@
-keep class com.topjohnwu.superuser.Shell$Result
-keep class com.topjohnwu.superuser.Shell
# 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
# a is actually onInit and the code is in kotlin
-keepclassmembers class com.fox2code.mmm.installer.InstallerInitializer {
public onInit(android.content.Context, com.topjohnwu.superuser.Shell);
}
# keep settings fragments Appearance, Credits, Debug, Info, Privacy, Repo, Security, and Update
-keep,allowobfuscation class com.fox2code.mmm.settings.* { *; }
# dontwarn
-dontwarn android.os.SystemProperties
-dontwarn android.view.ThreadedRenderer

@ -502,10 +502,7 @@ class MainApplication : FoxApplication(), Configuration.Provider {
init {
Shell.setDefaultBuilder(Shell.Builder.create()
.setFlags(Shell.FLAG_REDIRECT_STDERR or Shell.FLAG_MOUNT_MASTER).setTimeout(15)
.setInitializers(
InstallerInitializer::class.java
).also { shellBuilder = it })
.setFlags(Shell.FLAG_REDIRECT_STDERR or Shell.FLAG_MOUNT_MASTER).setTimeout(15))
val random = Random()
do {
secret = random.nextLong()

@ -380,6 +380,7 @@ class InstallerActivity : FoxActivity() {
}
installerMonitor = InstallerMonitor(installScript)
installJob = Shell.cmd(
"export ASH_STANDALONE=1",
"export MMM_EXT_SUPPORT=1",
"export MMM_USER_LANGUAGE=" + this.resources.configuration.locales[0].toLanguageTag(),
"export MMM_APP_VERSION=" + BuildConfig.VERSION_NAME,

@ -4,7 +4,6 @@
package com.fox2code.mmm.installer
import android.content.Context
import com.fox2code.mmm.Constants
import com.fox2code.mmm.MainApplication
import com.fox2code.mmm.NotificationType
@ -15,17 +14,12 @@ import timber.log.Timber
import java.io.File
@Suppress("unused")
class InstallerInitializer : Shell.Initializer() {
class InstallerInitializer {
interface Callback {
fun onPathReceived(path: String?)
fun onFailure(error: Int)
}
override fun onInit(context: Context, shell: Shell): Boolean {
return if (!shell.isRoot) true else shell.newJob().add("export ASH_STANDALONE=1")
.exec().isSuccess
}
companion object {
private val MAGISK_SBIN = File("/sbin/magisk")
private val MAGISK_SYSTEM = File("/system/bin/magisk")
@ -160,7 +154,9 @@ class InstallerInitializer : Shell.Initializer() {
Companion.mgskVerCode = mgskVerCode
return mgskPth
} catch (ignored: Exception) {
return if (tries <= 10) {
// TODO: REMOVE THIS
throw IllegalStateException(ignored)
/*return if (tries <= 10) {
tries++
// sleep tries * 25ms
try {
@ -171,7 +167,7 @@ class InstallerInitializer : Shell.Initializer() {
tryGetMagiskPath(true)
} else {
null
}
}*/
}
}
}

@ -10,7 +10,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Mon Jul 17 21:53:32 EDT 2023
#Tue Jul 18 21:42:11 EDT 2023
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=false
android.enableR8.fullMode=true
@ -18,5 +18,5 @@ android.useAndroidX=true
org.gradle.caching=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
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
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
org.gradle.parallel=true

Loading…
Cancel
Save