Reading files from Android SD-cards

$ adb root
restarting adbd as root
$ adb shell
X704L:/ # cd /data/misc/vold
X704L:/data/misc/vold # ls -l
-rw------- 1 root root 16 expand_8838e738a18746b6e435bb0d04c15ccd.key
# od -t x1 expand_8838e738a18746b6e435bb0d04c15ccd.key
0000000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
0000020
# dmsetup create crypt1 --table "0 `blockdev --getsize /dev/mmcblk0p2` crypt \
aes-cbc-essiv:sha256 00010203040506070809010a0b0c0d0e0f 0 /dev/mmcblk0p2 0"
# mount -t f2fs /dev/mapper/crypt1 /mnt/
mount: /mnt: mount(2) system call failed: Structure needs cleaning.
# ddrescue -d /dev/mapper/crypt1 /wd/sd-dump.img /wd/sd-dump.log
# cp /wd/sd-dump.img /wd/sd-dump-backup.img
# mount -o loop /wd/sd-dump.img /mnt/
mount: /mnt: mount(2) system call failed: Structure needs cleaning.
# fsck.f2fs sd-dump.img
# mount -o loop sd-dump.img /mnt/
# ls /mnt/
app local media misc user user_de
$ adb root
restarting adbd as root
$ adb shell
X704L:/ #
X704L:/ # df(...)
/dev/block/dm-1 477G 3.9G 473G 1% /mnt/expand/6fe8c926-fda9-476d-822c-f7d5856d1847
# cd /mnt
# find . -type d -exec adb shell mkdir \"/mnt/expand/6fe8c926-fda9-476d-822c-f7d5856d1847/{}\" \;
# cd /
# adb push mnt/. /mnt/expand/6fe8c926-fda9-476d-822c-f7d5856d1847
drwx------. 10 1010131 1010131 3488 nov.  28  2019 com.arrowstar.FunnyFoodsLite
drwx------. 6 1010133 1010133 3488 aug. 22 2019 com.bimiboo.adventure
drwx------. 10 1010132 1010132 3488 sep. 17 2019 com.binibambini.MiniABCLite
drwx------. 10 1010144 1010144 3488 sep. 26 20:01 com.gameloft.android.ANMP.GloftDMHM
chown -R 1010131:1010131 com.arrowstar.FunnyFoodsLite/
chown -R 1010134:1010134 com.jingle.kidslearnabc/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store