Filling dtbo with zeros on reboot
This commit is contained in:
parent
3dcaf427ac
commit
b832ef0b9a
|
@ -24,7 +24,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
showToast("Switching!", applicationContext)
|
showToast("Switching!", applicationContext)
|
||||||
|
|
||||||
Shell.cmd(
|
Shell.cmd(
|
||||||
"dd if=/sdcard/linux/linux.dtbo.img of=/dev/block/bootdevice/by-name/dtbo$suffix",
|
"dd if=/dev/zero of=/dev/block/bootdevice/by-name/dtbo$suffix",
|
||||||
"dd if=/sdcard/linux/linux.boot.img of=/dev/block/bootdevice/by-name/boot$suffix",
|
"dd if=/sdcard/linux/linux.boot.img of=/dev/block/bootdevice/by-name/boot$suffix",
|
||||||
"dd if=/sdcard/linux/linux.vbmeta.img of=/dev/block/bootdevice/by-name/vbmeta$suffix",
|
"dd if=/sdcard/linux/linux.vbmeta.img of=/dev/block/bootdevice/by-name/vbmeta$suffix",
|
||||||
"sleep 1",
|
"sleep 1",
|
||||||
|
@ -57,10 +57,6 @@ class MainActivity : AppCompatActivity() {
|
||||||
buttonS2L.isEnabled = true
|
buttonS2L.isEnabled = true
|
||||||
if (!isFileExist("/sdcard/linux/")) {
|
if (!isFileExist("/sdcard/linux/")) {
|
||||||
Shell.cmd("mkdir /sdcard/linux/").exec()
|
Shell.cmd("mkdir /sdcard/linux/").exec()
|
||||||
}
|
|
||||||
if (!isFileExist("/sdcard/linux/linux.dtbo.img")) {
|
|
||||||
showToast("linux.dtbo.img not found", applicationContext)
|
|
||||||
finish()
|
|
||||||
} else if (!isFileExist("/sdcard/linux/linux.vbmeta.img")) {
|
} else if (!isFileExist("/sdcard/linux/linux.vbmeta.img")) {
|
||||||
showToast("linux.vbmeta.img bot found", applicationContext)
|
showToast("linux.vbmeta.img bot found", applicationContext)
|
||||||
finish()
|
finish()
|
||||||
|
|
Loading…
Reference in a new issue