FORUMS
Remove All Ads from XDA

[GUIDE] Unpacking / Repacking Boot.img's and Recovery.img's

1,280 posts
Thanks Meter: 2,051
 
By Peteragent5, Senior Member on 12th February 2012, 08:26 PM
Post Reply Email Thread
Code:
#include <std_disclaimer.h>
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */
All instructions inside!
Windows! YAY

*Cygwin ONLY!
*But if you have your own mkbootimg, mkbootfs (linux) then you can use that

This set of tools is specific to the Samsung Galaxy Gio
~~~~~~~~~~~~~~~~~~~~

*But this can also work on any device
*Just change the base, pagesize, and board for your phone

~~~~~~~~~~~~~~~~~~~~

*Put your recovery.img or boot.img inside the same folder you have the tools in.

Download: bootimg-tools
Download: recoveryimg-tools
The Following 37 Users Say Thank You to Peteragent5 For This Useful Post: [ View ] Gift Peteragent5 Ad-Free
3rd March 2012, 11:12 AM |#2  
jinavs's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 870
 
More
Quote:
Originally Posted by Peteragent5

All instructions inside!
Windows! YAY

*Cygwin ONLY!
*But if you have your own mkbootimg, mkbootfs (linux) then you can use that

This set of tools is specific to the Samsung Galaxy Gio
~~~~~~~~~~~~~~~~~~~~
*But this Tutorial can also work on any device
*Just change the base and pagesize for your phone

Tutorial for above coming soon. Simplified
~~~~~~~~~~~~~~~~~~~~

*Put your recovery.img or boot.img inside the same folder you have the tools in.

Download: bootimg-tools
Download: recoveryimg-tools


Thanks helped me a lott!
The Following 2 Users Say Thank You to jinavs For This Useful Post: [ View ] Gift jinavs Ad-Free
3rd March 2012, 01:55 PM |#3  
czkwg8's Avatar
Senior Member
Thanks Meter: 49
 
More
good job!

失败的中国人正在尝试提高!
5th March 2012, 12:28 AM |#4  
Senior Member
Thanks Meter: 89
 
More
Nice thx! This need cygwin installed to i see (I get the message cygwin1.dll missing)

Is it a problem if my recovery file is a rfs exstention?
5th March 2012, 12:37 AM |#5  
SpaceCaker's Avatar
Senior Member
Flag netherlands
Thanks Meter: 11,016
 
More
how to set directory ?
5th March 2012, 12:54 PM |#6  
Senior Member
Thanks Meter: 89
 
More
Quote:
Originally Posted by spacecaker

how to set directory ?

Install Cygwin. Run the setup 2 times! (Once to install the installer. Second time to install the needed packages. I just let in install all.) Download here: http://www.cygwin.com/
Set path for Cygwin command to work: configuration > System > Advancedsystemsettings > Envirementsettings > "path" and ad behind the line: ;C:\cygwin\bin (Sorry this does not seems to work jet. But you should be able to find out you're self)

I installed Cygwin in the default path. C:\cygwin

If you dont want to set the path you can use the command: c:\cygwin\bin\split_bootimg.pl recovery.rfs
(I did put all stuff with the recovery in the c:\cygwin\bin\ forlder)
5th March 2012, 03:14 PM |#7  
Senior Member
Thanks Meter: 89
 
More
Im stuck on step 2 unpack "recovery.rfs-ramdisk.gz" (unpack-bootimg.pl):

Edit the Ramdisk:
mkdir ramdisk
cd ramdisk
gzip -dc ../recovery.img-ramdisk.gz | cpio -i
cd ..

Here i get the message: cpio is not known als internal ore extrernal command, program ore batchfile.

How to solf this? What other programs did you install for you're phone? Might help out.
5th March 2012, 09:10 PM |#8  
Peteragent5's Avatar
OP Senior Member
Flag Richmond
Thanks Meter: 2,051
 
Donate to Me
More
Quote:
Originally Posted by [email protected]

Im stuck on step 2 unpack "recovery.rfs-ramdisk.gz" (unpack-bootimg.pl):

Edit the Ramdisk:
mkdir ramdisk
cd ramdisk
gzip -dc ../recovery.img-ramdisk.gz | cpio -i
cd ..

Here i get the message: cpio is not known als internal ore extrernal command, program ore batchfile.

How to solf this? What other programs did you install for you're phone? Might help out.

Ok. Run the Cygwin Setup.exe again
Search for cpio and install all
click next and next and install... etc...
Open Cygwin and run the entire bootimg-tools commands again
Hope this helps
The Following 3 Users Say Thank You to Peteragent5 For This Useful Post: [ View ] Gift Peteragent5 Ad-Free
5th March 2012, 09:44 PM |#9  
Senior Member
Thanks Meter: 89
 
More
Quote:
Originally Posted by Peteragent5

Ok. Run the Cygwin Setup.exe again
Search for cpio and install all
click next and next and install... etc...
Open Cygwin and run the entire bootimg-tools commands again
Hope this helps

I already did fix it throwing in the install files from: gzip-1.3.12-1-setup.exe
cpio-2.6-2.exe and cpio-2.6-2-dep.zip (i did put them in C:\cygwin\bin)

Later i used the search option like you told THX
6th March 2012, 12:51 AM |#10  
Senior Member
Thanks Meter: 89
 
More
Thumbs up
Oke i got all commands working.. I build 2 cmd files to run the commands.
Download and putt all files in the cygwin\bin\

Finall recovery and final boot file did have different size for me. Dont know if thats a problem???? (My 2 input file did have same size..)

I made this to make progress more easy and have fun. Still lots of changes needed. Dont use the final files in you finall product yet. Ore you must be sure about how to use the files for you need. I need some feedback first.

Download here:
Recovery tool: http://www.mediafire.com/?w2yivhhk6v51u6a
Boot tool: http://www.mediafire.com/?e8fn54ourxxr37e
Main mediafire.com/ folder: http://www.mediafire.com/myfiles.php#40r2f7d5q02hf Other beta tool there to that seems 2 work?!
Cygwin bin folder with Boot-RecoveryTool V1.1b .rar: http://www.mediafire.com/?b9551okk9a8lrmj

Its been time taking and i need 2 sleep to clear the mind
The Following 3 Users Say Thank You to [email protected] For This Useful Post: [ View ] Gift [email protected] Ad-Free
25th March 2012, 09:07 PM |#11  
anexonel13's Avatar
Senior Member
Flag #MontrealTexas
Thanks Meter: 35
 
More
Hi guys, I am trying it on Linux but everytime I use gunzip -c recovery.img-ramdisk.gz | cpio -i it sayd that it isnt a gzip file?!? What to do?
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