bundle busybox
This commit is contained in:
parent
ccd82f3bce
commit
6ed72d3b65
|
@ -123,8 +123,10 @@ dependencies {
|
|||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||
|
||||
// Root permissions
|
||||
implementation("com.github.topjohnwu.libsu:core:3.1.2")
|
||||
implementation("com.github.topjohnwu.libsu:io:3.1.2")
|
||||
val libsuVersion = "3.1.2"
|
||||
implementation("com.github.topjohnwu.libsu:core:$libsuVersion")
|
||||
implementation("com.github.topjohnwu.libsu:io:$libsuVersion")
|
||||
implementation("com.github.topjohnwu.libsu:busybox:$libsuVersion")
|
||||
|
||||
// Layout
|
||||
implementation("com.google.android.flexbox:flexbox:3.0.0")
|
||||
|
|
|
@ -2,7 +2,9 @@ package com.vanced.manager.core
|
|||
|
||||
import android.app.Application
|
||||
import androidx.preference.PreferenceManager.getDefaultSharedPreferences
|
||||
import com.vanced.manager.BuildConfig.*
|
||||
import com.topjohnwu.superuser.BusyBoxInstaller
|
||||
import com.topjohnwu.superuser.Shell
|
||||
import com.vanced.manager.BuildConfig
|
||||
import com.vanced.manager.utils.loadJson
|
||||
import com.vanced.manager.utils.managerAccent
|
||||
import com.vanced.manager.utils.mutableAccentColor
|
||||
|
@ -20,6 +22,14 @@ class App : Application() {
|
|||
scope.launch { loadJson(this@App) }
|
||||
super.onCreate()
|
||||
mutableAccentColor.value = prefs.managerAccent
|
||||
Shell.enableVerboseLogging = BuildConfig.DEBUG
|
||||
Shell.setDefaultBuilder(
|
||||
Shell.Builder
|
||||
.create()
|
||||
.setFlags(Shell.FLAG_REDIRECT_STDERR)
|
||||
.setInitializers(BusyBoxInstaller::class.java)
|
||||
.setTimeout(10)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,15 +35,6 @@ object PackageHelper {
|
|||
private val vancedThemes =
|
||||
vanced.value?.array<String>("themes")?.value ?: listOf("black", "dark", "pink", "blue")
|
||||
|
||||
init {
|
||||
Shell.enableVerboseLogging = BuildConfig.DEBUG
|
||||
Shell.setDefaultBuilder(
|
||||
Shell.Builder.create()
|
||||
.setFlags(Shell.FLAG_REDIRECT_STDERR)
|
||||
.setTimeout(10)
|
||||
)
|
||||
}
|
||||
|
||||
private fun getAppNameRoot(pkg: String): String {
|
||||
return when (pkg) {
|
||||
vancedRootPkg -> "vanced"
|
||||
|
|
Loading…
Reference in New Issue