[Android Q&A, Help & Troubleshooting] Blackion:
I would like to copy a block that contains userdata to SD or a PC.

The author of undelete suggested to use:

adb shell su cat /dev/block/platform/msm_sdcc.1/by-name/userdata > /home/data_image.dat

I connected my phone to a PC and wrote in powercmd:

adb shell

su

cat /dev/block/mmcblk1p1 > /home/data_image.dat

sh: can't create /home/data_image.dat: No such file or directory

What am I doing wrong?

The second question is how to find out what block contains userdata? I just guessed it might be in mmcblk1p1.

When I write "mount" I get:

mount

tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0

devpts /dev/pts devpts rw,relatime,mode=600 0 0

proc /proc proc rw,relatime 0 0

sysfs /sys sysfs rw,relatime 0 0

none /acct cgroup rw,relatime,cpuacct 0 0

tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0

tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0

tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0

none /dev/cpuctl cgroup rw,relatime,cpu 0 0

/emmc@android /system ext4 ro,noatime,noauto_da_alloc,commit=1,data=ordered 0 0

/emmc@usrdata /data ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0

/emmc@cache /cache ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0

/emmc@protect_f /protect_f ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0

/emmc@protect_s /protect_s ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0

/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

/dev/block/vold/179:97 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/vold/179:97 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0

/dev/block/dm-0 /mnt/asec/com.outfit7.talkingtom2free-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0

/dev/block/dm-1 /mnt/asec/com.skype.raider-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0

/dev/block/dm-2 /mnt/asec/com.VAMflax.ChopperMike-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0

I tried going into this dir and ls -al it:

root@android:/dev/block/platform # ls -al

ls -al

drwxr-xr-x root root 2015-07-08 11:57 mtk-msdc.1

oot@android:/dev/block/platform/mtk-msdc.1 # ls -al

ls -al

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk1 -> /dev/block/mmcblk1

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk1p1 -> /dev/block/mmcblk1p1

For some reason mtk-msdc.0 is not visible via ls -al!? But I can cd to it:

root@android:/dev/block/platform/mtk-msdc.0 # ls -al

ls -al

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0 -> /dev/block/mmcblk0

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0boot0 -> /dev/block/mmcblk0boot0

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0boot1 -> /dev/block/mmcblk0boot1

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0p1 -> /dev/block/mmcblk0p1

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0p2 -> /dev/block/mmcblk0p2

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0p3 -> /dev/block/mmcblk0p3

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0p4 -> /dev/block/mmcblk0p4

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0p5 -> /dev/block/mmcblk0p5

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk0p6 -> /dev/block/mmcblk0p6

So, according to https://blog.avast.com/2014/07/09/android-foreniscs-pt-2-how-we-recovered-erased-data/ that uses "mount" to discover the block for userdata, my userdata is located at /emmc@usrdata. But I'm not sure how can I access this directory.

Another thing I don't understand:

shell@android:/dev/block/platform/mtk-msdc.1 $ ls -al

ls -al

drwxr-xr-x root root 2015-07-08 11:57 by-num

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk1 -> /dev/block/mmcblk1

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk1p1 -> /dev/block/mmcblk1p1

shell@android:/dev/block/platform/mtk-msdc.1 $ su

su

root@android:/dev/block/platform/mtk-msdc.1 # ls -al

ls -al

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk1 -> /dev/block/mmcblk1

lrwxrwxrwx root root 2015-07-08 11:57 mmcblk1p1 -> /dev/block/mmcblk1p1

root@android:/dev/block/platform/mtk-msdc.1 #

As you can see, my phone ACER Z130 uses "by-num" instead of "by-name" for some reason.

I also wonder why after su I cannot see this dir in ls -l.

Also, some more tries:

D:\Program Files\PowerCmd>adb shell su cat /dev/block/mmcblk1p1 > /home/data.img

The system cannot find the path specified.

D:\Program Files\PowerCmd>adb shell su cat /dev/block/mmcblk1p1 > /data.img

sh: /dev/block/mmcblk1p1: can't execute: Permission denied

So, after reading for hours about how to do that, I'm still stuck.

Also, note, that it seems that on my phone internal mem and sdcard might be reversed in order. At least File Manager shows that sdcard0 has the content of the sd, and sdcard1 has the content of internal memory.