Skip to content

Commit

Permalink
update mima install stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Jul 29, 2024
1 parent b7d47b2 commit 3600924
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/org/andbootmgr/app/CreatePartFlow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/andbootmgr/app/DeviceInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
37 changes: 18 additions & 19 deletions app/src/main/java/org/andbootmgr/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3600924

Please sign in to comment.