yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab  Android Development] manekineko:
Hmm this isn't good, followed the first post instructions as far as they went, and then did what I thought was the correct thing, and flashed the tar via Odin as PDA, with all other settings as default.

Bootup screen was corrupted with a sort of static, though the Samsung sound played, and now I just have a black screen and a dead tab.
[Galaxy Tab  Android Development] Solaris_irc:
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.
[Galaxy Tab  Android Development] manekineko:
You should also see my other thread in Q&A. Apparently, you can only restore this backup if you also have the base ROM to restore it onto. I don't know whether or not you would, but FYI.

http://xdaforums.com/showthread.php?t=1196792
[Galaxy Tab  Android Development] mnpolock:
I have been trying to get a roto backup of my VZW Tab .... tried the scripts, etc.. I just cannot seem to get it to back up. Has anyone done this with a VZW tab? Could you give me some pointers .... I have the VZW in as recv'd condition right now just with root access from superoneclick (needed for this correct) and I would love to get a good stock backup of the VZW before I start .....

Please help if you can.

Thanks,

Tony ~ MNPolock
[Galaxy Tab  Android Development] Ronis_BR:
Just for your information:

By now, I think it is wiser use Roto Backup procedure to backup everything EXCEPT THE BOOTLOADERS. I, and many other people, have successfully used Roto Backup with heimdall to restore a ROM without rewriting bootloaders. On the other side, I have already seen many people, including me, that have bricked our tabs when we tried to flash the bootloaders that was generated by Roto Backup.

So, I think it is "SAFE" (well, by safe I mean that the probability to brick your tab is low, but it STILL EXISTS!) to use Roto Backup to restore your ROM since you DON'T FLASH THE BOOTLOADERS FILES! If you want to, it is more secure to download a firmware file from samfirmware, for example, that has a bootloader compatible with your backup, flash using odin, and than flash the files of your backup without the bootloaders (boot.bin and Sbl.bin) by the method described at the first post.

Thanks,

Ronan
[Galaxy Tab  Android Development] melliwuk:
thats cool your doing that for the tab, but is there a way of extracting the same stuff for the i9000? i really need to extract efs.rfs but can't find a way to do it as the stuff above dont work, it just says can't open dev/block/st13 no such file or directory exists

melli.

my bad its stl3 lol got it all sorted now thanks to this guide :)

melli.
[Galaxy Tab  Android Development] designgears:
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.
[Galaxy Tab  Android Development] maniac3389:
Thanks! (btw, like your work on Cognition.)

Just a few more things before I play mad scientist, if I perform a "wipe data/factory reset" in the stock recovery, that should get me back to a pristine state to take an image, correct? Also, is it better to take the images in a fully booted Android system or from within recovery itself? (I can get root permissions in recovery mode)

Edit:

Is it necessary to have all of the files dumped for it to be flashable? (I know some people said not to bother with certain parts of the dumps, too dangerous...)
[Galaxy Tab  Android Development] maniac3389:
I'd like to do a sanity check before proceeding...

So I'm looking at I987UCJH7.tar, the AT&T dump that was posted previously, and saw that it contains the following files:

cache.rfs
factory.rfs
modem.bin
zImage

Looking at designgears' instruction, it appears to be doing a COMPLETE image.

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

Would it not be sufficient to only include the files listed above (from a production ROM, of course) to create a full dump?

I was thinking something like this:

tar --format=ustar -cf PDA.tar cache.rfs factoryfs.rfs modem.bin zImage

My process to obtain a dump would something like this:

1)TitaniumBackup everything on my device and copy everything off the SD card

2)Factory data reset from the Android OS

3)Factory Reset the device from recovery

4)Try to boot into recovery and take an image prior to initial boot (need to experiment in mounting the SD card in recovery prior to attempting)

5)Boot/Restore my data

6)Assemble the tar file
[Galaxy Tab  Android Development] rotohammer:
Thats how I would do it. I really don't like flashing the bootloader unless its absolutely necessary.
[Galaxy Tab  Android Development] maniac3389:
Yeah, that's what I was thinking. I was thinking, since my device is rooted, did it modify the factoryfs.rfs partition? (I used a one-click root and sideload enabler)

Also, I got scripted up a batch file (since I'm using my Win7 box for this) to reboot into recovery, gain root and mount the SD card all within stock recovery. I'm hesitant to post it up as a tool because not exactly sure who the file rageagainstthecage-arm5.bin comes from. (Got it from the CWM package)

So in effect I have my capture environment staged and ready.

Edit: As I suspected... I rebooted after doing a factory reset and connected via ADB and typed su in and it immediately prompted me to Allow superuser privs onscreen. So the root stayed... I may see if I can't remove it.
[Galaxy Tab  Android Development] maniac3389:
I unrooted my device and built 2 TARs, one with everything and one with just the subset of files mentioned above. I'm currently flashing the subset one. Will post results...
[Galaxy Tab  Android Development] maniac3389:
Okay... that totally went bad...

Tried the subset one, got stuck at AT&T boot screen. So I put it back into download mode and flashed the full and it failed (the screen still had a progress indicator on it). So I powered the device down and was going to put it back into download mode, but it refuses to turn on... nothing at all. Any ideas?

Here is my ODIN log:

<ID:0/011> Added!!
<ID:0/011> Odin v.3 engine (ID:11)..
<ID:0/011> File analysis..
<ID:0/011> SetupConnection..
<ID:0/011> Initialzation..
<ID:0/011> Get PIT for mapping..
<ID:0/011> Firmware update start..
<ID:0/011> cache.rfs
<ID:0/011> factoryfs.rfs
<ID:0/011> modem.bin
<ID:0/011> zImage
<ID:0/011> Removed!!
<ID:0/011> Completed..
<OSM> All threads completed. (succeed 1 / failed 0)
<ID:0/009> Added!!
<ID:0/009> Removed!!
<ID:0/011> Added!!
<ID:0/011> Odin v.3 engine (ID:11)..
<ID:0/011> File analysis..
<ID:0/011> SetupConnection..
<ID:0/011> Initialzation..
<ID:0/011> Get PIT for mapping..
<ID:0/011> Firmware update start..
<ID:0/011> boot.bin
<ID:0/011> cache.rfs
<ID:0/011> dbdata.rfs
<ID:0/011> factoryfs.rfs
<ID:0/011> modem.bin
<ID:0/011> param.lfs
<ID:0/011>
<ID:0/011> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
<ID:0/011> Removed!!
[Galaxy Tab  Android Development] risq:
Will watch with interest.
[Galaxy Tab  Android Development] rotohammer:
So you cant get into download mode, not even the phone != computer screen?

It failed at the params.lfs, like mine do. Even though designgears had good intentions, I'm not sure he's actually done those steps one a Galaxy Tab. Perhaps they works on some other device.
[Galaxy Tab  Android Development] Technomancer:
Here is some good info about RFS partitions

http://movitool.ntd.homelinux.org/trac/movitool/wiki/RFS
[Galaxy Tab  Android Development] maniac3389:
Yeah, absolutely refuses to power on. I did it knowing that it might happen. I'll see if I can't get another device.
[Galaxy Tab  Android Development] Volker1:
The dumps from /dev/block/bml* are not identical to the firmware files. For example, my stock T-Mobile US dump of /dev/block/bml9 (should be factoryfs.rfs) does not start with a rfs magic. The actual factoryfs.rfs starts at 0x700000 into the dump. For example, to mount the dump I need to

mount -o ro,loop,offset=7340032 bml9.dump /mnt/mountpoint

I'd bet that if you would cut off the junk at the beginning of some of the bml* dumps then you'd end up with a flashable image.
[Galaxy Tab  Android Development] rotohammer:
I've tried splitting that file on 0x700000 and trimming the end, I could mount it but it will never flash and boot.

But, I just found out that cat works! I've wasted 2 weeks with dd when:

adb shell cat /dev/block/stl9 > /sdcard/factoryfs.rfs

makes a mountable and flashable filesystem! WTF?

I think its the/dev/block/stl9, Ive been using bml9!

Edit: yes, using stl9 instead of bml9 dumps a flashable image!

Edit: even the elusive param.lfs dumped and flashed perfect!
[Galaxy Tab  Android Development] Technomancer:
roto:

BML is Block Management Layer - raw flash

STL is Sector Translation Layer - after sector remapping used for wear levelling

I think BML dumps are hopelessly scrambled by wear levelling

Similarly the dumps from Heimdall or Odin.

see explanations here http://movitool.ntd.homelinux.org/trac/movitool/wiki/RFS

It also looks like RFS is FAT32 or FAT16 plus journal. So it should be mountable as FAT under Linux if the journal is empty.
[Galaxy Tab  Android Development] rotohammer:
Yes indeed. I just did a full dump and restore of my system with success!
[Galaxy Tab  Android Development] maniac3389:
Do I dare try it again? lol

I have a new AT&T Galaxy Tab sitting in my car right now.

Glad I finally know difference between bml and stl now. That seriously had me curious. When you look at certain mount entries they use stl vs bml.

Edit: I can create a fresh dump (haven't loaded anything onto the Tab yet), but I am hesitant to flash it. Will provide if anyone is wanting to try it.
[Galaxy Tab  Android Development] rotohammer:
Yes, please dump it, if not for anything, just so you can recover.
[Galaxy Tab  Android Development] maniac3389:
Where is a good place to post a dump? (Will do it once I get home) Don't really wanna host it outta my Dropbox...
[Galaxy Tab  Android Development] rotohammer:
I can pm you a place to upload it to tomorrow night. No efs.rfs and preferably after a factory reset so theres no personal data in the dump.
[Galaxy Tab  Android Development] maniac3389:
Sounds good. What all did you dump? (I'm about to start dumping from the recovery console)
[Galaxy Tab  Android Development] maniac3389:
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:

#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:

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...)
[Galaxy Tab  Android Development] rotohammer:
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.
[Galaxy Tab  Android Development] maniac3389:
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.
[Galaxy Tab  Android Development] ZoinksS2k:
I'm about to try this on my Sprint-based Tab.

Anybody willing to try it out for me?
[Galaxy Tab  Android Development] rotohammer:
I reworked the OP now that its complete.

Do It!
[Galaxy Tab  Android Development] alias_neo:
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
[Galaxy Tab  Android Development] rotohammer:
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 :)
[Galaxy Tab  Android Development] maniac3389:
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.)
[Galaxy Tab  Android Development] alias_neo:
Ha, sorry, making sure a 2 year old doesn't fall down the stairs had to take precedence and I lost track of reading....
[Galaxy Tab  Android Development] rotohammer:
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.
[Galaxy Tab  Android Development] maniac3389:
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.)
[Galaxy Tab  Android Development] Volker1:
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
[Galaxy Tab  Android Development] maniac3389:
Awesome! Glad I know C lol
[Galaxy Tab  Android Development] msgfromside3:
I cannot find tar from my Tab. What am I missing here? Which specific path is it located? Thanks!
[Galaxy Tab  Android Development] maniac3389:
Are you talking about using it to tar up your dumped files? It's not on the Tab, you need to do that from a computer.
[Galaxy Tab  Android Development] pbruck:
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!"??

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?
[Galaxy Tab  Android Development] rotohammer:
Grab busybox installer from the market
[Galaxy Tab  Android Development] pbruck:
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?
[Galaxy Tab  Android Development] rotohammer:
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.
[Galaxy Tab  Android Development] pbruck:
OK.

BSDTar:

http://gnuwin32.sourceforge.net/packages/libarchive.htm

In case u are using this, you have to change the command from :

to:

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:
[Galaxy Tab  Android Development] rotohammer:
It just hung Odin. Just as a test, I untarred an retarred it on linux and it flashed fine. So the bsdtar just isn't cutting it.
[Galaxy Tab  Android Development] pbruck:
Hmmm....

Bad run :confused:

But thanks for your efforts.

I have created new files.

One with the same name, by using 7zip:

http://www.bergsuechtig.de/files/mybackup.tar

and one created with gnutar:

http://www.bergsuechtig.de/files/tar_mybackup.tar

If you will have a try..... :rolleyes: ;)
[Galaxy Tab  Android Development] monoko:
Ustar is default in the busybox. You can tar it directly in tab. But I din't test it yet.
[Galaxy Tab  Android Development] msgfromside3:
Thanks, roto. I thought busybox came with z4root. It works now.
[Galaxy Tab  Android Development] rotohammer:
Surprisingly, neither worked. But, while I was at it, I tarred the files from the Tab and it flashed fine.

tar -cf mybackup.tar zImage param.lfs

So try one from your tab and Ill flash that.
[Galaxy Tab  Android Development] pbruck:
OK.

Last Night i had the same Idea (to tar on Tab).

But i had a little bit to sleep...

OK.

I have done it and reuploaded the new mybackup.tar File.

The resulting file is now much smaller. Looks like it is the right one!????

Have a try.

BTW.

I am working on an Windows bat File with all necessary Commands in it to run the Backup unattended.

If you have done all commands and have once given them the Root privileges, Superuser remembers it and you dont have to do it again.
[Galaxy Tab  Android Development] rotohammer:
You got the /sdcard dir structure stored in there. Cd into the dir first, then make the tar file.

Cool, the whole point of me posting this was to put up the infrastructure so that someone else may come up with the usable wrapper to make it easy.
[Galaxy Tab  Android Development] pbruck:
Stupid.

I am not clever enough and dont know all the correct commands.

What i try:

Setup an script that collects the Data and then creates the necessary tar files and then pull it all down on my PC.

And that without watching. Because there are big amounts of data and until all is done and transfered it takes a long time.

But my knowledge isnt enough to handle such commands to avoid such stupid things like saving the hole file structure in the tar.

This file MUST be useless.

OK.

All back to Start.....

But if you can provide any help....
[Galaxy Tab  Android Development] rotohammer:
Two things that are important: First is knowing how you want it to work, second is putting in the time and making mistakes along the way to developing your idea. Some things are easy for me (I've been using Linux for 15 years, so I'm pretty good using tar) but I also haven't done any DOS batch files in 15 years, so I'm pretty useless there.

Keep at it and the folks here will help and improve.
[Galaxy Tab  Android Development] morrichad:
Roto wanted to say thank you first for this backup! I think I am going to need a little help if possible from Roto and Maniac or someone. I want to backup my files first before attempting Clubtech project of flashing my Att tab over to full talk and data.

Here is little background info I am using a windows xp laptop to do this procedure. The problem I am having is I read and re-read Roto's first post and started the process of backup the files on my tab. I enable usb debugging and used root explorer to allow write access. Open adb with sdk-tools-command line and proceeded to begin the process everything seems to be going fine so far, then when after the first command in su asks allow unknown to proceed "adb shell su -c "dd if=/dev/block/bml1 of=/sdcard/boot.bin bs=4096", I do allow and proceeds fine uptil I get to "adb shell su -c "dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096". My screen just goes blank or black so I stopped the process due that I did not want to mess up the tab. I also noticed after the last command I input that it would not come up with the su allow command to proceed to the next step command due to screen seemed unresponsive.

I need some help or a push in the right direction to keep from screwing this up more. The screen was just total unresponsive just my luck that I could just close adb and eject the drives then reboot to still seems to function alright so far.

If someone would be willing to help walk me through tihis process I would appreciate it first. I also would like to know if we could start a donation pot and I am willing to put up $55.00 right now to help with the work put forth in the development of the work on the Galaxy Tab or for someone that help walk me this process and could with via instant messaging.
[Galaxy Tab  Android Development] monoko:
Make sure you have enough space on sdcard. (My FULL backup is nearly 3Gig.)

You can try run my script to do backup.

It backups all block devices I could get my hands on.

and It has one BUG. it keeps the modem.bin too big for odin.

as the dump from tab is 16 meg and I guess odin need 12M.

rotohammer am I right about the modem size?

First make sure in the script change the value where it should backup

DST=

on my tab /sdcard moved to /mnt/sdcard after flash.

copy that script to sdcard.

in shell run it by command

. ./backup.sh

The first . and space is important.

you can use adb shell or even terminal on TAB.

I have noticed that checkdisk is not very happy with our backups.

Backup in recovery would be propably better.