FORUMS

[TOOL] Boot.img tools [unpack, repack, ramdisk]

9,009 posts
Thanks Meter: 14,059
 
By CNexus, Senior Member on 11th June 2013, 03:00 AM
Post Reply Email Thread
mantalamo
23rd January 2014, 04:45 AM |#21  
Guest
Thanks Meter: 0
 
More
Beginner me
are these tools would be enough to edit/modify something in the boot.img? This will be my first attempt. My purpose is to change the boot splash image of a Kernel. With my intent to use this tool, would these suffice my needs? Thanks
29th January 2014, 05:06 AM |#22  
CNexus's Avatar
OP Senior Member
Flag ~/android
Thanks Meter: 14,059
 
Donate to Me
More
Quote:
Originally Posted by johnwilliam_a_k_a_trash

are these tools would be enough to edit/modify something in the boot.img? This will be my first attempt. My purpose is to change the boot splash image of a Kernel. With my intent to use this tool, would these suffice my needs? Thanks

Yes
28th February 2014, 03:45 AM |#23  
oldsoldier2003's Avatar
Senior Member
Flag Eldorado
Thanks Meter: 57
 
Donate to Me
More
Quote:
Originally Posted by CNexus


Note: These tools were made for Linux. They may also work on Cygwin, but I have not personally tested them.

I suspect they were compiled on Ubuntu since Debian stable (wheezy as of this writing) uses an older version of glibc which causes mkbootimg to choke. Debian users will need to upgrade to testing/Jessie (swapping libc is not advisable, it is just better to go with Jessie)
The Following User Says Thank You to oldsoldier2003 For This Useful Post: [ View ] Gift oldsoldier2003 Ad-Free
15th March 2014, 09:50 PM |#24  
oldsoldier2003's Avatar
Senior Member
Flag Eldorado
Thanks Meter: 57
 
Donate to Me
More
Quote:
Originally Posted by oldsoldier2003

I suspect they were compiled on Ubuntu since Debian stable (wheezy as of this writing) uses an older version of glibc which causes mkbootimg to choke. Debian users will need to upgrade to testing/Jessie (swapping libc is not advisable, it is just better to go with Jessie)

Update:
These tools work great on Debian Jessie/SID

I forgot to mention this for folks that are Debian users. Thanks for making these tools accessible to the masses
The Following 2 Users Say Thank You to oldsoldier2003 For This Useful Post: [ View ] Gift oldsoldier2003 Ad-Free
22nd March 2014, 11:16 PM |#25  
Senior Member
Thanks Meter: 99
 
More
How do I use this with Ubuntu?

Sent from my SPH-L710 using XDA Premium 4 mobile app
23rd March 2014, 08:39 PM |#26  
oldsoldier2003's Avatar
Senior Member
Flag Eldorado
Thanks Meter: 57
 
Donate to Me
More
These tools are command line tools you run them from a terminal. See the first part for usage

Sent from my XT1031 using XDA Premium 4 mobile app
10th April 2014, 07:47 PM |#27  
Senior Member
Thanks Meter: 99
 
More
Quote:
Originally Posted by oldsoldier2003

These tools are command line tools you run them from a terminal. See the first part for usage

Sent from my XT1031 using XDA Premium 4 mobile app

Do I have to rename the file after it's extracted to run it in Ubuntu?

Sent from my SPH-L710 using XDA Premium 4 mobile app
30th April 2014, 04:55 AM |#28  
Member
Thanks Meter: 2
 
More
Works with Cygwin
I was able to use scripts with cygwin.

Very cool.
4th May 2014, 07:50 AM |#29  
Inactive Recognized Developer
Flag IHB
Thanks Meter: 4,828
 
Donate to Me
More
Quote:
Originally Posted by oldsoldier2003

I suspect they were compiled on Ubuntu since Debian stable (wheezy as of this writing) uses an older version of glibc which causes mkbootimg to choke. Debian users will need to upgrade to testing/Jessie (swapping libc is not advisable, it is just better to go with Jessie)

God I need to start reading posts more often.... Thanks for the tip....
18th May 2014, 09:54 AM |#30  
nasr18's Avatar
Junior Member
Flag Tirunelveli
Thanks Meter: 2
 
More
Quote:
Originally Posted by CNexus

I have not seen this posted anywhere, so I thought I would post it here. This is NOT purely my work, and I do not take credit for it as such.

Included in the attached ZIP are the following files:

  • boot_info - prints information about the boot.img passed to it, including the base address and ramdisk address. This tool prints out everything needed to repack the boot.img correctly.
  • split_boot - More commonly known as split_bootimg.pl, this rips apart the boot.img to extract the ramdisk and zImage. It has been modified by me to split the boot.img into a separate folder (specified by the file name of the boot.img passed to it) and to extract the ramdisk into a sub-folder as well (extracts the cpio from the gz and then extracts the actual files from the cpio archive)
  • unpack_ramdisk - unpacks the given ramdisk file.
    Code:
    Usage: unpack_ramdisk <ramdiskFile>
  • repack_ramdisk - repacks the ramdisk from the given directory (found online and modified slightly to take a directory)
    Code:
    Usage: repack_ramdisk <ramdiskDirectory> [outputFile]
  • mkbootimg - mkbootimg binary that creates a boot.img file from the given ramdisk and zImage. Updated to a version compiled by me to support the --ramdiskaddr option (ramdisk address) so that even nonstandard boot.img's can be repacked correctly (Use with boot_info for best results).
  • umkbootimg - included for convenience. Not made by me. Original thread here.
  • unpack - wrapper script made by me for the umkbootimg binary^ to unpack the boot.img into a separate directory and then unpack the ramdisk into a sub-directory.

Note: These tools were made for Linux. They may also work on Cygwin, but I have not personally tested them.

ANYONE is free to use / modify / kang these files as they see fit. No need to ever ask or do anything more than download.

Enjoy.


bro I'm having ur file, but don't know how to run. please say it elaborately for me.

hope you will reply.
8th July 2014, 12:50 PM |#31  
kwisatz79's Avatar
Member
Flag Hamburg
Thanks Meter: 29
 
More
Quote:
Originally Posted by Mr_Ada

I was able to use scripts with cygwin.

Very cool.

How did u managed it? I allways get errors that he does not find all the commands.

Thx in advance.
Post Reply Subscribe to Thread

Tags
boot.img, boot.img modify, boot.img splitting, ramdisk, split boot.img

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

Advanced Search
Display Modes