You've already forked KsuWebUIStandalone
mirror of
https://github.com/5ec1cff/KsuWebUIStandalone.git
synced 2025-09-06 06:37:11 +00:00
set main shell builder once
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.KsuWebUI"
|
android:theme="@style/Theme.KsuWebUI"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
|
android:name=".App"
|
||||||
tools:targetApi="31" >
|
tools:targetApi="31" >
|
||||||
<activity android:name=".MainActivity"
|
<activity android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|||||||
11
app/src/main/java/io/github/a13e300/ksuwebui/App.kt
Normal file
11
app/src/main/java/io/github/a13e300/ksuwebui/App.kt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package io.github.a13e300.ksuwebui
|
||||||
|
|
||||||
|
import android.app.Application
|
||||||
|
import com.topjohnwu.superuser.Shell
|
||||||
|
|
||||||
|
class App : Application() {
|
||||||
|
override fun onCreate() {
|
||||||
|
super.onCreate()
|
||||||
|
Shell.setDefaultBuilder(Shell.Builder.create().setFlags(Shell.FLAG_MOUNT_MASTER))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -177,7 +177,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Shell.setDefaultBuilder(Shell.Builder.create().setFlags(Shell.FLAG_MOUNT_MASTER))
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
RootService.bind(Intent(this, FileSystemService::class.java), connection!!)
|
RootService.bind(Intent(this, FileSystemService::class.java), connection!!)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user