Skip to content

Commit

Permalink
bumped to 1.0.0-alpha04
Browse files Browse the repository at this point in the history
fixed main shell was already created crashes
  • Loading branch information
capntrips committed Jun 8, 2022
1 parent b25c428 commit ae15383
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.github.capntrips.kernelflasher"
minSdk 31
targetSdk 32
versionCode 2
versionName "1.0.0-alpha03"
versionCode 4
versionName "1.0.0-alpha04"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ import java.io.File
@ExperimentalMaterial3Api
@ExperimentalAnimationApi
class MainActivity : ComponentActivity() {
companion object {
init {
Shell.setDefaultBuilder(Shell.Builder.create().setFlags(Shell.FLAG_MOUNT_MASTER))
}
}

private lateinit var mainListener: MainListener
var isAwaitingResult = false

Expand Down Expand Up @@ -79,7 +85,6 @@ class MainActivity : ComponentActivity() {

setContent {
KernelFlasherTheme {
Shell.setDefaultBuilder(Shell.Builder.create().setFlags(Shell.FLAG_MOUNT_MASTER))
if (Shell.getShell().status > Shell.NON_ROOT_SHELL) {
Shell.cmd("cd $filesDir").exec()
copyAsset("lptools")
Expand Down

0 comments on commit ae15383

Please sign in to comment.