yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab  Android Development] morrichad:
monoko if your reply was directed out me, I appreciate your response and suggestion. Just that roto setup this type. of nandroid backup and I would like to follow thru with it correctly as instructions laid out by roto.

See I'm like most I don't have another $700+ to throw out again, my wife bought this for me as an early Xmas gift in trade for my iPad. I would like to be able to restore correctly in case I screw it up. If I must up the donation I will, just like to get these backups done, so that I can try to flash Clubtech files. I will admit I am noob to the samsung side of android, but have had some experience with the Evo. Rather spend some money on a donation to help out others, then rather be putting up my bricked tablet for sale. Again if anyone who has done this can you pm me and help a me out.
[Galaxy Tab  Android Development] monoko:
Morrichad it was targeted partialy to you and comunity as well. The script is based on rotos and maniacs info. It doesn't use dd as i think it's not needed. It bacups all of rotos devices/files and some more. Just in case. And it creates PDA.tar but if you are able to restore from it i don't know yet. I will later test. The script itself is tested to work.

And yes make sure you don't brick your tab.

I think roto is able to check it and coment on it as his experienced with linux.

I do plan to upgrade the script with diskfree check and sdcard mount point check.
[Galaxy Tab  Android Development] Kikouyou:
Roto

Thanks for this great initiative which allow us to play a bit with the ROM a bit more safely. Is there an easy way to put all of these commands in a simple script to adb invoke?

Let us know

Eric
[Galaxy Tab  Android Development] maniac3389:
Out of curiosity, is the AT&T backup that I created not sufficient? (It does not include the bootloader and such, but rotohammer was able to flash his T-Mobile Tab with it then go back to his T-Mobile firmware afterward) I do have the total backup, but haven't assembled it into an ODIN package that includes the bootloader.

But back to your post with the command lines, it seems like it started off with "adb, I think you can drop that first " if I read it correctly.
[Galaxy Tab  Android Development] maniac3389:
Just to let everyone know, I am going to work on assembling an automated backup using RotoBackup. It will basically be a batch or shell script that will reboot into recovery and put all the files into a folder on the internal SD card after gaining temporary root access. It will be like how I've been personally grabbing my dumped files.
[Galaxy Tab  Android Development] alias_neo:
I don't see the difficulty? All I did was stick it all in a bash script for linux.

It's hardly the most complicated procedure even for a noob.
[Galaxy Tab  Android Development] maniac3389:
I agree with you. But none the less, I think people might like an automated solution. (If they are used to nandroid AND not familiar with a shell, this may seem a little daunting.)
[Galaxy Tab  Android Development] alias_neo:
Good point.
[Galaxy Tab  Android Development] morrichad:
maniac no sir I haven't tried yours yet I was saving it as a last resort. My situation is that I wanted to do like rotohammer has stated in the past try to read read again and try to do for yourself. To be honest its not that I am lazy trust me as you see I did try, but out the sametime being a noob on the samsung side of android I know I was having issues and I stopped before sonething serious happen. Again it would be nice to have a step by step like they did for the evo with a youtube video on backing up and flashing files cause I learned at my pace and wasn't sure about something go back and reviewed both.

I will put my money where my mouth is if someone please just take sometime out their schedule and teach me via instant messaging or however. I feel like that if can learn how to backup the files screw up something, learn how to flash back the orginal files and get it working properly. Proceed to move on to flash clutech files with a full funtional tab with all the necessary backups in place with no shortcuts to mess up. Please help so that I can help return the favor to help out another member/noob such as myself. Thank You if can me via pm or can do email if that's a choice. AC Morris
[Galaxy Tab  Android Development] maniac3389:
I understand completely. Actually, my whole interest in this thread began because I was considering using clubtech's method of enabling Phone.

I would definitely recommend getting somewhat familiar with any flavor of *nix. (I admin Macs at work and heavily rely on the shell, so that's where I draw my skill from, but at home, I have a virtual machine with Ubuntu installed. I use VMware Player, doesn't cost a dime. Definitely recommended if you want to learn.)

After getting familiar, try to go line by line on the scripts posted here. They can be a little confusing until you understand what is being executed where. (All of the commands beginning with "adb shell" are being pushed the the Tab to be executed native on the device.) Hopefully when I post up what I'm in the process of creating it will be a little more defined, as I put as much as I can into shell scripts that get pushed onto the device and executed rather than using adb shell commands. (That is just my style, nothing wrong with the other way.)
[Galaxy Tab  Android Development] morrichad:
Thank You to maniac for your help and insight into this topic with all your work being put in with rotohammer I owe a big thanks for all his hard. Out of respect for rotohammer this is his thread on a topic he has seen to work on and should not include my begging and pleading taking up his thread. I will move to a new thread over in the General Area and see if at later time if I can not resolve these issues I can request help then and see if someone can help me. Again thanks for all responses and your hard work rotohammer and maniac, anyone I missed include yourself as well.
[Galaxy Tab  Android Development] rotohammer:
Another option is to join us on irc.freenode.net in channel #ModADroid-Galaxy-Tablet where you can ask questions in realtime if we're around and you can get an Idea of where we stand on making a simple solution for everyone.

Do understand that this is a thread for developers, so what you would expect to see here and on irc is the ongoing discussion of our progress on different fronts.

Expect to see a new thread in the next few days with an easy to use one click backup/restore. Theres folks in this thread and on irc working on it.

I've read a lot of good ideas in this thread and I suggest anyone interested in scipting and testing the scripts join the irc chat.
[Galaxy Tab  Android Development] maniac3389:
I found that in recovery mode /data isn't mounted... perhaps a more direct dd command like so is usable?

dd if=/dev/block/mmcblk0p2 of=/tmp/sd/blah bs=4096

I'm using this to mount /data in recovery (just for reference):

adb shell mount -t rfs /dev/block/mmcblk0p2 /data
[Galaxy Tab  Android Development] morrichad:
Thank you rotohammer for your recent post sir, I have strongly considered joining over at the irc channel. Problem is admittly I never used one from what little I do know that is from a post from deoxded saying one could download a tool called mirc but where to go from there is like going on the internet for the first time.

Also to Alias_neo they are different levels of noob like they are people at different levels of being smarter than a smart person. I believe my problem is how I ambdoing the adb mount to begin with cause I suck at it. See I did adb then I used root explorer to gain write previlages and somewhere along the way it started to cause the screen to blackout and become unresponsive where I could not do su commands any longer. I need to know how to how to proper mount with adb then request write to proper block.
[Galaxy Tab  Android Development] maniac3389:
Okay, here is what I have so far. It is a batch file that will reboot the phone into recovery and do a RotoBackup onto the internal storage as well as generate the PDA.tar file. (I haven't tested the tar file, but if busybox is creating the proper type of tar files, then this should be correct.)

The backup of the data partition is different than rotohammer's, as I was getting unexpected exits from tar when it was backing up the data partition. If I can get that to work then it may be more efficient. The data.rfs file for me was nearly 2GB, as shown on the attached image, so I'm sure that a .tar.gz file is more desirable. But alas, it's just an option. (Yeah, just read what you said, definitely a huge file. But it was a quick and dirty way to get past that little error.)

rotohammer: quick question about IRC since I've never done it before, is it real time or just as people come in and out?

Instructions:

Unzip the file

Plug in the Tab. (Make sure any work is saved)

Run AutoBackup.bat

Follow the prompts

After the reboot, mount the SD card and retrieve your files from /sdcard/CleanDump

Devs:

I've offloaded most of the heavy lifting to shell scripts, so it should be pretty portable. I will give a Linux shell script a shot whenever I get a chance.
[Galaxy Tab  Android Development] maniac3389:
After mounting the /data partition and pushing busybox to /tmp I run this:

/tmp/busybox tar -czvf /tmp/sd/CleanDump/data.tar.gz /data

It will start then go through a whole list of files it's tarring, then it exits with this:

tar: error exit delayed from previous errors

Any ideas?
[Galaxy Tab  Android Development] pbruck:
Have tryed this.

At first, your missing the DLL's. But these i have, so no Problem.

But if i use your script (Win7 32bit) i get this:

Rebooting device into recovery, wait until the device is in recovery mode before
continuing.
(Wait at least 5s after "Installing Muti-CSC" appears)
Drücken Sie eine beliebige Taste . . .

Installing root exploit...
658 KB/s (5392 bytes in 0.008s)
7 KB/s (32 bytes in 0.004s)
[*] CVE-2010-EASY Android local root exploit (C) 2010 by 743C

[*] checking NPROC limit ...
[+] RLIMIT_NPROC={3517, 3517}
[*] Searching for adb ...
[+] Found adb as PID 2349
[*] Spawning children. Dont type anything and wait for reset!
[*]
[*] If you like what we are doing you can send us PayPal money to
[*] 7-4-3-C@web.de so we can compensate time, effort and HW costs.
[*] If you are a company and feel like you profit from our work,
[*] we also accept donations > 1000 USD!
[*]
[*] adb connection will be reset. restart adb server on desktop and re-login.

Restarting adb server...
* server not running *
* daemon not running. starting it now *
* daemon started successfully *

Testing root... (should return uid 0)
error: device not found

Installing busybox...
error: device not found
error: device not found

Mounting Internal SD at /tmp/sd
error: device not found
error: device not found

Creating CleanDump folder on Internal SD
error: device not found

Pushing AutoDump.sh to /tmp/AutoDump.sh
error: device not found
error: device not found

Performing backup...
error: device not found

Backup Complete
You can retrieve the system backup from /sdcard/CleanDump/PDA.tar
and the /data backup from /sdcard/CleanDump/data.rfs

The device will reboot after this.
Drücken Sie eine beliebige Taste . . .

And nothing else happens. Except, the reboot after pressing an Key.
[Galaxy Tab  Android Development] maniac3389:
I saw that a few times when I placed the adb executable into the local folder. (I have adb in my environmental variables already, so it wasn't necessary until later)

I think a reboot of my PC cleared it up for me. (I'm on Windows 7 32-bit as well.)
[Galaxy Tab  Android Development] pbruck:
How to put adb in environmental variables to prevent this?

Sorry for the dumb Question. I try my best but i am not an skilled programmer.
[Galaxy Tab  Android Development] maniac3389:
Lol no worries. I'm not at my computer right now, so I'm not completely certain. I believe that it is listed how to do it on he Android SDK page where it instructs how to install the SDK on Windows. It basically consists of unzipping the SDK and adding the environmental variable to System>Advanced>Environmental Variables>Path. Should be online somewhere.

Edit: Here is the page, download the SDK from that page and look at step 2 for adding the environmental variable.
[Galaxy Tab  Android Development] pbruck:
OK.

I have done all this but the Process still fails.

I hav now executed every command via copy&paste from the bat into commandline tool.

The Probleem is, that after executing root.sh the device lost connection.

Oh. Forgot.

The Tab is rooted via SuperOneClickv1.5.5-ShortFuse.

Maybe this interacts with your scripts.
[Galaxy Tab  Android Development] maniac3389:
Shouldn't be a problem, mine is rooted as well. Try removing the adb executable from the folder. I will need to look at the script again. (May be a little while due to final exams from he first part of this week)
[Galaxy Tab  Android Development] knightnz:
Is there some particular method of TARring required for these files? I can flash the usual DBDATA.TAR file that is floating around fine, if I extract it, re-TAR it without changing it, the flash hangs. I've tried using 7Zip under windows and Tar in an OSX shell.

What's the trick? I'm trying to piece together a ROM of the various components to duplicate a current CPW ROM so that Kies is convinced it's legit again.
[Galaxy Tab  Android Development] maniac3389:
Use the OSX tar like this:

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

I believe that should work. (I haven't tried tarring it up on my Mac, but that works on my Linux virtual machine.)

Edit: The ustar part specifying the format. I don't think 7z does it by default, at least.
[Galaxy Tab  Android Development] mozzoman:
FWIW, after a factory reset of my tmo tab, I found busybox in /system/bin. I had z4root installed prior to factory reset, but I assume "factory reset" means just that. In any case, I was able to use "busybox tar" where you had "tar".
[Galaxy Tab  Android Development] maniac3389:
I believe that factory tester basically just restores what is installed in the ROM. Rooting will remount the read-only system and stick the root files (su, busybox etc) into the /system partition. So factory reset keeps them there because that is the source. Just apps that are in data are wiped I believe, not the /system/app where Superuser.apk is.
[Galaxy Tab  Android Development] mozzoman:
Interesting... not really "factory" then is it. Too bad.
[Galaxy Tab  Android Development] maniac3389:
Depends on the context. The device wasn't meant to be modified at that level outside of the factory :P
[Galaxy Tab  Android Development] TheGrammarFreak:
Holy crap, you've just saved me a lot of money. 1 day out of the return period and I bricked it. I'm so glad I made one of these backups, even if it was a long time ago. :D
[Galaxy Tab  Android Development] ZoinksS2k:
Is there anything special that needs to be done for this to work on a Sprint version of the Tab, major difference being the modem?

I ran the steps in the OP and made an Odin package. Everything looks good so far but I'm concerned about doing the flash.
[Galaxy Tab  Android Development] rotohammer:
Id recommended letting someone familiar with flashing their images try it first.
[Galaxy Tab  Android Development] ZoinksS2k:
Yeah, I don't listen too well. :)

Went ahead and flashed the package. As I feared, the modem.bin output is invalid. Odin writes the rest of the files fine, but fails on the final stage of the modem flash... AFTER it deletes the original.

Good times to be had with an effectively bricked Sprint Tab. Wouldn't boot, no recovery, no normal download mode, no access via ADB.

Only this:

I pulled a modem.bin from the stock Epic 4G located here: http://xdaforums.com/showthread.php?t=861253

Luckily the Galaxy devices are close-enough cousins for it to work. It flashed fine and I'm back on the Sprint network. All the other settings were retained. I'll have to see how the foreign modem works over the next few days.

The file size from the backup vs the one for the Epic:

Roto: 16,384 KB

Epic: 15,233 KB
[Galaxy Tab  Android Development] infamousjax:
Just so you know, the modems are identical.
[Galaxy Tab  Android Development] alias_neo:
Roto, do you know which partition the hidden.rfs goes into? I want to find out how big it is so I can find out why I can't flash any ROMs with hidden.rfs on my tab anymore.
[Galaxy Tab  Android Development] rotohammer:
You need to partition with a hidden.pit to flash those stock roms. Since I have no use for a hidden partition or the crap it contains, I remove it from my rom, so that it can be flashed regardless of your partitioning layout.
[Galaxy Tab  Android Development] rotohammer:
Good job! Even though the modem failed, you had good success. Now to find out why. Try flashing the modem.bin alone from odin. If it succeeds, then it may have been your tar file building at fault. Once I made a tar and accidentally added modem.bin twice on the command line which caused a failure at the start of dowloading the second modem.bin.
[Galaxy Tab  Android Development] ZoinksS2k:
I did. Flashing the modem by itself threw the same error.

Now that I have a functioning restore, I would be happy to test other dumps in order to get the stock modem. I know I can get back to a working setup, so game on.

Thanks for your work on this.
[Galaxy Tab  Android Development] alias_neo:
This is the problem I have though. I have tried repartitioning several times with the P1_add_hidden.pit. I also ripped the the pit from a second Tab I have that was running JJ3 (and had a hidden partition) but it seems the pit does not create the hidden partition the correct size. It always stops just before finishing the flash of the hidden.rfs.

I don't want the hidden.rfs either, but I see it as a concern when wanting to return to stock and being unable.
[Galaxy Tab  Android Development] hburn:
Its pretty sure i did miss some steps somewhere but i did have 2 bell galaxy tab one alreaydy on euro jk5 to make it receve call and the other is stock on bell so my question is HOW do i make a roto backup . . . I know the command line but not where to wrote it . . .

in some kind of terminal or from windows or ubuntu, setup tutorial is missing and would really complete this post as not evryone want to learn from the start to do a rotobackup step by step tutorial would be great
[Galaxy Tab  Android Development] maniac3389:
Those commands are meant to be executed from the command line of a desktop with access to adb. (Both Windows or Linux)
[Galaxy Tab  Android Development] msgfromside3:
You can also install terminal emulator and do it from your tab (less convenient than doing it via adb).
[Galaxy Tab  Android Development] maniac3389:
Has anyone tested flashing a RotoBackup boot.bin and Sbl.bin?
[Galaxy Tab  Android Development] Ikyo:
Anyone have any suggestions on how to get a proper modem.bin? According to Zoinks, this method isn't working correctly to get the modem file on Sprint CDMA tabs.
[Galaxy Tab  Android Development] hburn:
Ok so i did read like 3 hours and get adb on my windows with all sdk and everything but now when i enter" adb devices " there no device in thel ist, adb driver are ok so if you know where im stuck and have an solution . . .
[Galaxy Tab  Android Development] rotohammer:
I only know of one person that tried and bricked their tab. I wouldn't do it. I never flash bootloaders.
[Galaxy Tab  Android Development] maniac3389:
Haha, was that me? I was wondering because it was acting kinda wacky when I went back to stock AT&T firmware over the JMA boot and sbl.
[Galaxy Tab  Android Development] Cliffro:
Thanks Roto,

I tweaked your code into a bash script on my macbook.

Just for grins, I ran it with my captvate plugged in and poof... Got a backup of that too. My busybox wasn't linked to tar, so in the script I created a soft link to /data/local/tmp/tar and added that folder to the PATH.

I had no idea I had a full powered linux box in my pocket. adb is very cool to me.

Cheers,
[Galaxy Tab  Android Development] ZoinksS2k:
Any ideas on how to dump the modem from the Sprint flavored Tab? My work around to use the modem from the Epic 4G borks GPS.

The BML partition mapping pretty much has to be correct, so could this be a problem with the offset? From what I've read, hexediting the header out or simply deleting out the empty space to change the file size doesn't work.

I may try using an STL image for the modem and see if that works.

This is the only problem thus far. Once this is cleared up, it is ROM customization time.

Ikyo is willing to pull the files and I'll flash to test.

Thanks
[Galaxy Tab  Android Development] Ikyo:
I am wondering if the issue we are having is that the modem is in use when dumping the data. When you do a nandroid backup, the phone is in pretty much a single user/recovery state. Zoinks, try dumping the modem you have in the device now a couple of times and see if the file size/data changes. I am going to bet that it does.
[Galaxy Tab  Android Development] ZoinksS2k:
Worth a shot. Since you are stock, can you dump the modem with the device in airplane mode?

I won't be able to do this myself until late today or tomorrow.
[Galaxy Tab  Android Development] Ikyo:
Here is the file in airplane mode, but I doubt it will work because I ran a diff and it didn't see any differences.

http://www.megaupload.com/?d=W8ZYZJBU
[Galaxy Tab  Android Development] ZoinksS2k:
Yep, too big.

I'll try the STL method a go tonight
[Galaxy Tab  Android Development] maniac3389:
Isn't STL devices only used for RFS formatted images? (I am coming from a GSM device, so I'm not sure if it is different on a CDMA device)
[Galaxy Tab  Android Development] rotohammer:
THIS is the kind of stuff I'd like to see more folks doing! Well done!
[Galaxy Tab  Android Development] cbb77:
I just received my AT&T Tab and currently have it charging. Since I am a noob to the android environment, but am a techie and like to fiddle, the first thing I really want to do is back it up and ensure I have a good image before I do anything else. Read the steps on the first post. I assume first item I must do is root the tab, install busybox and then I can execute the scripts listed here. Is that correct? Haven't even checked / connected to PC yet to see if firmware update is available. If so I assume I should still do this backup first before attempting an update. Just want to confirm steps to execute and have a clean backup. Thanks in advance.
[Galaxy Tab  Android Development] rotohammer:
Thats it. I highly recommend doing the backup and saving the files to cdrom so if at any point you need to go back to stock, we can help you do so.

I'm not very fond of official updates, Kies, Windows etc. You'll find all the firmware you want right here.
[Galaxy Tab  Android Development] cbb77:
Excellent, thank you.
[Galaxy Tab  Android Development] ZoinksS2k:
Sprint update:

Likely cause of the modem.bin dump from bml12 not working... it is completely empty. All FF

Has anybody seen a CDMA modem successfully pulled? I'm defeated here
[Galaxy Tab  Android Development] maniac3389:
Run this command from the Terminal on the phone (or via adb shell):

ls -l /dev/block/bml*
ls -l /dev/block/stl*

Compare it to the list here to see if you see something different in the bml/stl devices:

http://xdaforums.com/wiki/index.php?title=Samsung_Galaxy_S_Series#Partitions
[Galaxy Tab  Android Development] Ikyo:
I wonder if you can dump the radio from an Epic and apply it to the Tab using Roto's command.