New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Backup of the /data/media Partition #176

Open
siraltus opened this Issue Jun 19, 2013 · 4 comments

Comments

Projects
None yet
5 participants
@siraltus

siraltus commented Jun 19, 2013

Currently TWRP does not give the option to backup the /data/media partition (internal SD).

Being able to back up and restore /data/media would greatly simplify switching between factory images (which overwrite /data/media when flashed) and custom images. For example, flashing a factory image via ODIN to update sboot, tz, hidden, and other otherwise inaccessible partitions, and then restore back to the user's custom image.

Currently, the only way to efficiently back up /data/media is to do a manual adb pull (as the adb backup command has proven unreliable) and restore with an adb push. This method is cumbersome and error-prone - for example, if the user forgets to chown everything in /data/media to media_rw:media_rw right after the push restore, Android won't be able to modify any of the restored files, as adb sets the owner to root:root.

@qwerty22

This comment has been minimized.

Show comment
Hide comment
@qwerty22

qwerty22 Jul 15, 2013

I support this request. Please add the base ability to create a backup of /data/media (/sdcard, /storage/sdcard0) on Galaxy S3 I9300.

qwerty22 commented Jul 15, 2013

I support this request. Please add the base ability to create a backup of /data/media (/sdcard, /storage/sdcard0) on Galaxy S3 I9300.

@tboby

This comment has been minimized.

Show comment
Hide comment
@tboby

tboby Apr 15, 2015

I also support this request. My primary use of TWRP is to recover data when I cannot boot to system.

adb pull often fails due to filename issues, whereas the TWRP backup method handles this. There is no simple method to use adb to recover all data on the phone, even with root access.

tboby commented Apr 15, 2015

I also support this request. My primary use of TWRP is to recover data when I cannot boot to system.

adb pull often fails due to filename issues, whereas the TWRP backup method handles this. There is no simple method to use adb to recover all data on the phone, even with root access.

@Diapolo

This comment has been minimized.

Show comment
Hide comment
@Diapolo

Diapolo Apr 15, 2015

+1 from me

Diapolo commented Apr 15, 2015

+1 from me

@matthijskooijman

This comment has been minimized.

Show comment
Hide comment
@matthijskooijman

matthijskooijman Mar 13, 2018

At #276 (comment) it was implied by @bigbiff that there is no interest to implement this feature by the TWRP devs, but that a patch would be welcome. I'd welcome anyone wanting to create that patch.

There is a patch available at omnirom/android_bootable_recovery#39, but apparently TWRP wants patches submitted through Gerrit, not Github. Also, AFAICS that patch adds a compiletime option to include /data/media, while that would require people to self-compile the TWRP image, or two flavours of the official image must be offered, neither of which seem useful to me.

Instead, I can imagine that adding an extra checkbox "storage" (disabled by default?) would be a cleaner way to handle this. Alternatively, allowing a full backup of /data might be another option (e.g. generate an image file instead of a tarball), but I'm not sure what would be easier.

matthijskooijman commented Mar 13, 2018

At #276 (comment) it was implied by @bigbiff that there is no interest to implement this feature by the TWRP devs, but that a patch would be welcome. I'd welcome anyone wanting to create that patch.

There is a patch available at omnirom/android_bootable_recovery#39, but apparently TWRP wants patches submitted through Gerrit, not Github. Also, AFAICS that patch adds a compiletime option to include /data/media, while that would require people to self-compile the TWRP image, or two flavours of the official image must be offered, neither of which seem useful to me.

Instead, I can imagine that adding an extra checkbox "storage" (disabled by default?) would be a cleaner way to handle this. Alternatively, allowing a full backup of /data might be another option (e.g. generate an image file instead of a tarball), but I'm not sure what would be easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment