You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -653,8 +653,12 @@ class SlotViewModel(
653
653
val files =File(context.filesDir.canonicalPath)
654
654
val flashScript =File(files, "flash_ak3$type.sh")
655
655
val result =Shell.Builder.create().setFlags(Shell.FLAG_MOUNT_MASTER).build().newJob().add("F=$files Z=\"$zip\" /system/bin/sh $flashScript").to(flashOutput, flashOutput).exec()
656
-
if (result.isSuccess) {
657
-
log(context, "Kernel flashed successfully")
656
+
val outputTail = flashOutput.takeLast(5).joinToString("\n")
657
+
val fakeFail ="sched_setattr: not found"in outputTail &&
658
+
"Done!"in outputTail &&
659
+
result.code ==127
660
+
if (result.isSuccess || fakeFail) {
661
+
log(context, "AnyKernel Zip flashed successfully")
658
662
_wasFlashSuccess.value =true
659
663
} else {
660
664
log(context, "Failed to flash zip", shouldThrow =false)
0 commit comments