mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-01 13:14:21 +00:00
Fix direct install on NAND devices
Co-authored-by: John Wu <topjohnwu@gmail.com>
This commit is contained in:
@@ -239,6 +239,12 @@ abstract class MagiskInstallImpl : FlashResultListener {
|
||||
}
|
||||
|
||||
private fun patchBoot(): Boolean {
|
||||
var srcNand = ""
|
||||
if ("[ -c $srcBoot ] && nanddump -f boot.img $srcBoot".sh().isSuccess) {
|
||||
srcNand = srcBoot
|
||||
srcBoot = File(installDir, "boot.img").path
|
||||
}
|
||||
|
||||
var isSigned = false
|
||||
try {
|
||||
SuFileInputStream(srcBoot).use {
|
||||
@@ -258,6 +264,10 @@ abstract class MagiskInstallImpl : FlashResultListener {
|
||||
return false
|
||||
}
|
||||
|
||||
if (srcNand.isNotEmpty()) {
|
||||
srcBoot = srcNand
|
||||
}
|
||||
|
||||
val job = Shell.sh(
|
||||
"./magiskboot cleanup",
|
||||
"mv bin/busybox busybox",
|
||||
|
||||
Reference in New Issue
Block a user