FORUMS
Remove All Ads from XDA

How to unpack, edit and repack boot.img

184 posts
Thanks Meter: 57
 
By nikki2325, Senior Member on 8th July 2011, 05:56 PM
Post Reply Email Thread
*** I TAKE NO CREDIT. I JUST MADE A GUIDE TO HELP YOU***

A STEP BY STEP TUTORIAL :

I find many people struggling with unpacking a boot image and expecially repacking it. So here is a simple guide to unpack and repack the boot image.

>You need some tools so make sure you download all these.
List : (links available at bottom of page

split_bootimg.pl
repack_bootimg.pl
dsixda kitchen (you need some files from here)
Not to mention, a linux based system

> First you need to make some correction to repack_bootimg file(if downloaded from other source) . open it using gedit or some editor.

> check third line from bottom which is starting with system...If it is ending with $ARGV[2] then make this change

Add --base 0x19200000 and then close with " .

This now should look like

$ARGV[2] --base 0x19200000");

> Save it and exit. Now place boot.img and the two files in a folder(create new one. Don't mess it up)

> Now go to dsixda kitchen folder >tools >mkboot and copy all the files to your working directory

> Now you have mkbootfs.c and mkbootimg.c files along with needed header files. You have to make them executable. For that, run this command

gcc -o mkbootfs mkbootfs.c

change the permissions

chmod a+x ....(path)/mkbootfs

Now do the same for mkbootimg.c

gcc -o mkbootimg mkbootimg.c

change the permissions

chmod a+x ....(path)/mkbootimg

Now you are ready to go. Just navigate to directory in command prompt and type

./split_bootimg.pl boot.img
(or)
perl split_bootimg.pl boot.img

you will get some files. one is kernel and other is ramdisk. extract ramdisk.gz. Now again extract ramdisk(cpio file) . Make necessary changes.

To repack, use this command

perl repack-bootimg.pl <kernel_name> ramdisk_directory_name boot.img

( you need mkbootimg for this to work)

Bingo you have a boot.img which is ready to test.


LINKS :

Split_bootimg.pl : http://www.mediafire.com/?i4omee9loaxawtk

Repack_bootimg.pl : http://www.mediafire.com/?sthhkkkkctdvb3d

dsixda kitchen : http://forum.xda-developers.com/showthread.php?t=633246
The Following 3 Users Say Thank You to nikki2325 For This Useful Post: [ View ] Gift nikki2325 Ad-Free
 
 
9th July 2011, 02:44 AM |#2  
Member
Flag nanchang jx province
Thanks Meter: 1
 
More
IS YOUR dsixda kitchen FIX FOR MOTO ?
9th July 2011, 08:36 AM |#3  
OP Senior Member
Flag Hyderabad
Thanks Meter: 57
 
More
Quote:
Originally Posted by duansindo

IS YOUR dsixda kitchen FIX FOR MOTO ?

If you are talking about using the kitchen for motorola, it supports only few devices.

Motorola Atrix (unconfirmed)
Motorola CLIQ / CLIQ XT
Motorola Droid (unconfirmed)
Motorola Milestone (unconfirmed) - you may need to remove the boot.img before building

here is moto list...If you are talking about repacking n stuff, it supports any vendor.
9th July 2011, 01:04 PM |#4  
Senior Member
Thanks Meter: 3
 
More
godson32
can sum1 plz help me.... i have evo root 2.2 i was trying to nandriod backup in restore . once i got done doing both i rebooted sys. all i get is the while htc evo screen oh ima noob, plz sum one help, oh im running clockworkmod recovery v2.6.0.1
9th July 2011, 04:36 PM |#5  
Senior Member
Flag Brighton IL
Thanks Meter: 566
 
More
Quote:
Originally Posted by godson32

godson32
can sum1 plz help me.... i have evo root 2.2 i was trying to nandriod backup in restore . once i got done doing both i rebooted sys. all i get is the while htc evo screen oh ima noob, plz sum one help, oh im running clockworkmod recovery v2.6.0.1

Try the evo forum.
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