Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Enable Backup of the /data/media Partition #176
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.
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.
referenced this issue
Nov 28, 2016
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
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