Also a big part of this article is copied from BackupTheEFS, it would be better to find a way to include content instead.
It probably depends on the devices and the Android versions.
On Replicant 6.0, it contains at least the application internal data: When various applications are installed, they have access to some storage where they can read and write data that is only visible to them and not to other applications. This is part of the Android security model that doesn't trust applications even if they are fully free software.
In addition, on some devices it also contains the users data. This location and external microSD cards is where users typically their files like Music, photos, etc.
If is used for several distinct things that are often mounted in different locations at the same time (through fuse).
Summarry:Mount points | Content |
/data/ | Applications (internal) data |
/sdcard /storage/<UUID> |
User accessible storage to store music, photos, etc |
Here's where the sdcard user accessible storage comes from:
/sdcard -> /storage/self/primary [1]
/storage/self/primary -> /mnt/user/0/primary [2]
/mnt/user/0/primary -> /storage/emulated/0 [3]
1
root@i9300:/ # readlink /sdcard /mnt/user/0/primary
2
root@i9300:/ # readlink /storage/self/primary /mnt/user/0/primary
3
root@i9300:/ # readlink /mnt/user/0/primary /storage/emulated/0
4
root@i9300:/ # mount | grep "/storage/emulated" /dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)TODO:
First, you need to make sure that the data partition is not mounted.
To do that, you can run this command:
adb shell "umount -l /data"
If the /data partition was mounted, it will unmount it. This will look like that:
$ adb shell "umount -l /data" $
If it was not mounted, it will instead show an error that we can ignore:
$ adb shell "umount -l /data" umount: /data: Invalid argument
Once this is taken care of, we can backup the partition with the following command:
adb pull /dev/block/platform/dw_mmc/by-name/USERDATA ./