bypass.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. diff --git a/anykernel.sh b/anykernel.sh
  2. index 7ac0233..864ecf4 100755
  3. --- a/anykernel.sh
  4. +++ b/anykernel.sh
  5. @@ -21,7 +21,6 @@ supported.patchlevels=
  6. supported.vendorpatchlevels=
  7. '; } # end properties
  8. -
  9. ### AnyKernel install
  10. ## boot shell variables
  11. block=boot
  12. diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh
  13. index dfbec13..c9900f7 100755
  14. --- a/tools/ak3-core.sh
  15. +++ b/tools/ak3-core.sh
  16. @@ -1051,8 +1051,30 @@ do_check_boot_version() {
  17. ui_print " -> Kernel version: COMPATIBLE ($new_ver >= $dev_ver)"
  18. }
  19. +do_flash_bypass() {
  20. + # do.flash_bypass=0 in anykernel.sh skips bypass option and flashs normal
  21. + if [ "$(file_getprop anykernel.sh do.flash_bypass)" != 1 ]; then
  22. + ui_print " -> [NORMAL] do.flash_bypass=0: bypass option SKIPPED."
  23. + if [ -f "$AKHOME/Image" ]; then
  24. + ui_print " -> [NORMAL] Flashing Normal Image..."
  25. + else
  26. + abort " -> ERROR: Image not found. Abort."
  27. + fi
  28. + else
  29. + ui_print " -> [BYPASS] do.flash_bypass=1: flash bypass option ENABLED."
  30. + if [ -f "$AKHOME/Bypass-Image" ]; then
  31. + cp -f "$AKHOME/Bypass-Image" "$AKHOME/Image" || abort " -> ERROR: Failed to copy Bypass-Image. Abort."
  32. + ui_print " -> [BYPASS] Flashing Bypass Image..."
  33. + else
  34. + abort " -> ERROR: Bypass-Image not found. Abort."
  35. + fi
  36. + fi
  37. +}
  38. +
  39. ### end methods
  40. setup_ak;
  41. do_check_boot_version;
  42. +
  43. +do_flash_bypass;