[HOW-TO]Create Custom ODIN Images for Backup/Restore

Search This thread

manoranjan2050

Senior Member
Dec 26, 2011
1,087
1,417
JAGATSINGHPUR
manoranjan2050.org
help me ..............

i'm trying to backup but some error please help me





error is

# dd if=/dev/block/st110 of=/stcard/factoryfs.rfs bs=4096
dd if=/dev/block/st110 of=/stcard/factoryfs.rfs bs=4096
/dev/block/st110: cannot open for read: No such file or directory
#


whats problem


Galaxy Y Duos GT-S6102
 

lordredneck

Member
Dec 3, 2009
6
0
this odin stuff dont work

i have samsung galaxy note sgh-i717 rooted, i use odin to flash roms all the time with lots of trouble.

1- if i flash a rom like onlyone it will flash but get lost at boot screen, only once it worked and now i cant get the rom back. stock roms no sweat ????

2- odin backup .. does not let me use the commands you list, says no such location, adb only sees phone when not in recovery, in recovery it sees something called recovery but dont let me do nothing....


im lost all i want is to flash custom rom without a boot hang and back it up.
i used nand to backup but none of my personal stuff was saved......
 

ramzidjoudi

Senior Member
Jun 12, 2011
286
85
tjank you for this great tuto
i have s5830i
i succefully done the procedure and backup (factoryfs.rfs + recovery.bin + zImage)
and then with cygwin termainal i compile the one package file succes



i have now this file s5830ixxla2.tar.md5

but the odin don't flash onepackage files for this phone

sow i follow the way to split it (with splitfus2) but i have error (error decoding filename)



is there any kind of command to have 03 files flashable with odin?
 

shrike1978

Senior Member
Jun 28, 2011
3,577
3,077
Atlanta, GA
i have samsung galaxy note sgh-i717 rooted, i use odin to flash roms all the time with lots of trouble.

1- if i flash a rom like onlyone it will flash but get lost at boot screen, only once it worked and now i cant get the rom back. stock roms no sweat ????

2- odin backup .. does not let me use the commands you list, says no such location, adb only sees phone when not in recovery, in recovery it sees something called recovery but dont let me do nothing....


im lost all i want is to flash custom rom without a boot hang and back it up.
i used nand to backup but none of my personal stuff was saved......

tjank you for this great tuto
i have s5830i
i succefully done the procedure and backup (factoryfs.rfs + recovery.bin + zImage)
and then with cygwin termainal i compile the one package file succes



i have now this file s5830ixxla2.tar.md5

but the odin don't flash onepackage files for this phone

sow i follow the way to split it (with splitfus2) but i have error (error decoding filename)



is there any kind of command to have 03 files flashable with odin?

These instructions are for the Samsung Charge. Different phones can and will have different filesystem locations. You need to be sure before doing any of this that you have the locations right.
 

dwitherell

Retired Forum Moderator
May 2, 2011
4,061
9,253
These instructions are for the Samsung Charge. Different phones can and will have different filesystem locations. You need to be sure before doing any of this that you have the locations right.

And once you are sure - you don't need to package all the files into a single .tar. You'll just need to run the commands three times. Assuming the packages are bundled correctly in regards to your phone, it would just be something along the lines of:
tar -H ustar -c factoryfs.rfs > whateveryouwannacallit.tar
tar -H ustar -c recovery.bin > someothername.tar
tar -H ustar -c zImage > yetanothername.tar

And then running the md5 stuffs on each.
 

ramzidjoudi

Senior Member
Jun 12, 2011
286
85
And once you are sure - you don't need to package all the files into a single .tar. You'll just need to run the commands three times. Assuming the packages are bundled correctly in regards to your phone, it would just be something along the lines of:
tar -H ustar -c factoryfs.rfs > whateveryouwannacallit.tar
tar -H ustar -c recovery.bin > someothername.tar
tar -H ustar -c zImage > yetanothername.tar

And then running the md5 stuffs on each.

thank you for reply
please tell me what file are for PDA and PHONE and CSC (for odin)
 

shrike1978

Senior Member
Jun 28, 2011
3,577
3,077
Atlanta, GA
thank you for reply
please tell me what file are for PDA and PHONE and CSC (for odin)

PDA is the only one we use. Occasionally PIT, but you need a valid PIT file for your phone before you try to use it, and it normally shouldn't be necessary. Generally, everything goes in PDA.

I've used CSC on my Tab, but I don't actually know what it does.

Oddly, the fastest way to permanently screw up your phone is to use the PHONE option.
 

lordredneck

Member
Dec 3, 2009
6
0
I want to be able to make my own Odin flash able recovery for my sgh-i717 galaxy note but all the instructions I find don't work. Its the file locations that appear to be wrong.

Sent from my SAMSUNG-SGH-I717 using xda premium
 

TheVrolok

Member
Jun 25, 2011
27
0
Similar issue to others with a flash failing at cache.rfs every single time. Do I have any options other than untaring, tearing out the personal data (which is my primary purpose for the restore), and trying it without?
 

MotoDefier

Senior Member
Aug 4, 2011
360
158
41
Flower Mound
I'm sure several people will be wanting this information, so I figured I would post it here for everyone. This will allow you to backup your system and create custom Odin images for restore purposes. For anyone unfamiliar with the Samsung system, they use Odin to flash things to the device, much like HTC has RUU and Moto has SBF. Odin files are either .tar files, or .tar.md5 files.

The .tar.md5 files are .tar files with the md5 checksum added to the end of the file. If you attempt to flash a .tar.md5 file, Odin will automatically check that the contents are what they should be before flashing and proceed with the flash if the md5 is valid, otherwise it will stop.

In Odin, you should use the PDA button for all flashing. The PIT button may be used as well, if we can get a valid .pit file for the device, but for now, PIT won't be used either. Other than PDA, Start/Reset are the only other buttons you need to worry about.

Now, on to creating the backup files. First, you will need your device to be rooted (perm or temp root will work), and you also need to have access to terminal on the phone, either via an emulator or adb shell access. To create the backup files, you won't need a Linux/UNIX system, but you will if you want to create a flashable Odin package. The following will output the files on the root of the SDCard, adjust the "of=" path if you want them somewhere else. It will also create the files for the proper filename for Odin as well. So to create the files, here are the commands you will use from root shell (#):

System:
Code:
dd if=/dev/block/stl10 of=/sdcard/factoryfs.rfs bs=4096

Kernel:
Code:
dd if=/dev/block/bml8 of=/sdcard/zImage bs=4096

Recovery:
Code:
dd if=/dev/block/bml9 of=/sdcard/recovery.bin bs=4096

DO NOT INCLUDE THE FOLLOWING IN ANYTHING BUT A PERSONAL BACKUP
Cache:
Code:
dd if=/dev/block/mmcblk0p3 of=/sdcard/cache.rfs bs=4096

DBData:
Code:
dd if=/dev/block/stl11 of=/sdcard/dbdata.rfs bs=4096

Data:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/movinand.bin bs=4096

The last three files (cache, dbdata, data) may contain personal information, so do not include these 3 files in anything but a personal backup/recovery package.

To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer. From there, you use the following to create the package:
Code:
tar -H ustar -c factoryfs.rfs recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5

If you want to include cache/dbdata/data in the above for personal use, just add them after the "-c" and before the ">".

There are other files that may be in Odin packages, but they are protected by Samsung and cannot be dumped properly. The files are the bootloader, secondary bootloader, modems, and .lfs partitions. The files would be boot.bin, Sbl.bin, modem.bin (not sure what it would be for the CDMA/LTE dual modem here), and param.lfs. It however isn't that big of an issue that these can't be dumped as the can't really be altered by normal flashing of the device, and are usually only altered via OTA updates.


You wouldn't happen to know what to dd for an odin rom for the T999L would you, I see you are talking about dd if=/dev/block/st|11 for dbdata this isn't a partition on the T999L is that because it uses ext4 filesystem?
Sent from my SGH-T999L using xda app-developers app
 

dwitherell

Retired Forum Moderator
May 2, 2011
4,061
9,253
You wouldn't happen to know what to dd for an odin rom for the T999L would you, I see you are talking about dd if=/dev/block/st|11 for dbdata this isn't a partition on the T999L is that because it uses ext4 filesystem?
Sent from my SGH-T999L using xda app-developers app

I'm pretty sure you can figure out some of the partition locations by using adb mount or running mount using something like terminal emulator on the phone. Hope that helps!
 

bob_ross

Senior Member
Jul 18, 2012
130
13
I have a Sprint GS3 rooted and I get this:

dd if=/dev/block/stl10 of=/sdcard/factoryfs.rfs bs=4096
The system cannot find the file specified.

:confused:
 

bob_ross

Senior Member
Jul 18, 2012
130
13
Try dd if=/dev/block/mmcblk0p14 of sdcard/system.img bs=4096

Sent from my SGH-T999L using xda app-developers app

Still getting the same error.

Does my phone need to be in some special mode for this to work or can I just plug in the USB? when I type "adb devices" I do get a serial # back so I assume I'm good to go?
 
Last edited:

MotoDefier

Senior Member
Aug 4, 2011
360
158
41
Flower Mound
Still getting the same error.

Does my phone need to be in some special mode for this to work or can I just plug in the USB? when I type "adb devices" I do get a serial # back so I assume I'm good to go?

Dump is run In Shell so it should look like this

Adb.exe
Adb devices
Adb shell
Su
dd if=/dev/block/mmcblk0p14 of=/sdcard/system.img bs=4096 the 0 in mmcblk(0)p is a zero just to make sure you have it typed right

Sent from my SGH-T999L using xda app-developers app
 
  • Like
Reactions: bob_ross

bob_ross

Senior Member
Jul 18, 2012
130
13
Dump is run In Shell so it should look like this

Adb.exe
Adb devices
Adb shell
Su
dd if=/dev/block/mmcblk0p14 of=/sdcard/system.img bs=4096 the 0 in mmcblk(0)p is a zero just to make sure you have it typed right

Sent from my SGH-T999L using xda app-developers app

That did the trick! Thank you!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    I'm sure several people will be wanting this information, so I figured I would post it here for everyone. This will allow you to backup your system and create custom Odin images for restore purposes. For anyone unfamiliar with the Samsung system, they use Odin to flash things to the device, much like HTC has RUU and Moto has SBF. Odin files are either .tar files, or .tar.md5 files.

    The .tar.md5 files are .tar files with the md5 checksum added to the end of the file. If you attempt to flash a .tar.md5 file, Odin will automatically check that the contents are what they should be before flashing and proceed with the flash if the md5 is valid, otherwise it will stop.

    In Odin, you should use the PDA button for all flashing. The PIT button may be used as well, if we can get a valid .pit file for the device, but for now, PIT won't be used either. Other than PDA, Start/Reset are the only other buttons you need to worry about.

    Now, on to creating the backup files. First, you will need your device to be rooted (perm or temp root will work), and you also need to have access to terminal on the phone, either via an emulator or adb shell access. To create the backup files, you won't need a Linux/UNIX system, but you will if you want to create a flashable Odin package. The following will output the files on the root of the SDCard, adjust the "of=" path if you want them somewhere else. It will also create the files for the proper filename for Odin as well. So to create the files, here are the commands you will use from root shell (#):

    System:
    Code:
    dd if=/dev/block/stl10 of=/sdcard/factoryfs.rfs bs=4096

    Kernel:
    Code:
    dd if=/dev/block/bml8 of=/sdcard/zImage bs=4096

    Recovery:
    Code:
    dd if=/dev/block/bml9 of=/sdcard/recovery.bin bs=4096

    DO NOT INCLUDE THE FOLLOWING IN ANYTHING BUT A PERSONAL BACKUP
    Cache:
    Code:
    dd if=/dev/block/mmcblk0p3 of=/sdcard/cache.rfs bs=4096

    DBData:
    Code:
    dd if=/dev/block/stl11 of=/sdcard/dbdata.rfs bs=4096

    Data:
    Code:
    dd if=/dev/block/mmcblk0p1 of=/sdcard/movinand.bin bs=4096

    The last three files (cache, dbdata, data) may contain personal information, so do not include these 3 files in anything but a personal backup/recovery package.

    To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer. From there, you use the following to create the package:
    Code:
    tar -H ustar -c factoryfs.rfs recovery.bin zImage > package_name.tar
    md5sum -t package_name.tar >> package_name.tar
    mv package_name.tar package_name.tar.md5

    If you want to include cache/dbdata/data in the above for personal use, just add them after the "-c" and before the ">".

    There are other files that may be in Odin packages, but they are protected by Samsung and cannot be dumped properly. The files are the bootloader, secondary bootloader, modems, and .lfs partitions. The files would be boot.bin, Sbl.bin, modem.bin (not sure what it would be for the CDMA/LTE dual modem here), and param.lfs. It however isn't that big of an issue that these can't be dumped as the can't really be altered by normal flashing of the device, and are usually only altered via OTA updates.
    3
    D
    Deleted member 5132789
    The other option would be using Cygwin, but I've never tried it, so it may or may not work.

    cygwin works!

    Edit: Here is how:

    1. Search google for cygwin - download
    2. Run - you will be prompted to get packages - I assumed "archive" was a good place to start - not sure if you need this or not...
    3. When complete you will see a new icon on your desktop - double-click
    4. Be patient as it loads
    5. Copy the files output'ed from first post to same folder on PC
    6. Back in cygwin:
    a. cd x: (where x: is the drive letter of the drive that has the folder with the files)
    b. tar -H ustar -c cache.rfs dbdata.rfs movinand.bin factoryfs.rfs recovery.bin zImage > package_name.tar
    c: md5sum -t package_name.tar >> package_name.tar
    d: mv package_name.tar package_name.tar.md5

    Complete output of commands:

    These files are for the users to personalise their cygwin experience.

    They will never be overwritten nor automatically updated.

    `./.bashrc' -> `/home/UWINKET//.bashrc'
    `./.bash_profile' -> `/home/UWINKET//.bash_profile'
    `./.inputrc' -> `/home/UWINKET//.inputrc'
    `./.profile' -> `/home/UWINKET//.profile'
    Your group is currently "mkgroup". This indicates that neither
    your gid nor your pgsid (primary group associated with your SID)
    is in /etc/group.

    The /etc/group (and possibly /etc/passwd) files should be rebuilt.
    See the man pages for mkpasswd and mkgroup then, for example, run

    mkpasswd -l [-d] > /etc/passwd
    mkgroup -l [-d] > /etc/group

    Note that the -d switch is necessary for domain users.

    user@computer ~
    $ cd h:

    System Volume Information

    user@computer /cygdrive/h
    $ cd downloads

    user@computer /cygdrive/h/downloads
    $ cd charge

    user@computer /cygdrive/h/downloads/charge
    $ cd tarbackup/

    user@computer /cygdrive/h/downloads/charge/tarbackup
    $ tar -H ustar -c cache.rfs dbdata.rfs movinand.bin factoryfs.rfs recovery.bin
    zImage > package_name.tar

    user@computer /cygdrive/h/downloads/charge/tarbackup
    $ md5sum -t package_name.tar >> package_name.tar

    user@computer /cygdrive/h/downloads/charge/tarbackup
    $ mv package_name.tar package_name.tar.md5

    user@computer /cygdrive/h/downloads/charge/tarbackup
    $
    2
    Thanks!

    Thanks for posting this. I'm going to attempt to make a personal backup and then I can factory reset the phone and make a stock version for people to use. I'm haven't installed the update yet either, so I'm hoping this will let people get back to ED1. I've also been playing around with theming using the fascinate community rom theme and ninjamorph to swap files. It'll take a while, but it's currently the only way I feel safe messing with framework-res.
    1
    Will this method work for the Fascinate as well? Just want to verify before I create a paperweight.

    The method will work, but you need to use the proper device locations to dump from. Most things are just the current device -1. I think that cache is the only thing that really moved.
    1
    Works with voodoo.

    Sent from my SCH-I510 using XDA Premium App