FORUMS
Remove All Ads from XDA

How to make an Odin flashable .tar from .img

1,367 posts
Thanks Meter: 2,649
 
Post Reply Email Thread
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:

$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5

Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.

Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.

Thanks
The Following 47 Users Say Thank You to sk8erwitskil For This Useful Post: [ View ] Gift sk8erwitskil Ad-Free
 
 
7th February 2012, 12:36 AM |#2  
cdshepherd's Avatar
Senior Member
Thanks Meter: 1,177
 
More
Easiest way I've found to flash a recovery img on skyrocket is to rename recovery file to recovery.img and place it on internal SD. (This won't work if your soft bricked and a tar file will be necessary )

Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk022 in adb shell or terminal emulator.

That should work for any of our recovery images as long as you rename it to recovery.img and put it in your internal SD. I suppose you could replace /sdcard/ with /external_sd/ if you wanted to flash from external SD. Oh and don't be supprised if you catch a little heat for posting this in dev section.

Sent from my SAMSUNG-SGH-I727 using xda premium
The Following 2 Users Say Thank You to cdshepherd For This Useful Post: [ View ] Gift cdshepherd Ad-Free
26th February 2012, 07:07 AM |#3  
Junior Member
Thanks Meter: 2
 
More
Noob question.... Is there a way to do this on windows vs linux?
26th February 2012, 08:08 AM |#4  
sk8erwitskil's Avatar
OP Senior Member
Flag San Jose
Thanks Meter: 2,649
 
Donate to Me
More
Quote:
Originally Posted by cdshepherd

Easiest way I've found to flash a recovery img on skyrocket is to rename recovery file to recovery.img and place it on internal SD. (This won't work if your soft bricked and a tar file will be necessary )

Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk022 in adb shell or terminal emulator.

That should work for any of our recovery images as long as you rename it to recovery.img and put it in your internal SD. I suppose you could replace /sdcard/ with /external_sd/ if you wanted to flash from external SD. Oh and don't be supprised if you catch a little heat for posting this in dev section.

Sent from my SAMSUNG-SGH-I727 using xda premium

dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096

And not sure if there is a windows way. Try googling for Windows tar and md5sum. There most likely is a way.


Sent from my SAMSUNG-SGH-I727 using XDA App
27th March 2012, 02:22 AM |#5  
Senior Member
Thanks Meter: 129
 
More
Thumbs up Thank you
I used your method to flash the clockworkmod touch recovery. It worked flawlessly
27th March 2012, 02:48 AM |#6  
cdshepherd's Avatar
Senior Member
Thanks Meter: 1,177
 
More
Sk8er, I used your method today. Its flawless dude. Thanks

Sent from my SAMSUNG-SGH-I727 using xda premium
9th June 2012, 08:42 AM |#7  
jtdc's Avatar
Senior Member
Flag Geylang
Thanks Meter: 81
 
More
Quote:
Originally Posted by kamgrn

Noob question.... Is there a way to do this on windows vs linux?

funny... nobody bothered to answer this.

The way to do this in Windows as I know:

1. Ensure the fastboot drivers for your device is installed.
2. Acquire the fastboot binary (this is fastboot.exe).
3. Test if fastboot can see your device. Open DOS Command prompt, go to the fastboot binary folder and run "fastboot devices" command.
Example: C:\FASTBOOT\fastboot devices ---> The output should be some sort of serial number.
4. Flash the img file you have via command "fastboot flash boot <image_filename>"
Example: C:\FASTBOOT\fastboot flash boot boot.img
The Following 3 Users Say Thank You to jtdc For This Useful Post: [ View ] Gift jtdc Ad-Free
18th July 2012, 12:38 AM |#8  
ebaul's Avatar
Senior Member
Flag York
Thanks Meter: 32
 
More
Quote:
Originally Posted by jtdc

funny... nobody bothered to answer this.

The way to do this in Windows as I know:

1. Ensure the fastboot drivers for your device is installed.
2. Acquire the fastboot binary (this is fastboot.exe).
3. Test if fastboot can see your device. Open DOS Command prompt, go to the fastboot binary folder and run "fastboot devices" command.
Example: C:\FASTBOOT\fastboot devices ---> The output should be some sort of serial number.
4. Flash the img file you have via command "fastboot flash boot <image_filename>"
Example: C:\FASTBOOT\fastboot flash boot boot.img

What if this is for the note, where there is no fastboot? I can get to odin mode, or to recovery mode, but no fastboot...unless i'm missing something..??

Thanks
The Following User Says Thank You to ebaul For This Useful Post: [ View ] Gift ebaul Ad-Free
3rd August 2012, 06:44 AM |#9  
roqnla's Avatar
Junior Member
Flag Burbank
Thanks Meter: 12
 
More
Thank you for the post. I used your method but to flash TWRP as follows:

1. Downloaded recovery file (openrecovery-twrp-2.2.0-skyrocket.img) for Samsung Skyrocket from TWRP website on Linux.
2. Renamed file to recovery.img
3. Ran the following commands to covert IMG file to a TAR file:
tar -H ustar -c recovery.img > openrecovery-twrp-2.2.0-skyrocket.tar
md5sum -t openrecovery-twrp-2.2.0-skyrocket.tar >> openrecovery-twrp-2.2.0-skyrocket.tar
mv openrecovery-twrp-2.2.0-skyrocket.tar openrecovery-twrp-2.2.0-skyrocket.tar.md5
4. Flashed recovery using ODIN as customary.


It worked flawlessly with no issues. I highly recommend TWRP over CWM Touch Recovery. TWRP wipes things cleanly. You DO NOT have to wipe 3x which will reduce the wear and tear on your device.
The Following User Says Thank You to roqnla For This Useful Post: [ View ] Gift roqnla Ad-Free
5th September 2012, 05:44 AM |#10  
omar300's Avatar
Senior Member
Flag Toronto
Thanks Meter: 74
 
More
Quote:
Originally Posted by ebaul

What if this is for the note, where there is no fastboot? I can get to odin mode, or to recovery mode, but no fastboot...unless i'm missing something..??

Thanks

use samsung tool kit v2.3. i had same issue as u and this page only sort of helped me and i guessed my way to tool kit. you only need to install it and place the recovery you need to transform in its input folder, where ever you installed it. then run it and just follow the instructions its pretty easy.
5th September 2012, 05:58 AM |#11  
mahanddeem's Avatar
Senior Member
Thanks Meter: 124
 
More
Thanks for the Pakistanian guy above me for reviving this vital topic ...

this method is great :
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096

BUT to be sure no leftovers are there :
dd if=/dev/zero of=/dev/block/mmcblk0p22
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096

Can be done inside Android if you're rooted , and a terminal emulator app is installed ...
The Following User Says Thank You to mahanddeem For This Useful Post: [ View ] Gift mahanddeem Ad-Free
Post Reply Subscribe to Thread

Tags
img, recovery, tar

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

Advanced Search
Display Modes