Skip to content

Instantly share code, notes, and snippets.

@onokatio
Created October 19, 2019 18:24
Show Gist options
  • Save onokatio/89fbf805b86fc163ff2b8bfeb02786ae to your computer and use it in GitHub Desktop.
Save onokatio/89fbf805b86fc163ff2b8bfeb02786ae to your computer and use it in GitHub Desktop.
I noticed a bugs around bootloader.
When active slot is b, `fastboot boot` and `fastboot flash` command is failed.
It seems bootloader can't access `boot_b` partition or can not use ram to load img file. (I don't know why.)
Unfortunately, my active slot was `b`.
so I follow the way to install magisk.
1. update Android 10 via OTA.
2. reboot to fastboot
3. run `fastboot set_active a`
4. power off
5. power on to fastboot
6. run `fastboot twrp-3.3.1-2-enchilada.img`
7. type password to decrypt disk
8. download to computer and extract Magisk-v20.0.zip
9. edit common/util_functions.sh. add new line `SLOT="_b"` after `fi`.
[CODE]
*** util_functions.sh 2016-08-14 23:23:44.000000000 +0900
--- util_functions.sh 2019-10-20 03:06:41.966517479 +0900
*************** mount_partitions() {
*** 189,194 ****
--- 189,195 ----
SLOT=`grep_cmdline androidboot.slot`
[ -z $SLOT ] || SLOT=_${SLOT}
fi
+ SLOT="_b"
[ -z $SLOT ] || ui_print "- Current boot slot: $SLOT"
mount_part system
[/CODE]
10. run `zip -r magisk.zip ./* `
11. run `adb push magisk.zip /sdcard `
12. In twrp, Install magisk.zip
13. select Menu->Reboot->Slot B to set active slot b
14. Reboot->Power Off
15. Power on.
Now, I can use Magisk and it runs successfully.
SafetyNet check passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment