37 lines
919 B
Kotlin
37 lines
919 B
Kotlin
/*
|
|
* SPDX-FileCopyrightText: 2026 Shiham Abdul Rahman <shihaam@shihaam.dev>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
package sh.sar.isodroid
|
|
|
|
import android.app.Application
|
|
import com.topjohnwu.superuser.Shell
|
|
|
|
class ISODroidApp : Application() {
|
|
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
|
|
// Initialize libsu Shell
|
|
Shell.enableVerboseLogging = BuildConfig.DEBUG
|
|
Shell.setDefaultBuilder(
|
|
Shell.Builder.create()
|
|
.setFlags(Shell.FLAG_MOUNT_MASTER)
|
|
.setTimeout(10)
|
|
)
|
|
}
|
|
|
|
companion object {
|
|
init {
|
|
// Set settings before the main shell can be created
|
|
Shell.enableVerboseLogging = true
|
|
Shell.setDefaultBuilder(
|
|
Shell.Builder.create()
|
|
.setFlags(Shell.FLAG_MOUNT_MASTER)
|
|
.setTimeout(10)
|
|
)
|
|
}
|
|
}
|
|
}
|