diff --git a/app/src/main/assets/Scripts b/app/src/main/assets/Scripts index 570ff34e..36afa4bc 160000 --- a/app/src/main/assets/Scripts +++ b/app/src/main/assets/Scripts @@ -1 +1 @@ -Subproject commit 570ff34ec80da225b1645c612bcd47d0fdc3a2e0 +Subproject commit 36afa4bce9bd65b4c76cccf56a951fbaeec52372 diff --git a/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt b/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt index 45f4fecc..206c5cca 100644 --- a/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt +++ b/app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt @@ -992,7 +992,6 @@ private fun Flash(c: CreatePartDataHolder) { } else /*percent*/ { (BigDecimal(c.p.size - (offset + c.f)).multiply(BigDecimal(b).divide(BigDecimal(100)))).toLong() } - terminal.add("c.p.size=${c.p.size} offset=$offset c.f=${c.f} b=$b k=$k logSectorSizeBytes=${c.meta!!.logicalSectorSizeBytes}") vm.logic.unmount(vm.deviceInfo!!) val r = Shell.cmd(SDUtils.umsd(c.meta!!) + " && " + c.p.create(offset, offset + k, code, "")).to(terminal).exec() diff --git a/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt b/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt index be915520..fd153abd 100644 --- a/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt +++ b/app/src/main/java/org/andbootmgr/app/DeviceInfo.kt @@ -76,7 +76,7 @@ object HardcodedDeviceInfoFactory { override val bdev: String = "/dev/block/mmcblk1" override val pbdev: String = bdev + "p" override val metaonsd: Boolean = true - override val postInstallScript: Boolean = false + override val postInstallScript: Boolean = true override val havedtbo: Boolean = false override fun isInstalled(logic: DeviceLogic): Boolean { return SuFile.open(bdev).exists() && run { diff --git a/app/src/main/java/org/andbootmgr/app/MainActivity.kt b/app/src/main/java/org/andbootmgr/app/MainActivity.kt index 253d95b6..da6d4330 100644 --- a/app/src/main/java/org/andbootmgr/app/MainActivity.kt +++ b/app/src/main/java/org/andbootmgr/app/MainActivity.kt @@ -233,32 +233,31 @@ private fun AppContent(vm: MainActivityState, view: @Composable (PaddingValues) // A surface container using the 'background' color from the theme Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { ModalNavigationDrawer(drawerContent = { - Box { - Button( - modifier = Modifier - .align(Alignment.Center) - .padding(top = 16.dp), + ModalDrawerSheet { + NavigationDrawerItem( + label = { Text(stringResource(R.string.home)) }, + selected = vm.currentNav == "start", onClick = { scope.launch { vm.navController!!.navigate("start") drawerState.close() } }, - content = { Text(stringResource(R.string.home)) } - ) - Button( - modifier = Modifier - .align(Alignment.Center) - .padding(top = 16.dp), - onClick = { - if (vm.isOk) scope.launch { - vm.navController!!.navigate("settings") - drawerState.close() - } - }, - enabled = vm.isOk, - content = { Text(stringResource(R.string.settings)) } + modifier = Modifier.padding(start = 8.dp, end = 8.dp, top = 8.dp) ) + if (vm.isOk) { + NavigationDrawerItem( + label = { Text(stringResource(R.string.settings)) }, + selected = vm.currentNav == "settings", + onClick = { + scope.launch { + vm.navController!!.navigate("settings") + drawerState.close() + } + }, + modifier = Modifier.padding(start = 8.dp, end = 8.dp, top = 8.dp) + ) + } } }, drawerState = drawerState,