I have nothing against root except eFUSE. Whose ever idea eFUSE was . . .
As far as I understand:
Because of amateur users and clueless minimalists who don't know how to utilise tools that are intended for power users, the development team of TWRP has controversially decided that their NANDROID backup does not include /data/media.
More information and sources in these comments:
1. Best practice for backing up /data/media?
2. Best practice for backing up /data/media?
What I want is a block-level image backup of the entire phone, so that I can return to the exact spot later on.
I want that block-level backup to include the /data/media
partition.
Now, I have found out it is possible via ADB, but that requires root. If there is really no other way, I would consider taking the risk of rooting the phone after doing any other possible backup method (adb app backup, file backup, etc.)
But my question is:
Is it technically possible to do a block-level (dd) backup of the /data/media partition without root?
Had the developement team of TWRP decided to include /data/media
, pleasing power users and maximalists instead of minimalists and amateur users, would it actually have been possible without root?
/data/media
is not/dev/media
. Former is a directory ofuserdata
partition which is mounted at/data
. So in a sense you want to backup the whole block device ofuserdata
partition. That's possible without rooting your actual OS. But you need an unlocked bootloader to boot in TWRP. From there you candd
out any block device, even the whole flash memory chip. But why do you want a block level access? A simpletar
of/sdcard
is sufficient in most cases./sdcard
(which exposes/data/media
to us) is an emulated filesystem with a subset of filesystem features. E.g. you can't change permissions and SELinux context of files, those are fixed. So they even don't need to be backed up and restored. Filesystem attributes (such as immutable flag) are supported on/sdcard
but can't be backed up withtar
./data/media
directly (with root access), you should take care of file permissions and SELinux contexts. Tar supports backing up a lot of metadata; permissions (including owner and group), timestamps (including mtime, atime, ctime) and extended attributes (including ACLs, SELinux contexts and file capabilities). Interestingly, TWRP also createstar
backups of filesystems like/data
,/system
,/vendor
etc.