Roto Backup! UPDATED Dec 5 2010

Search This thread

maniac3389

Senior Member
Jan 30, 2007
102
12
My latest attempt at a capture...

I boot into recovery, do a factory wipe, push and run the root exploit, mount the internal SD card to /tmp/sd when I boot recovery and created a folder CleanDump, then I push this script and run it:
Code:
#Capture known devices
dd if=/dev/block/bml1 of=/tmp/sd/CleanDump/boot.bin bs=4096
dd if=/dev/block/bml2 of=/tmp/sd/CleanDump/pit.pit bs=4096
dd if=/dev/block/bml4 of=/tmp/sd/CleanDump/Sbl.bin bs=4096
dd if=/dev/block/stl6 of=/tmp/sd/CleanDump/param.lfs bs=4096
dd if=/dev/block/bml7 of=/tmp/sd/CleanDump/zImage bs=4096
dd if=/dev/block/stl9 of=/tmp/sd/CleanDump/factoryfs.rfs bs=4096
dd if=/dev/block/stl10 of=/tmp/sd/CleanDump/dbdata.rfs bs=4096
dd if=/dev/block/stl11 of=/tmp/sd/CleanDump/cache.rfs bs=4096
dd if=/dev/block/bml12 of=/tmp/sd/CleanDump/modem.bin bs=4096

#Non-working stl captures of known devices
#dd if=/dev/block/stl1 of=/tmp/sd/CleanDump/boot.stl.bin bs=4096	#INVALID ARGUMENT
#dd if=/dev/block/stl2 of=/tmp/sd/CleanDump/pit..stl.pit bs=4096	#INVALID ARGUMENT
#dd if=/dev/block/stl4 of=/tmp/sd/CleanDump/Sbl.bin bs=4096	#INVALID ARGUMENT
#dd if=/dev/block/stl12 of=/tmp/sd/CleanDump/modem.bin bs=4096	#INVALID ARGUMENT
#dd if=/dev/block/stl7 of=/tmp/sd/CleanDump/zImage bs=4096	#INVALID ARGUMENT

#Capture unknown devices
dd if=/dev/block/stl3 of=/tmp/sd/CleanDump/stl3.dump bs=4096
dd if=/dev/block/bml8 of=/tmp/sd/CleanDump/bml8.dump bs=4096
dd if=/dev/block/bml5 of=/tmp/sd/CleanDump/bml5.dump bs=4096

#Non-working stl captures of known devices
#dd if=/dev/block/stl8 of=/tmp/sd/CleanDump/stl8.dump bs=4096	#INVALID ARGUMENT
#dd if=/dev/block/stl5 of=/tmp/sd/CleanDump/stl5.dump bs=4096	#INVALID ARGUMENT

I've sanitized the script by commenting out the non-working stl devices. (They throw an Invalid Argument error) I'd be interested to see what files you captured off of what devices (bml vs stl).

After that completed I adb pull'd the files and use an Ubuntu VM to mount up the rfs files, they seem to mount okay, I was able to browse them and open a few .ogg files and read some text files.

Are you capturing yours in a fully booted state or in recovery?

Edit: btw, the ones that would only capture with bml make sense, they aren't filesystem images, but rather binaries from what I can tell.
Edit 2: Assuming all of those captures are correct, I assembled a tar following what you did for the T-Mobile dump using:
Code:
tar --format=ustar -cf ATT_STOCK.tar cache.rfs dbdata.rfs factoryfs.rfs modem.bin param.lfs zImage
I'm still weary on trying it on my own Tab... anyone interested in trying it once it is posted? (I do not want to go into an AT&T store again with a broken Tab...)
 
Last edited:

rotohammer

Senior Member
Jan 2, 2007
1,386
1,066
New Jersey
I'm still weary on trying it on my own Tab... anyone interested in trying it once it is posted? (I do not want to go into an AT&T store again with a broken Tab...)

Ill flash it! I'm 100% confident I can get back to a stock working firmware at any time with my T-Mobile firmware. Its going to be great to have the matching AT&T file built now.
 

maniac3389

Senior Member
Jan 30, 2007
102
12
Ill flash it! I'm 100% confident I can get back to a stock working firmware at any time with my T-Mobile firmware. Its going to be great to have the matching AT&T file built now.

Awesome. I compared both tars last night and the files seemed to have all the same sizes. I also test mounted the rfs files in my VM. I guess all that leaves is getting it uploaded :D

Edit: Oh, can we get a list of the block devices you dumped from? I wanna compare them to what I dumped as a double check.
 

alias_neo

Senior Member
Jun 9, 2006
2,081
205
London
I just got my hands on another Tab so I'm going to back up it's stock Generic UK firmware using this method. Thanks
 
Last edited:

rotohammer

Senior Member
Jan 2, 2007
1,386
1,066
New Jersey
I just got my hands on another Tab so I@m going to back up it's stock Generic UK firmware using this method. Can you give instructions or link to (in the first post) how to tar the files for Odin flashing? Thanks.

You want a firmware dump? to what end?

The answer you're looking for is there in the last line of the first post, which you shouldn't quote in its entirety, even if you've read it all :)
 

maniac3389

Senior Member
Jan 30, 2007
102
12
I was examining the Russian firmware mentioned in this thread and it appears to be a full flash, complete with bootloader and everything. Since we have all of those files captured, would it be a good idea to do a full flash from that? Or would one of our "lite" firmwares (I call it that since it is without the bootloader etc) be able to reflash over it? (If I recall correctly, the instructions in that thread have repartition checked.)
 

rotohammer

Senior Member
Jan 2, 2007
1,386
1,066
New Jersey
I was examining the Russian firmware mentioned in this thread and it appears to be a full flash, complete with bootloader and everything. Since we have all of those files captured, would it be a good idea to do a full flash from that? Or would one of our "lite" firmwares (I call it that since it is without the bootloader etc) be able to reflash over it? (If I recall correctly, the instructions in that thread have repartition checked.)

I would only flash the pieces I need. Basically, most roms fit within our existing partition layouts, so repartitioning is an unnecessary risk.

My next project is to make a special rotohammer.pit that will make over sized partitions so you'll never have to partition again. Screw those hidden.pit files.
 

maniac3389

Senior Member
Jan 30, 2007
102
12
I would only flash the pieces I need. Basically, most roms fit within our existing partition layouts, so repartitioning is an unnecessary risk.

My next project is to make a special rotohammer.pit that will make over sized partitions so you'll never have to partition again. Screw those hidden.pit files.

I agree with it being a better idea to not flash the bootloaders and such. I need to do some more research to see why the full flash is needed for the AT&T Stock > Phone-enabled is required. I'm hesitant to do a repartition because we don't yet have an ODIN OneClick like the Captivate does.

So, your pit file, where will it get the extra space from? Or am I missing how this will be accomplished? If I understand correctly, the pit files are basically partition maps; so do you have a way to read them? (If there is a reference you're using I'd love to see it. I've opened up a pit file in a hex editor before and can see it has partitions names, but not able to decipher much more than that.)
 

Volker1

Senior Member
Jul 31, 2009
259
79
So, your pit file, where will it get the extra space from? Or am I missing how this will be accomplished? If I understand correctly, the pit files are basically partition maps; so do you have a way to read them? (If there is a reference you're using I'd love to see it. I've opened up a pit file in a hex editor before and can see it has partitions names, but not able to decipher much more than that.)

The C struct defining the PIT is in a header in the utility I wrote here:

http://xdaforums.com/showpost.php?p=9471190&postcount=14
 

pbruck

Senior Member
Feb 1, 2006
146
65
adb shell su -c "tar -czvf /sdcard/data.tar.gz /data"

I am a little bit confused....
Everything works well, without this Command.
If i put this over cmd i get an "tar: not found" Error.
And so no data.tar.gz is created.

How should i use your suggestion to "first flash data back!"??
adb push data.tar.gz /sdcard/data.tar.gz
adb shell su -c "tar -zxvf /sdcard/data.tar.gz"
adb reboot download
Without having this data.tar.gz file?
All other commands work well and it results all necessary files which i have tared to get and an archive for flash back.
Whats wrong?
And, can i still flash my System back using the resulting tar without data.tar.gz?
 

pbruck

Senior Member
Feb 1, 2006
146
65
Grab busybox installer from the market
Oh, yeah...
Sometimes it is so simple....
Now it works.
Please can you add this hint in your howto (if there are more greenhorns like me).
BTW. I have done this all from an Win7 32bit PC and most works well.
But GNUtar doesnt know the "ustar" format so i had used "bsdtar" to create the PDA Tar file.
This knows the ustar Format.
Do you think this is an good decision and the file maybe flashable?
 

rotohammer

Senior Member
Jan 2, 2007
1,386
1,066
New Jersey
Oh, yeah...
Sometimes it is so simple....
Now it works.
Please can you add this hint in your howto (if there are more greenhorns like me).
BTW. I have done this all from an Win7 32bit PC and most works well.
But GNUtar doesnt know the "ustar" format so i had used "bsdtar" to create the PDA Tar file.
This knows the ustar Format.
Do you think this is an good decision and the file maybe flashable?

It should be fine. If you want, tar up a zImage and params.lfs and post it here and Ill flash it.
Post a link to where you got the bsdtar for the 1st post.
 

pbruck

Senior Member
Feb 1, 2006
146
65
It should be fine. If you want, tar up a zImage and params.lfs and post it here and Ill flash it.
Post a link to where you got the bsdtar for the 1st post.

OK.
BSDTar:
http://gnuwin32.sourceforge.net/packages/libarchive.htm
In case u are using this, you have to change the command from :
tar --format=ustar .....
to:
bsdtar --format=ustar ....
But i am sure you know this :cool:

This works good for me on Win7.

Tar file:
http://www.bergsuechtig.de/files/mybackup.tar
Hope this conatins no confidential informations from me :eek:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    I've been trying to recreate a flashable firmware based on the stock TMobile flash dumps and I have complete success.

    Heres how to save your current firmware. It will be saved with all apps and settings except for whats on /sdcard.

    I recommend reseting to defaults using "Settings->Privacy->Factory data reset" if you want to give these files to someone else to build a flashable rom for you. That will delete all your personal information.

    Note: I just backed up a completely setup AT&T Tab, with tons of apps and customizations and restored it to my stock T-Mobile Tab, perfectly! Every app works, home screen is setup perfect, everything!

    Effectively this is equivalent to a nandroid backup.

    I'll call it "Roto Backup"!
    Code:
    mkdir backup
    cd backup
    adb shell  su -c "dd if=/dev/block/bml1 of=/sdcard/boot.bin bs=4096"
    adb shell  su -c "dd if=/dev/block/bml2 of=/sdcard/pit.pit bs=4096"
    adb shell  su -c "dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/bml4 of=/sdcard/Sbl.bin bs=4096"
    adb shell  su -c "dd if=/dev/block/stl6 of=/sdcard/param.lfs bs=4096"
    adb shell  su -c "dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096"
    adb shell  su -c "dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/stl10 of=/sdcard/dbdata.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096"
    adb shell  su -c "tar -czvf /sdcard/data.tar.gz /data"
    
    adb pull /sdcard/param.lfs .
    adb pull /sdcard/zImage .
    adb pull /sdcard/factoryfs.rfs .
    adb pull /sdcard/dbdata.rfs .
    adb pull /sdcard/cache.rfs .
    adb pull /sdcard/modem.bin .
    adb pull /sdcard/efs.rfs .
    adb pull /sdcard/boot.bin .
    adb pull /sdcard/Sbl.bin .
    adb pull /sdcard/pit.pit .
    adb pull /sdcard/data.tar.gz .

    Note you will be prompted for superuser permissions on the Tabs LCD on every dd command.

    If you don't have the tar command on your tab, install Busybox Installer from the market.

    I just paste the above commands into my command shell window and when im done all the files are siting in my current (backup) directory.


    Roto Restore:
    First flash the data back:
    Code:
    adb push data.tar.gz /sdcard/data.tar.gz
    adb shell su -c "tar -zxvf /sdcard/data.tar.gz"
    adb reboot download

    Now flash the dumps with Heimdall:
    Code:
    heimdall flash --kernel zImage --factoryfs factoryfs.rfs --modem modem.bin --cache cache.rfs --dbdata dbdata.rfs --param param.lfs

    Of course you could tar the files right n the Tab and flash via Odin if you really want to:
    Code:
    adb shell
    cd /sdcard
    tar -cf mybackup.tar cache.rfs dbdata.rfs factoryfs.rfs modem.bin param.lfs zImage
    exit
    adb pull /sdcard/mybackup.tar .
    2
    It sounds like this guy is new to android and iz trying to reinvent the wheel

    Sent from my SGH-T849 using XDA App

    No, it sounds like he's trying to do exactly what he says he's doing, and that is to recreate the base TMo firmware from DD dumps!

    Why? So that if necessary he could return to complete stock if he wished, and because there is no stock TMo image available.

    A Nandroid backup doesn't cut the mustard in this case.

    Remember guys - just because you don't see a need for something, it doesn't mean that that need doesn't exist for others!

    Regards,

    Dave

    P.S. If you'd read any of Rotohammers posts in these forums, and looked back over previous activity in other sections, you'd know that he's not new to Android at all! ;)
    2
    Hey. claim down, you now need to study the topic from Chainfire about "Don't flash JMxx....the signed bootloader ), to removed the protected bootloader issue first.
    Next time use Roto pre-rooted firmware. Rotohammer is so kind that he removed the signed bootloader for us in his custom rom.

    Congulation!!!!

    but u still have much to do. see you.
    Thank You for you to trust me!

    Sent from my GT-P1000 using XDA App
    1
    This will get you going...

    Make any changes you want on the phone...

    You can dump any BML like this;
    dd if=/dev/block/bml1 of=/sdcard/boot.bin bs=4096
    dd if=/dev/block/bml2 of=/sdcard/pit.pit bs=4096
    dd if=/dev/block/bml4 of=/sdcard/Sbl.bin bs=4096
    dd if=/dev/block/bml6 of=/sdcard/param.lfs bs=4096
    dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
    dd if=/dev/block/bml9 of=/sdcard/factoryfs.rfs bs=4096
    dd if=/dev/block/bml10 of=/sdcard/dbdata.rfs bs=4096
    dd if=/dev/block/bml11 of=/sdcard/cache.rfs bs=4096
    dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096

    Once you have all of those you can make an odin flashable tar.

    Create Flashable Tar
    tar --format=ustar -cf PDA.tar boot.bin cache.rfs dbdata.rfs factoryfs.rfs modem.bin param.lfs Sbl.bin zImage dbdata.rfs

    Load up the PDA.tar into the PDA slot in odin, load up the pit in the pit slot, flash.
    1
    I've been trying to recreate a flashable firmware based on the stock TMobile flash dumps and I have complete success.

    Heres how to save your current firmware. It will be saved with all apps and settings except for whats on /sdcard.

    I recommend reseting to defaults using "Settings->Privacy->Factory data reset" if you want to give these files to someone else to build a flashable rom for you. That will delete all your personal information.

    Note: I just backed up a completely setup AT&T Tab, with tons of apps and customizations and restored it to my stock T-Mobile Tab, perfectly! Every app works, home screen is setup perfect, everything!

    Effectively this is equivalent to a nandroid backup.

    I'll call it "Roto Backup"!
    Code:
    mkdir backup
    cd backup
    adb shell  su -c "dd if=/dev/block/bml1 of=/sdcard/boot.bin bs=4096"
    adb shell  su -c "dd if=/dev/block/bml2 of=/sdcard/pit.pit bs=4096"
    adb shell  su -c "dd if=/dev/block/stl3 of=/sdcard/efs.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/bml4 of=/sdcard/Sbl.bin bs=4096"
    adb shell  su -c "dd if=/dev/block/stl6 of=/sdcard/param.lfs bs=4096"
    adb shell  su -c "dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096"
    adb shell  su -c "dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/stl10 of=/sdcard/dbdata.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096"
    adb shell  su -c "dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096"
    adb shell  su -c "tar -czvf /sdcard/data.tar.gz /data"
    
    adb pull /sdcard/param.lfs .
    adb pull /sdcard/zImage .
    adb pull /sdcard/factoryfs.rfs .
    adb pull /sdcard/dbdata.rfs .
    adb pull /sdcard/cache.rfs .
    adb pull /sdcard/modem.bin .
    adb pull /sdcard/efs.rfs .
    adb pull /sdcard/boot.bin .
    adb pull /sdcard/Sbl.bin .
    adb pull /sdcard/pit.pit .
    adb pull /sdcard/data.tar.gz .

    Note you will be prompted for superuser permissions on the Tabs LCD on every dd command.

    If you don't have the tar command on your tab, install Busybox Installer from the market.

    I just paste the above commands into my command shell window and when im done all the files are siting in my current (backup) directory.


    Roto Restore:
    First flash the data back:
    Code:
    adb push data.tar.gz /sdcard/data.tar.gz
    adb shell su -c "tar -zxvf /sdcard/data.tar.gz"
    adb reboot download

    Now flash the dumps with Heimdall:
    Code:
    heimdall flash --kernel zImage --factoryfs factoryfs.rfs --modem modem.bin --cache cache.rfs --dbdata dbdata.rfs --param param.lfs

    Of course you could tar the files right n the Tab and flash via Odin if you really want to:
    Code:
    adb shell
    cd /sdcard
    tar -cf mybackup.tar cache.rfs dbdata.rfs factoryfs.rfs modem.bin param.lfs zImage
    exit
    adb pull /sdcard/mybackup.tar .

    Hi, will this also work in a Galaxy Tab Wifi only (P1010)?:confused: I really would like to make a Backup to flash if needed of my stock Froyo.

    Thanks in advance.