FORUMS
Remove All Ads from XDA

[TOOL][v1.3.2] Change bootlogo (and other images) with imgdata tool

1,544 posts
Thanks Meter: 1,193
 
Post Reply Email Thread
What is imgdata tool?

It is a tool to extract images like the bootlogo from the partition called imgdata. Then you can change these images with gimp or photshop then repack them into a new imgdata image and flash it to your device and see your new custom bootlogo or fastboot menu.

Instructions
  1. Download imgdata tool from here or from the attachments.
  2. Run start.bat script if you are a windows user or run start script if you are a linux or mac user.
  3. Verify your phone's model by exactly typing NEXUS 5.
  4. Select option number 1 called Extract imgdata.
  5. Drag and drop the imgdata.img file from stock folder to imgdata tool or type the path to imgdata.img.
  6. The folder with the extracted images should pop-up. If it does not happen you will find the images in the images folder.
  7. Edit the desired images.
  8. Edit pos.txt:
    • Never change the entries line and never remove any line.
    • First column is the name of the image second column is the position of the image.
    • 0x0 means the image will be shown on your screen in the top left corner.
    • If it is 0x1 the image move 1 pixel down.
    • If it is 1x0 the image will move 1 pixel right.
    • If it is 281x868 the image will move 281 pixels right and 868 pixels down.
  9. You can check your changes in option number 2 called Preview from the main menu in the imgdata tool. It should open the image you selected or open the preview folder if you selected the option View all. If it does not happen then the preveiw images can be found in the folder called preveiws.
  10. When you finished editing the images you can build a new imgdata from the images you edited by selecting option number 3 called Build imgdata from the main menu in the imgdata tool.
  11. After the building finished you can flash the zip called flash-me.zip to flash the new imgdata to your phone or if you want you can flash it using imgdata tool.

Notes
  • Only 24 bit bmp files are acceptable.
  • You can find the custom imgdata image in the folder called custom after the building.
  • The maximum file size of the imgdata.img is 3145728 bytes (3 MiB). The tool will show you an error if that happens and it will ask you do you want to reduce the color depth of an image from 24 bit to 16 bit. If you still exceed the 3 MiB limit you can resize other images which are not important to you to a 1x1 pixel image.
  • If you want to use full screen images in the fastboot menu, then it will cover the system texts.
  • If a new bootloader is released stop using the tool until I check whether the imgdata changed or not.
  • Working with bootloader versions up to HHZ20f
Changelog

1.3.2
Quote:

Linux 32 and 64 bit binaries
Making clear this tool is for Nexus 5 and not for Nexus 5X
Added missing entries for 16 bit menu

1.3.1
Quote:

Added full support for imgdata.img after the HHZ12h bootloader update.
Added padlock image to the oem unlock screen in the preview option.

1.3.0
Quote:

Linux and mac support.
Start.bat now adds C:\Windows\System32 and C:\Windows\SysWOW64 to the path environment variable if they are missing.
For imgdata binary: 16bit switch now checks the input file to determine is it a valid bmp file.

1.2.1
Quote:

16 bit conversion: does in one step when you open an image with gimp then save it as 16 bit then reopen and save it as 24 bit.
the original image will get "o-" tag to the begining of its name

1.2.0
Quote:

Preview function.
Option for flash with adb or fastboot.
Added more-space.img to the custom folder. I removed padlock, fastboot background, downloadmode screen and I minimalized fastboot screen and oem unlock screen to gain more space for custom boot logos.

1.1.1
Quote:

Support for Gimp

1.1.0
Quote:

Built from reworked code.

1.0.1
Quote:

Added file size check for new-imgdata.img

1.0.0
Quote:

First public version


Sources
https://github.com/bitdomo/imgdata/tree/hammerhead

Technical details
Structure of imgdata


Partition header

Quote:

DATA1: 8 byte string. It says IMGDATA!. It is similar to the begining of boot.img and recovery.img that says ANDROID!
DATA2: I don't know.
DATA3: Number of images. It is 12.
8 bytes of 0: I dont know the purpose of that

Image headers

Quote:

DATA4: 16 byte string. Tells the name of the image.
DATA5: image width in pixel
DATA6: image height in pixel
DATA7: X position of the image in pixel
DATA8: Y position of the image in pixel
DATA9: it tells where is the begining of the picture on imgdata
DATA10: size of the image

This pattern goes on, from DATA4 to DATA10.

Structure of the images

It consist of 4 bytes of chunks.
  • First byte: count number
  • Second byte: R value
  • Third byte: G value
  • Fourth byte: B value

Example:

05 00 00 00 02 FF FF FF

05: count number = 5
00 00 00: RGB value = black

02: count number = 2
FF FF FF: RGB value = white

So from the top left corner of your screen you would see 5 black pixels then 2 white pixels.
Attached Files
File Type: zip imgdata-tool-v131.zip - [Click for QR Code] (4.42 MB, 812 views)
File Type: zip imgdata-tool-v132.zip - [Click for QR Code] (8.96 MB, 1676 views)
The Following 102 Users Say Thank You to bitdomo For This Useful Post: [ View ] Gift bitdomo Ad-Free
 
 
27th May 2014, 01:37 AM |#2  
Paradoxxx's Avatar
Recognized Contributor
Flag Nimes
Thanks Meter: 5,784
 
Donate to Me
More
Interesting post, and very well made.

Glad some people are still looking into hacking this bad boy up.

Good job, subscribed.

Envoyé de mon Nexus 5 en utilisant Tapatalk
The Following 3 Users Say Thank You to Paradoxxx For This Useful Post: [ View ] Gift Paradoxxx Ad-Free
27th May 2014, 01:15 PM |#3  
OP Senior Member
Flag Göd
Thanks Meter: 1,193
 
Donate to Me
More
I managed to decode the structure of the images. It consist of 4 bytes of chunks.

First byte: countnumber
Second byte: R value
Third byte: G value
Fourth byte: B value

Example:

05 00 00 00 02 FF FF FF

05: countnumber = 5
00 00 00: RGB value = black

02: countnumber
FF FF FF: RGB value = white

So from the top left corner of your screen you would see 5 black pixels then 2 white pixels.

I wrote a C program which converts these raw images to bmp images. So my guessing was right about the Image headers in the first post.

I will later post that program with an option to convert bmp files to raw files.

If you want to write your own program then here are a few hint:

BMP stores pixel values in BGR order while the pixels stored in RGB order in the raw file.

BMP picture starts from bottom left corner while the raw file starts from top left corner.

In a BMP file the size of a pixel row in bytes has to be multiple of 4. Lets say you have 2x1 bmp picture. (width x height, column x row) . You have 2 pixels.
Each pixel stored on 3 bytes (BGR). 2*3=6.
6%4 = 2 so you have to add two more bytes to the row, then 8%4 will be = 0.

Tapatalk-kal küldve az én Nexus 5-el
The Following 15 Users Say Thank You to bitdomo For This Useful Post: [ View ] Gift bitdomo Ad-Free
28th May 2014, 09:50 PM |#4  
OP Senior Member
Flag Göd
Thanks Meter: 1,193
 
Donate to Me
More
IT WORKS!

https://www.youtube.com/watch?v=UMKgpVVjLgI

I have just finished with the imgdata builder/extractor app, but before I share it with you all I want to make some tests and debugs to make sure everything works perfectly.
The Following 16 Users Say Thank You to bitdomo For This Useful Post: [ View ] Gift bitdomo Ad-Free
28th May 2014, 10:53 PM |#5  
Paradoxxx's Avatar
Recognized Contributor
Flag Nimes
Thanks Meter: 5,784
 
Donate to Me
More
Quote:
Originally Posted by bitdomo

IT WORKS!

https://www.youtube.com/watch?v=UMKgpVVjLgI

I have just finished with the imgdata builder/extractor app, but before I share it with you all I want to make some tests and debugs to make sure everything works perfectly.

Good job dude. This is what I call true development.

EDIT : Change the title, I'm trying to make it to front page as a news

EDIT 2 : Just checked the imgdata rar, so basically we could even change the tiny "unlocked" logo at the bottom of the booting screen?

The Following 2 Users Say Thank You to Paradoxxx For This Useful Post: [ View ] Gift Paradoxxx Ad-Free
28th May 2014, 10:56 PM |#6  
simms22's Avatar
Recognized Contributor - R.I.P
BROOKLYN!
Thanks Meter: 26,907
 
More
Quote:
Originally Posted by bitdomo

IT WORKS!

https://www.youtube.com/watch?v=UMKgpVVjLgI

I have just finished with the imgdata builder/extractor app, but before I share it with you all I want to make some tests and debugs to make sure everything works perfectly.

+1(out of thanks)
neat
The Following User Says Thank You to simms22 For This Useful Post: [ View ] Gift simms22 Ad-Free
28th May 2014, 11:10 PM |#7  
CRIME INC.'s Avatar
Senior Member
Flag HENDERSONVILLE
Thanks Meter: 1,955
 
More
Man this is awesome!! Good job bro

Sent from my HAMMERHEAD
28th May 2014, 11:51 PM |#8  
Senior Member
Flag Peel, Isle of Man
Thanks Meter: 266
 
More
Great work well done mate
29th May 2014, 01:51 AM |#9  
markusf21's Avatar
Senior Member
Flag LaPorte, IN
Thanks Meter: 232
 
More
Great work dude, I've been waiting for this

Sent from my OmniROM toting Nexus 5
29th May 2014, 02:06 AM |#10  
OP Senior Member
Flag Göd
Thanks Meter: 1,193
 
Donate to Me
More
Quote:
Originally Posted by Paradoxxx

Good job dude. This is what I call true development.

EDIT : Change the title, I'm trying to make it to front page as a news

EDIT 2 : Just checked the imgdata rar, so basically we could even change the tiny "unlocked" logo at the bottom of the booting screen?

To "EDIT": What should be the new title?
To "EDIT2": Yes we could, and many other pictures.

All the images we can edit is in the attachments.
Attached Files
File Type: rar images.rar - [Click for QR Code] (337.0 KB, 315 views)
The Following 2 Users Say Thank You to bitdomo For This Useful Post: [ View ] Gift bitdomo Ad-Free
29th May 2014, 09:27 AM |#11  
Elluel's Avatar
Senior Member
Flag えうれる
Thanks Meter: 3,230
 
More
Quick progress lol.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes