initlogo.rle: display an image on boot

Search This thread

alansj

Member
Nov 6, 2008
44
42
You can display a "splash" screen of sorts upon boot. You just have to have a file named initlogo.rle in your root directory. The trick is that the root directory is overwritten each time you boot with the contents of your boot image (mtd2). There are instructions elsewhere on the forums for updating this image.

You can prove to yourself that this works by just copying logo.rle to initlogo.rle in your updated boot image and you will see the "G1" screen twice.

The hurdle I'm running into is generating my own images. There is a program called to565 that takes in an image and spits out the resulting image in the appropriate format (give it the -r flag to generate an rle) [edit, correct flag is -rle]. However, everything I generate with this just looks like random colored bars when I boot up (and sometimes at the bottom of the screen I see part of whatever was left in the framebuffer when I shut down). Supposedly to565 takes in a raw rgb888 file, and perhaps I'm not generating those properly. I tried saving to "raw image" from gimp but so far everything is just different variations on colored bars.

I may give up at this point, but I thought others might be interesting in picking up where I left off.
 
Last edited:

alansj

Member
Nov 6, 2008
44
42
How to create a boot image:
1. put a properly encoded initlogo.rle in root directory
2. insert this line in init.rc in the boot: section (optional, this disables the stock android boot animation)
Code:
setprop debug.sf.nobootanimation 1
3. wrap it all up and flash it to mtd2

Attached:
1. A boot image with these changes made. To try it on your phone, first back up your mtd2 image (the boot image). Type the following in a root shell to back it up to your sdcard:
Code:
cat /dev/mtd/mtd2 > /sdcard/mtd2.img

Then, unzip boot-rc29-customlogo.img.zip it and stick it on your sdcard and type the following in a root shell:
Code:
cat /dev/zero >> /dev/mtd/mtd2
flash_image boot /sdcard/boot-rc29-customlogo.img
(when you do the cat, it will tell you "write: No space left on device," which is fine)

To restore your original boot image, do the cat and then flash_image your mtd2.img backup.

2. Samples of the raw image as well as the rle encoded version.

3. A nifty photo of this working on my phone.

attachment.php
 

Attachments

  • boot-rc29-customlogo.img.zip
    1.5 MB · Views: 4,054
  • initlogo.raw.zip
    17.6 KB · Views: 2,546
  • initlogo.rle.zip
    4.1 KB · Views: 3,618
  • hackdroid-boot.jpg
    hackdroid-boot.jpg
    22.6 KB · Views: 45,136

humble

Senior Member
Dec 17, 2007
199
5
i couldn't wait:D so i did it works perfectly. i just can't get rid of the first boot .img.(i see the instruction but i need further help) if this helps i have a vista 64 but, I'm also running VM to any operating system.
 

alansj

Member
Nov 6, 2008
44
42
i couldn't wait:D so i did it works perfectly. i just can't get rid of the first boot .img.(i see the instruction but i need further help) if this helps i have a vista 64 but, I'm also running VM to any operating system.

Yeah, actually I haven't found a way to get rid of the G1 logo on boot. If you change logo.rle on the root filesystem, it still shows that image. I'll post a longer guide to generating your own boot.img later tonight (although I posted a bunch of it in another thread already). You could always create your own boot.img and replace logo.rle to prove to yourself that it doesn't change that initial logo... but I've tried it. It must be somewhere else (including, perhaps, some on-phone memory that we can't access).
 

mack

Senior Member
Jun 30, 2005
123
1
hmmm so i've done this correctly since the boot image works...however i no longer have WIFI access. Does anyone knoe whats going on? under settings it keeps saying turning wifi ON... but it doesnt.



EDIT: So i reflashed the original backup img and now its fine. I wonder where i went wrong?
 
Last edited:

alansj

Member
Nov 6, 2008
44
42
hmmm so i've done this correctly since the boot image works...however i no longer have WIFI access. Does anyone knoe whats going on? under settings it keeps saying turning wifi ON... but it doesnt.

Did you use the boot.img I posted or one of your own? I'm not having any trouble with wifi, and I'm booted with that one. Do you see anything in dmesg about wifi?

Edit: also, it looks like JesusFreke had some issues with wifi not working when he was doing custom boot images. Dunno the details but maybe it's related.
 
Last edited:

mack

Senior Member
Jun 30, 2005
123
1
Did you use the boot.img I posted or one of your own? I'm not having any trouble with wifi, and I'm booted with that one. Do you see anything in dmesg about wifi?

Edit: also, it looks like JesusFreke had some issues with wifi not working when he was doing custom boot images. Dunno the details but maybe it's related.

I used your img that you posted with the hackdroid...LOVED it by the way =)

Could it be i'm on RC19 firmware? I'm reading jesusfreke's post but i'm fairly new to the linux thing so i'm having trouble understanding.

anyway i guess i'll just stick to stock until something new comes a long...

Thanks Alansj
 

alansj

Member
Nov 6, 2008
44
42
Could it be i'm on RC19 firmware?

Good guess. You could first apply the RC29 via sdcard and then flash the boot image.

To apply RC29, download this file, put it on your sdcard, name it update.zip, then reboot your phone while holding down power+home and when you get the recovery screen press alt+L then alt+s.
 

alansj

Member
Nov 6, 2008
44
42
will this work with 30

The general process will work, but the boot image I posted is based on rc29. The two things in the boot img are a kernel and a ramdisk (which includes a few of the basic system files). I don't think there was a kernel update in rc30, but I think there were updates to init.rc and possibly adbd (haven't checked). So, flashing with that boot.img I posted would undo the changes in those files done by rc30.

The better approach would be to take the boot.img from the full rc30 release, add your own initlogo.rle, and reflash from that.

I will now go and write a more detailed tutorial on how to edit boot.img
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    How to create a boot image:
    1. put a properly encoded initlogo.rle in root directory
    2. insert this line in init.rc in the boot: section (optional, this disables the stock android boot animation)
    Code:
    setprop debug.sf.nobootanimation 1
    3. wrap it all up and flash it to mtd2

    Attached:
    1. A boot image with these changes made. To try it on your phone, first back up your mtd2 image (the boot image). Type the following in a root shell to back it up to your sdcard:
    Code:
    cat /dev/mtd/mtd2 > /sdcard/mtd2.img

    Then, unzip boot-rc29-customlogo.img.zip it and stick it on your sdcard and type the following in a root shell:
    Code:
    cat /dev/zero >> /dev/mtd/mtd2
    flash_image boot /sdcard/boot-rc29-customlogo.img
    (when you do the cat, it will tell you "write: No space left on device," which is fine)

    To restore your original boot image, do the cat and then flash_image your mtd2.img backup.

    2. Samples of the raw image as well as the rle encoded version.

    3. A nifty photo of this working on my phone.

    attachment.php
    1
    Huh. Interesting. I'll see if I can give it a whirl. Thanks for posting the info you've found so far :)
    1
    A tool i create to read logo.rle image

    I made a tool, i give you in rle.zip is an executable for win who create a logo.tga image from your logo.rle

    Put your logo.rle in same dir as logo.exe and launch it.
    Then it create logo.tga that you can open with photoshop or other you whant

    See you later
    1
    I found this thread looking for a way to create a new boot logo for my build.

    if I had found this link first in my search i would have saved a lot of time.

    http://www.jetdroid.org/forum/viewtopic.php?f=11&t=678

    you need linux installed on something to complete the process.
    however chances are... if you are looking to do this.. you've already got linux installed in some form or another. (note: initlogo.rle might not be right for your situation.. ie: in my case logo.rle - i just edited the commands to reflect this change). also of note. as far as i can tell rle files have to be 8bit. So keep that in mind when creating or picking a new image.

    all credit goes to the op of that thread.

    hopefully this helps a lot of YOU save some time as well
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone