[HOWTO] Moto: replace the startup screen warning

while I’d also like to relock the bootloader to get the assurance benefit, as in Relocking Bootloader after e os install moto g4 play I first checked howto

… get rid of the startup screen warning (moto g4 play)?

xda forum to the rescue: one can flash a custom logo.bin to the partition containing this startup screen warning. There are some scripts at github and many custom logo.bins at xda-developers.com

https://github.com/eriktim/moto-bootlogo helped me. There’s a pending PR for the Makefile for some linker ordering you have to correct to successfully compile on gcc 10. After this you can add any png using your devices native resolution to the logo.bin.

I used this on a G4 Play

flash it

use “Extract the original bin file” from the Readme to get a trusted logo.bin

adb shell su -c "dd if=/dev/block/platform/msm_sdcc.1/by-name/logo of=/sdcard/logo.bin count=1 bs=634418"
adb pull /sdcard/logo.bin .

If you’re feeling lucky, there are logo.bins included in the bootanimation collection at https://github.com/bmaupin/motorola-boot-animations/releases

$ moto-bootlogo -i eelo-unlocked/logo.png eelo-unlocked/logo.bin
Created 'eelo-unlocked/logo-custom.bin'
Parsing header of 'eelo-unlocked/logo-custom.bin'.
..
Found 3 images.

$ adb reboot bootloader

$ fastboot flash logo ./eelo-unlocked/logo-custom.bin

(image applied from https://gitlab.e.foundation/e/os/android_vendor_lineage/-/tree/v1-q/bootanimation)

7 Likes

Nice effort @tcecyk …shared this with the team and they are also planning something similar.

1 Like

to spare somebody the moto-bootlogo compile and sourcing of a logo.bin I uploaded them to https://www.androidfilehost.com/?w=files&flid=324750 (and signed the file hash).

To verify, create the tcecyk.pub file from my profile and use signify-openbsd or minisign to run

signify -C -p tcecyk.pub -x logo.sha1

(file extension sha1 is a misnomer, but AFH doesn’t allow for other sha file endings)

1 Like

to reiterate, with a downloaded logo.bin, all that needs to be done is

fastboot flash logo ./logo-bin

the signature verification is academic. The long howto is for people sourcing and modifying their own partition.

hi,

i am interrested by replace the charge animation have you some hints about that ?

the charge animation lives in the logo.bin / partition too, but with another header (“logo_battery”). If you modify main.c to replace this header instead of logo_boot/logo_unlocked it should work. If it is an animation it wants frames, so you’d need to find out its structure.

the xda forum is full of Moto Logo customization, it was an industry in the mid 2010s. See this thread for a util that can already address the battery, the (32bit, statically linked) binaries are still available at androidfilehost.com.

1 Like

01/2022 update: I had a look at the same procedure with a Moto G5 and G5s:

  • use blockdev --getsize64 /dev/block/platform/soc/7824900.sdhci/by-name/logo (path depends on device… look for by-name) for the bs (bytesize) value of dd to get the full partition. The value (“634418”) used prior was just taken blindly from the moto-bootlogo readme. The partition is actually 4 mbytes in ~2016 Motos, 16 mbytes later
  • also merge the PR upstream that parses the header size as 16bit value. This will make header readouts successful when there are more elements
  • running moto-bootlogo will extract all existing images, take those a basis for modification as the pixel size needs to be according to your device
  • here is a svg to determine pixel resolution freely - logo_boot.svg.gz | by tcecyk for Motorola Moto G4 Play
  • Moto G5 devices want the orange.png file replaced, create a second copy_image_header call within main.cpp to copy ‘logo_boot’ to ‘orange’
2 Likes