• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Backing up data partition raw sectors

The issue, like you allude to, is one of access--dd works for non-protected files and partitions, but if you don't have access (i.e. root privileges) to protected files, you can't copy with any utility.

The adb utility has some special privileges, but it's file-based and still requires that you have access to the files you're attempting to copy.

Is the data partition on the internal emmc protected? I have a Samsung Galaxy Tab 2 7.0 P3113 and I tried the command to list partitions through ADB shell, but it didn't work.

If I use CWM to root the phone, how much data will be written to the data partition? I want to minimize that so that as little data as possible is overwritten.
 
Is the data partition on the internal emmc protected? I have a Samsung Galaxy Tab 2 7.0 P3113 and I tried the command to list partitions through ADB shell, but it didn't work.

If I use CWM to root the phone, how much data will be written to the data partition? I want to minimize that so that as little data as possible is overwritten.

I think most things outside of /data/media (which is where your "SD card" is mounted for the Samsung Galaxy Nexus) are protected from non-root users.

Simply rooting (installing the root binaries (su program and superuser app)) will not touch the /data partition at all.

Custom recovery (including CWM) Nandroid backups can be very large and will indeed be placed and consume space in your /data/media folder or where ever your "SD card" is actually mounted.

P.S., if you want, I can move your post to the Galaxy Tab 2 - All Things Root - Android Forums area for you (we can stay here as long as we don't stray too far from the OP's original issue of Nandroid backup side ;) :)) -- let me know :).
 
I think most things outside of /data/media (which is where your "SD card" is mounted) are protected from non-root users.

Simply rooting (installing the root binaries (su program and superuser app)) will not touch the /data partition at all.

Custom recovery (including CWM) Nandroid backups can be very large and will indeed be placed and consume space in your /data/media folder or where ever your "SD card" is actually mounted.

P.S., if you want, I can move your post to the Galaxy Tab 2 - All Things Root - Android Forums area for you (we can stay here as long as we don't stray too far from the OP's original issue of Nandroid backup side ;) :)) -- let me know :).


Yes please move it. Can you set the title to something like "Backing up data partition raw sectors"?

And can't you set Nandroid to backup to the external microSD?
 
Yes please move it. Can you set the title to something like "Backing up data partition raw sectors"?

And can't you set Nandroid to backup to the external microSD?

Okay, move has been done! :)

Well, I was actually answer with regard to the Samsung Galaxy Nexus re. the "SD card" (/data/media) location, so I'm not really sure how the Galaxy Tab 2 is setup, but I'm guessing that your external SD card will be the default location for a custom recovery's Nandroid backup.

Cheers and thanks!
 
Okay, move has been done! :)

Well, I was actually answer with regard to the Samsung Galaxy Nexus re. the "SD card" (/data/media) location, so I'm not really sure how the Galaxy Tab 2 is setup, but I'm guessing that your external SD card will be the default location for a custom recovery's Nandroid backup.

Cheers and thanks!


Thanks. So if I flash CWM and root and do a Nandroid backup of the /data/ partition (or whatever) to the microSD will that include the "empty" sectors?

Are there other partitions that I need to backup too? I know there's a cache partition but is that only used for flashing new ROMs?
 
Thanks. So if I flash CWM and root and do a Nandroid backup of the /data/ partition (or whatever) to the microSD will that include the "empty" sectors?

Are there other partitions that I need to backup too? I know there's a cache partition but is that only used for flashing new ROMs?

Well, now I'm not so sure...I started re-thinking and researching about your question and saw and remembered the dump_image utility that the various custom recoveries might actually be using to do the backups.

Of course, I believe there have been recent changes to CWM where blob files are involved and I think / thought that twrp might be using tar for the backups now.

You'd have to actually check the custom recovery source, for the specific version of that recovery, to see which utility is used for the partition's backup--even then, if might differ between partitions (i.e., /system might be backed-up on a file-by-file basis and /boot via dump_image, etc.).

Not a simple question or answer, I guess ;) :).
 
Well, now I'm not so sure...I started re-thinking and researching about your question and saw and remembered the dump_image utility that the various custom recoveries might actually be using to do the backups.

Of course, I believe there have been recent changes to CWM where blob files are involved and I think / thought that twrp might be using tar for the backups now.

You'd have to actually check the custom recovery source, for the specific version of that recovery, to see which utility is used for the partition's backup--even then, if might differ between partitions (i.e., /system might be backed-up on a file-by-file basis and /boot via dump_image, etc.).

Not a simple question or answer, I guess ;) :).


Interesting... What about su dd? You said superuser won't alter the data partition, but don't you have to install a superuser app to the data partition? Or can you install it to the microSD?
 
Interesting... What about su dd? You said superuser won't alter the data partition, but don't you have to install a superuser app to the data partition? Or can you install it to the microSD?

Well, root access / capabilities in and of themselves, don't do anything--it's the apps / programs that have root powers that can impact things (like the /data partition).

The root binaries (su and whatever superuser app you use) get installed (typically) in the /system/bin or /system/xbin partition and not the /data partition.

You can't "install" it on the microSD because the permission settings for an SD card (or emulated filesystem) do not support the permission bits like the suid/setuid bit that enable the su binary to have root privileges.

The su binary does the real heavy lifting in the root equation. The superuser app is communicated with by the su binary to check to see if you are allowed to invoke the su binary (this is a safety / security feature to prevent unfettered root access via the su binary--they work hand-in-hand).
 
Oh it looks like this method includes superuser, and it looks like it leaves your partitions alone except for recovery and cache. Cache has nothing relevant to restoring pictures/user data right? http://forum.xda-developers.com/showthread.php?t=1957160

From what I've read it seems like some root methods wipe everything and set up new partitions.

Well, I can't speak except in generalities about rooting methods for devices that I don't own or haven't personally used/tested/researched.

I'd rather leave the vetting of a particular rooting method to the experts in the specific all-things-root forum for your device--they'll know best :).

Cheers!
 
OK here's a non specific question-- can CWM backup to a microSD formatted as ext3 or ext4? Because fat32 only supports files up to 4gb which would be too small for a full backup of the data partition
 
OK here's a non specific question-- can CWM backup to a microSD formatted as ext3 or ext4? Because fat32 only supports files up to 4gb which would be too small for a full backup of the data partition

Well, each custom recovery is (typically *) built specifically for a particular device. So, there's usually the default output/save location that is set in that custom recovery that dictates where it will write (unless some of the newer ones let you specific where to create them--I'm not sure).

But yes, you are limited by not only the total space available, but the file system limitations as you mentioned.

* I say "typically" because some devices have used custom recoveries that were built for other phones, but work (or mostly work) because of the hardware layout being identical or nearly so.
 
Can anybody explain why a device has to be rooted in order for the DD command to work from CWM Recovery? Why would the recovery care about the status of the OS? If it can flash a ROM, surely it can access the raw sectors of the data partition to back them up to a microSD...
 
Can anybody explain why a device has to be rooted in order for the DD command to work from CWM Recovery? Why would the recovery care about the status of the OS? If it can flash a ROM, surely it can access the raw sectors of the data partition to back them up to a microSD...

Do you mean you're getting a permission error from within an adb shell invoked to your phone whilst in custom recovery?

You should naturally have root ("#" prompt) at that point since the custom recovery would/should have enabled that.

Most partitions are not auto-mounted when you enter recovery, so it might be that you're just not seeing them available because of that?
 
Back
Top Bottom