I have a Galaxy S10e running crDroid 13. I don't have TWRP on it (since it had to be installed from the custom LineageOS recovery), but https://stackoverflow.com/questions/29442630/copy-full-disk-image-from-android-to-computer explains how to get partition images usind adb pull.

Which partitions do I need to back up for a "complete" backup, though? ls -la /dev/block/by-name shows many:

boot -> /dev/block/sda14
bota0 -> /dev/block/sda1
bota1 -> /dev/block/sda2
bota2 -> /dev/block/sda8
bota3 -> /dev/block/sda24
cache -> /dev/block/sda28
cp_debug -> /dev/block/sda30
cpefs -> /dev/block/sdd1
dqmdbg -> /dev/block/sda22
dtb -> /dev/block/sda12
dtbo -> /dev/block/sda13
efs -> /dev/block/sda3
keydata -> /dev/block/sda21
keyrefuge -> /dev/block/sda20
keystorage -> /dev/block/sda6
misc -> /dev/block/sda19
nad_refer -> /dev/block/sda17
omr -> /dev/block/sda29
param -> /dev/block/sda4
persistent -> /dev/block/sda18
product -> /dev/block/sda27
radio -> /dev/block/sda16
recovery -> /dev/block/sda15
sda -> /dev/block/sda
sdb -> /dev/block/sdb
sdc -> /dev/block/sdc
sdd -> /dev/block/sdd
sde -> /dev/block/sde
sec_efs -> /dev/block/sda7
steady -> /dev/block/sda9
system -> /dev/block/sda25
uh -> /dev/block/sda10
uhcfg -> /dev/block/sda11
up_param -> /dev/block/sda5
userdata -> /dev/block/sda31
vbmeta -> /dev/block/sda23
vendor -> /dev/block/sda26

I don't know what most of them do, e.g. bota, cpefs, etc. I suppose I need boot, system, recovery and userdata, but what else?

It's also unclear to me where user files on "internal storage" (/sdcard) are stored. userdata is mounted as /data, but I don't see /sdcard listed in the output of mount. It does show this:

/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/data/media on /mnt/runtime/full/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)

but I don't understand how that works, because /data/media seems to be a regular directory and not a device file.

  • Since the days when /sdcard changed from a real sdcard to an emulated one it is simply a directory on the user data partition. And the sdcard directory is just a soft link in the file-system. Just look at it using ls -l / to see the link targets.
    – Robert
    Jan 14, 2023 at 21:26
  • very good explanation of android partitions on xda-developers android.stackexchange.com/questions/215683/… bear in mind that dump of userdata (+ metadata) partition is encrypted, and becomes useless on factory reset
    – alecxs
    Jan 15, 2023 at 13:46
  • @Robert thanks, OK, so userdata should actually include all user data then. @alecxs Ah maybe that explains why I cannot open the userdata image using the Linux Disks utility! It detects an ext4 filesystem, but fails to mount it with a generic error ("cannot mount /dev/loop0 read-only (udisks-error-quark, 0)"). I have stock ROM files, but don't know how to get the partition names from those. It's just the standard AP, BL, CP, CSC and HOME_CSC tar files.
    – EM0
    Jan 15, 2023 at 21:38
  • OK, I opened the tar files in in 7z and opened the .pit file in GGSM_PIT_VIEWER [i.stack.imgur.com/tiN8Z.png], but both include userdata, which obviously does need to be backed up. So I'm not sure how this tells me which partitions to back up.
    – EM0
    Jan 16, 2023 at 20:57
  • Also, with userdata being encrypted this would make the backup useless after a factory reset, as I understand, so perhaps this backup method is not so useful after all. Maybe booting to TWRP via adb fastboot boot twrp.img and doing backups from TWRP would be a better option, after all.
    – EM0
    Jan 16, 2023 at 20:59


You must log in to answer this question.

Browse other questions tagged .