This script flash the partitions of the non-active slot. You need stock ROM images (e.g. A.0105, A.0111).
Flashing the non-active slot is a way to ensure that there is always a working bootloader.
- Your device must have an unlocked bootloader ;
- You need to boot to bootloader and ensure that you device is detectable by your computer with
fastboot devices
; - You need to have the images in the working directory ;
- Run
./flash.sh
.
You may need :
- to run it as root
sudo ./flash
- to run it twice to flash slots a and b
- to erase userdata
fastboot -w
after the flashs
If you see the warning that shuts down the phone after the 30 seconds, do not forget to press the power button to boot.
To get rid of this warning, run adb reboot "dm-verity enforcing"