FP2 Change splash Image (splash.img)

Hello all!

I want to change the splash screen (splash image) which is inside splash.img of the FP2.

Al i know is, that the splash image is packed in the img.file

I could extract the image on Linux with this command:

ffmpeg -hide_banner -f rawvideo -vcodec rawvideo -pix_fmt bgr24 -skip_initial_bytes 512 -s 1080x1920 -i splash.img -vframes 1 -y output_splash.png

Output:

[rawvideo @ 0x55d73845f000] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from ā€˜splash.imgā€™:
Duration: 00:00:00.04, start: 0.000000, bitrate: 1244262 kb/s
Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1080x1920, 1244160 kb/s, 25 tbr, 25 tbn, 25 tbc
Output #0, image2, to ā€˜output_splash.pngā€™:
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: png, rgb24, 1080x1920, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc57.64.101 png
Stream mapping:
Stream #0:0 ā†’ #0:0 (rawvideo (native) ā†’ png (native))
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.555x
video:56kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

But i have no idea how to change the image and create a new splash.img

Maybe someone could help me?

I upload here the Sailfish splash screen. It would be nice to haveā€¦

5 Likes

XDA seems to have huge discussions about this topic: https://forum.xda-developers.com/android/software-hacking/guide-how-to-create-custom-boot-logo-t3470473

The above thread links to other threads for device-specific solutions. FP2 is a Snapdragon device. Splash format seems to be RAW RGB24 from your ffmpeg output, 1080x1920 pixels resolution.

BTW, splash.img is located inside the firmware-update folder on (every?) OTA update ZIP. For example, it resides in fp2-sibon-17.06.4-ota-userdebug/firmware-update for the latest FP Open update.

1 Like

Thanks, Roboe, i know this Thread at XDA.
But i didnā€™t find the exact command how to make and splash.img from my PNG-Image.

Extracting is now problem. I could extract the splash.png from the fairphone-open splash.img

I know, but I explained poorly. That was useful info for other readers, :slight_smile:

Iā€™ve been researching a bit, and there was a Python script in the Codeaurora Android sources (which is the basis for FP Open): https://source.codeaurora.org/quic/la/device/qcom/common/tree/display/logo?h=LA.BR.1.2.7_rb1.1 (python logo_gen.py newsplashimage.png should make a splash.img somewhere)

We can maybe look for the actual script used for FP2 in the https://code.fairphone.com sources
Edit: I couldnā€™t find anything, logo_gen.py script doesnā€™t exist in device/qcom/common, and splash.img is included as a binary on the device tree already, :confused:

2 Likes

Iā€™ve generated a new splash image with the neat charging image @Douwe shared in this other thread. Itā€™s working, :wink:

Iā€™m setting a GitHub repo with the changes needed right now.

Edit: here it is

Edit:

Oh, I forgotā€¦ hereā€™s your splash screen, @explit, :slight_smile:

13 Likes

You made my day Mate!

3 Likes

No problem! You made me remind old times when I used to mod my ZTE Skate, which had a self-made, unique and cool Gameboy Droid splash screen, :slight_smile:

Don't judge me, those were times when I loved Gobble... obviously I didn't know anything

ā€¦but, in fact, that was the first device I successfully ungoogled, :wink:

5 Likes

The only thing that was missing for really promoting the SailfishOS portā€¦
Good job @explit & @Roboe :wink:

2 Likes

All credits go to @Roboe, i only pushed the stone rollinā€™
But indeed. @Roboeā€™s python script is one step forward to the ā€œrealā€ open community phoneā€¦

2 Likes

True ! Thanks again @Roboe :wink:

3 Likes

I must say that Halium project (with @z3ntu being a part of them) is doing more for an ā€œopen community phoneā€ than me with my little hack in python, but thank you anyway, :slight_smile:

Booting a Sailfish OS phone with a ā€œpowered by Androidā€ splash sounds terrible, :joy:
Glad I was able to help you, :blush:

3 Likes

Couldnā€™t resist :wink: .

7 Likes

Wellā€¦we are real gourmets :smiley:

2 Likes

Sailfish OS was the first thing I ran on my Fairphone 2 after the stock OS, but I didnā€™t even once notice this detail, so :+1:

2 Likes

Ooooh, that would be a great addition to

ā€¦if it wasnā€™t closed, :frowning:

fixed that.

4 Likes

Hello, Iā€™m desperately trying but it doesnā€™t workā€¦ The problem must be me. What I have done :

  • Installed python (which is version 2.7.12 according to python -V) and installed python-imaging
  • python-pil is already installed (version 3.1.2)
  • Downloaded lp-splash.png to get the official image
  • Customised it to put the Lineage logo for the first one, and a Tyrannosaurus image plus the Lineage logo for the second one
  • Converted them into splash images with the python2 logo_gen.py "my_splash_screen".png command
  • Flashed them with the fastboot command.

What did I do wrong ?

Regards,

Daniel

1 Like

The one with the dinosaur is 1077x1920. Try expanding it to 1080x1920.
But that doesnā€™t answer the question why the one without doesnā€™t workā€¦

2 Likes

From my own tries, image needs to be exactly 1080x1920, so follow @Johannesā€™s advice.

The setup (Python 2.7.* and PIL) is fine. I need to know more to help you further. What error are you getting to know that it doesnā€™t work?

Thanks for your asnwers and your help @Johannes and @Roboe ! What happens is this : I flash the image (the one which is 1080x1920). Nothing says there was an error :

fastboot flash splash lineage_fairphone.img 
target reported max download size of 536870912 bytes
sending 'splash' (6075 KB)...
OKAY [  0.193s]
writing 'splash'...
OKAY [  0.161s]
finished. total time: 0.354s

But then, when I type fastboot reboot and it reboots, the image doesnā€™t show up, instead it looks like :

So it shows your working splash screen, with a little grey bar at the top (as if it was telling ā€œI am trying to show spartidā€™s image here, but I canā€™tā€), and then boot normally. I reflash your image afterwards, and it boots showing your working image. I thought I could ask you to transform my PNG files into splash screens, and I think they would have worked then, but itā€™s a little frustrating not being able to make them myself :wink: