Make/extract RLE files in Windows, the easy way (now with Linux)

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
Here is the easiest method I have found so far to make boot logo rle files. This is SIMPLE and fast!
Note: I did not create this, this is the work of DooMLoRD on XDA. I only simplified it. Original thread is here.

Requirements:
Windows and this file .
Note, systems that shipped with Windows 7 with SP1 pre-installed may not work for some reason.

For Linux, see post 13


Install:
Extract the zip file someplace, I recommend something short because you will have to type the location. I use my D drive and a folder named RLE. So D:\RLE is the location I put these files.

How to create an rle file:
Step 1
Make the image you want to use. It MUST be 320x480 pixels (for the Optimus V).
Step 2
Save the file as a PNG file to the directory you extracted the tool (in my case D:\RLE). I also save the file as a psd so I can later edit it further in a folder specifically for storing this stuff.
Step 3
Go to your start menu and find Command Prompt. This will be in (All) Programs/Accessories.
Step 4
Go to the folder you put the tool, in my case D:\RLE
Step 5
Run the tool, you need to know the name of the png file, again, in my case this is logo.png. Run the tool with the command:
convert_image_to_rle.bat logo.png
You should be left with the raw file, a png file and an rle file, all named logo.
Step 6
Rename the rle file to initlogo.rle and place the file into your build, on CM builds this is:
android/system/device/lge/thunderc/files


How to extract an RLE
Step 1
Copy the initlogo.rle file to your RLE folder, in my case D:\RLE
Step 2
Go to your start menu and find Command Prompt. This will be in (All) Programs/Accessories.
Step 3
Go to the folder you put the tool and rle file, in my case D:\RLE
Step 4
Run the tool with the command:
convert_rle_to_image.bat initlogo.rle
You should be left with a raw and a png file.


Edit: Added new info, corrected some.
 
Last edited:

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

Thanks!

Now to figure out how to make them animated. I was actually shocked by the explosion that turns into the Sprint logo when I tried out the OS Gingerbread update. Very cool!
 

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

Photoshop CS3 will output to .rle format also.

Sent from my IHO LG OP V using Tapatalk

Just because it is an RLE does not make it compatible for what we need.
RLE is rather vague as to it's definition, yet we need a very specific type of file.
 

sharpe351

Well-known member
Jun 23, 2011
128
28
0
Visit site
Just because it is an RLE does not make it compatible for what we need.
RLE is rather vague as to it's definition, yet we need a very specific type of file.
I've used it to build boot animation .rle files for my Gtab without issue.

*edit* I've also used RGB2565 to make the files. If your sizing is right it will work too.

Sent from my IHO LG OP V using Tapatalk
 
Last edited:

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

Photoshop CS3 will output to .rle format also.

Sent from my IHO LG OP V using Tapatalk

I just checked this on Photoshop 4, it does not work with the RLE files we use on the OV. I will not even open the ones we use.

Maybe Photoshop 3 is different, but I suspect it has to do with the differences between RLE file types.
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Ill try this, looks like it should work. If you want to get rid of the virgin mobile logo when it boots up, make your own .rle images and replace the ones found in /system/bootimages/ just make sure that you name the files the same as the ones you replace or they wont play on startup. You will have to use teminal emulator probably to get the images from your sd to the bootimages file
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

Question: when entering the name of the file into command prompt, how do you put it in? I have a file called sprint_power_on_00.rle located in C:\Users\Anthony\Desktop, but I can't get the sytax right so the command can't find the file.
 
Feb 19, 2011
1,971
284
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

I don't like windoze, but if I remember my msdos right,
Code:
convert_rle_to_image.bat C:\Users\Anthony\Desktop\sprint_power_on_00.rle
might work...
the instructions say to move the file you want to convert to the directory with the batch file, though, so there's a chance it won't parse the long path.
 

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

Question: when entering the name of the file into command prompt, how do you put it in? I have a file called sprint_power_on_00.rle located in C:\Users\Anthony\Desktop, but I can't get the sytax right so the command can't find the file.

If the converter files are in the same folder as the images, you would use:
convert_rle_to_image.bat sprint_power_on_00.rle

If they are a different folder you will need to have command prompt in the directory of the program and use something like:
convert_rle_to_image.bat C:\Users\Anthony\Desktop\sprint_power_on_00.rle
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Re: Make/extract RLE files in Windows, the easy way

I finally figured out how to use Gimp together with ImageMagick and to565 to create RLEs in Ubuntu.

Gimp
-- Start with a PNG image
-- Under the Image tab, set the mode to indexed at 16 colors. If it's already set to indexed, set it to RGB, then set it back to indexed at 16 colors.
-- In the Layers window, first merge all layers together (can be tricky), then right-click and select remove alpha channel (this may mess up your image, transparency isn't allowed though)
-- Save as a PNG file, and uncheck all boxes in the PNG dialog, leaving compression at 9.

ImageMagick
-- Use the Convert function to change the PNG to a RAW format:
Code:
convert -depth 8 MY_IMAGE.png rgb:MY_IMAGE.raw

rgb2565
-- Convert the RAW image to RLE format:
Code:
rgb2565 -rle < MY_IMAGE.raw > MY_IMAGE.rle

To build the rgb2565 executable, after setting your normal . build/envsetup.sh command, run:
Code:
mmm build/tools/rgb2565
The resulting executable will be in out/host/linux-x86/bin/rgb2565. Move the executable to your /bin folder for easy access.
(be sure you have set the bin path per building instructions for Android).

Now we can use either Windows7 (pre service pack 1) or Ubuntu (or any Linux distro) to create our own first bootanimations! I can make shell scripts to make it easier similar to LeslieAnn's Windows batch files if people need it. ;)
 

LeslieAnn

Android Developer
Feb 8, 2011
2,895
1,720
0
Visit site
Re: Make/extract RLE files in Windows, the easy way (now with Lin

I corrected the first post and title, and added some info.

Changes:
Added reference to Jerry's post regarding Linux.
Added a bout systems that shipped with Windows 7 with SP1 pre-installed not always working.

Also,
For some reason I said you needed RAW files, you actually need PNG. I'm not sure why I had it that way except maybe it worked that way before but does not now.
 
  • Like
Reactions: JerryScript

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Re: Make/extract RLE files in Windows, the easy way (now with Lin

Here's a shell script that will batch convert a series of PNG images (saved in the proper format) to RLE format, and name the appropriately for use in the first bootanimation. It can be easily modified to do the same for the battery charger images.

Place the images together with a copy of rgb2565 and this shell script's sh file in the same folder, I would recommend making a folder just for this purpose. Name the images in numerical fashion, ie image00.png, image01.png, image02.png, etc. Then run the shell script in a command prompt.
Code:
#! /bin/sh
echo "Converting all png images in the current directory to rle format..."
count=100
for img in *.png; do
  filename="${img%.*}"
  convert -depth 8 "${filename}.png" rgb:"${filename}.raw"
  rgb2565 -rle < "${filename}.raw" > "sprint_power_on_${count:1}.rle"
  rm -f "${filename}.raw"
  count=`expr $count + 1`
done
read -p "Finished converting images, press enter to continue..." nothing

#    Usage: 
#    . NAME_OF_SH_FILE.sh
 
Last edited:

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
Re: Make/extract RLE files in Windows, the easy way (now with Lin

Cannot find any working link to get rgb2565, does anyone have for Linux. I have a good one png 2 rle convert for windows but having one for Linux and using Jerries script would be easier.
 

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
Re: Make/extract RLE files in Windows, the easy way (now with Lin

You can build it after syncing from an Android repo. I attached it to save you some time, built on Ubuntu.
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
Re: Make/extract RLE files in Windows, the easy way (now with Lin

Jerry is it okay if I mod your png to rle script just a bit and share it?
 

anthonycr

Themer. You've seen them
Jul 11, 2011
2,104
571
0
Visit site
Now that I figured out how to decompile the boot.img I thought I'd change the virgin mobile splash to something I like better.
So......

I made a series of png images in Paint.NET, saved them as sprint_power_on_00.png, etc... and tried using the converter, but ran into trouble.

Both the pngs and the converter are in the same folder, so I open command prompt (I'm running windows 7), and type:
Code:
C:\Users\Anthony\Desktop\converter\convert_image_to_rle.bat C:\Users\Anthony\Desktop\converter\sprint_power_on_00.png

Then I get the:
Converting image to rle
Cannot find path specified

I'm frustrated. I know most of you use linux, but could anyone have mercy on a poor windows user?:p

I've also tried straight up dropping the png right onto the batch file, and I get the same error.

I also tried dragging the batch file into command prompt (so I don't have to type it) and then drag the png in. I get the same error every time.

What the heck!!!! The png file is most certainly sitting there in path specified, despite what the prompt thinks.

Sent from my VM670 using Tapatalk 2
 

Trending Posts

Forum statistics

Threads
943,123
Messages
6,917,378
Members
3,158,834
Latest member
asha_kanta_sharma