Custom bootloader (ChouChou)
info
Thanks to Roger Ortiz for developing the payload for our bootloader!
The custom bootloader protects the device from Hard Brick by preventing critical operations such as flashing the preloader and locking the bootloader without restoring the original firmware.
In addition, it extends the functionality by adding new options for customizing and managing the system.
It was originally developed for penangf (Moto G13/G23), but was ported for fogorow keeping all functionality and adding new functionality specific to our device.
Features​
- Blocks
fastboot flash preloader
- Removes orange state
- Spoofes verified state to green
- Block
fastboot flashing lock
- Adds
fastboot oem help
- Adds
fastboot oem hexdump
Specific features, only for our device​
- The bootloader auto-lock security feature has been removed
- Preventing factory mode
- Fuse check
- Added ability to flash any partition
Install​
warning
Initial installation requires an engineering DA (Use AMT Tool for example).
To upgrade or rollback to another version of ChouChou you can use mtkclient or fastboot
Prebuild images​
ChouChou v0.1
Manually build​
- Download your current firmware archive from lolinet
- Clone repository chouchou (branch fogorow)
- Transfer the
lk.img
file from the firmware archive to the directorychouchou
- Install dependencies
$ sudo pacman -S arm-none-eabi-newlib arm-none-eabi-gcc
- Build payload
$ cd payload; make; cd ..
- Patch stock lk
$ python3 patch_lk.py lk.img payload/build/payload.bin
base: 0x4c400000, size: 1072864, name: lk
payload injection point at 0x4c4f6400
0x4c427638 (pivot) bl 0x4c4f6400 (payload)
Writing 2238304 bytes to lk.img-patched...