Fix softbricks
What is a softbrickβ
A softbrick is when a phone doesn't want to bootup making it unable to boot into system or fastboot. Generally with penangf, the phone just throws a dm-verity error, but it may happen sometimes that it might stop booting at all.
Difference between red state and softbrickβ
Red state is a specific term of verified boot state, and it happens when the device cannot verify the signature of the image installed. To fix it, you have to reflash stock firmware.
Softbrick, on the other hand, happens when the device cannot continue booting up the system.
Recovering from softbrickβ
Softbrick with Moto g23 can happen for no reason. Fortunately they can be fixed really easily.
fastboot reboot fastbootβ
This Softbrick happens because the bootloader sets the g_boot_mode to boot into fastbootd mode, but probably for a bug, when rebooting the preloader fails to find fastbootd, thus entering a bootloop.
To fix this, your job is to interrupt the bootloop and run a script that will force boot you into FASTBOOT and automatically fix the softbrick:
-
Download the latest firmware from Lolinet
-
Clone repository fuckyoumoto
-
Install dependencies
$ pip install -r requirements.txt
-
Run
fix_fastbootd_softbrick.sh
script in the right modeSyntax:
$ ./fix_fastbootd_softbrick.sh <FIRMWARE_DIR> <MODE (Optional)>
noteIf you don't know which mode you want, try mode 1 first
Mode Description 1 (Default) Only the vendor_boot and boot partitions are flashed.
It will help if the firmware was not badly corrupted.2 The entire firmware is flashed in its entirety.
All user data will be lost.
This will take a long time.Example of using the script:
- Mode 1
$ ./fix_fastbootd_softbrick.sh ../penangf_g_user_14_UHA34.29-10 1
- Mode 2
$ ./fix_fastbootd_softbrick.sh ../penangf_g_user_14_UHA34.29-10 2
- Mode 1
-
Connect the phone to the computer and press and hold down all buttons while the phone is hovering on the logo to abort the bootloop
-
The phone will reboot into FASTBOOT and automatically fix the softbrick using the script you specified in the βmodeβ argument
fastboot reboot bootloaderβ
Usually this throws a dm-verity error, so you just need to reflash vbmeta partitions.
If the phone doesn't boot up at all, follow the same instructions for fastboot reboot fastboot.