Skip to content

Commit d1623fe

Browse files
committed
Fix boot.img v4 which has no ramdisk.
1 parent 5c110e4 commit d1623fe

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot

app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ class SlotViewModel(
125125
else -> log(context, "Invalid boot.img", shouldThrow = true)
126126
}
127127
} else {
128-
log(context, "Invalid boot.img", shouldThrow = true)
128+
// boot.img v4 has no ramdisk!
129+
_sha1 = Shell.cmd("$magiskboot sha1 $boot").exec().out.firstOrNull()
129130
}
130131
Shell.cmd("$magiskboot cleanup").exec()
131132
} else {

0 commit comments

Comments
 (0)