[Galaxy S 4 Mini Q&A, Help & Troubleshooting] sumeruter:
This is how I got my data from my GT-I9192 with TWRP and CM13. I don't know if it works for the other GT-I91XX models or with other firmware, but if you are in a similar situation like me it is worth a try. ;)

Background:

I installed Cyanogenmod 13 and TWRP successfully about two month ago.

About a week ago my phone suddenly was black and did not want to boot at all. I convinced it to restart after pulling battery/recharge cable some times and putting them back, sometimes whilest holding power button pressed at the same time, until it gave a life sign again.

Current situation:

My phone stucks at samsung logo splash screen and reboots.

When trying to boot into recovery (TWRP; VOL.UP+HOME(+POWER)) the TeamWinRecovery logo screen is shown but then reboots.

Download mode (VOL.DOWN+HOME) works, Odin recognizes phone, but flashing TWRP successfully again does not fix anything.

Fastboot and adb do not recognize phone while it is in boot loop/recovery start loop/download mode!

But the interesting part is:

I am able to get via adb shell onto the phone while it is offline! Pull battery, put it back again, connect the phone via USB to PC and leave it off. Battery charging screen shows up and about a minute later adb shell is possible. It is in a strange state then, neither sdcard nor any else partition besides system is mounted, but mounting sdcard and data partition manually is possible.

Required:

Installed Samsung drivers, downloaded ADB tools, CM13(?), root enabled for adb.

make sure phone is off (pull battery/cable, put it back again)

connect phone via usb to pc

at pc cmd type

adb wait-for-device

when prompt is back, type

adb shell

use the commands below to get to your data

list internal partitions by name:

ls -l /dev/block/platform/msm_sdcc.1/by-name

output:

total 0
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 backup -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 boot -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 cache -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 efs -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 fota -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 fsg -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 hidden -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 modemst1 -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 modemst2 -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 pad -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 param -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 persdata -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 persist -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 recovery -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 rpm -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 sbl2 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 sbl3 -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 ssd -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 system -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 tz -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 userdata -> /dev/block/mmcblk0p24 [COLOR="red"]<<< there is your userdata[/COLOR]

list all partitions with size:

cat /proc/partitions

output:

major minor #blocks name

179 0 7634944 mmcblk0
179 1 61440 mmcblk0p1
179 2 128 mmcblk0p2
179 3 256 mmcblk0p3
179 4 512 mmcblk0p4
179 5 2048 mmcblk0p5
179 6 512 mmcblk0p6
179 7 512 mmcblk0p7
179 8 12800 mmcblk0p8
179 9 8192 mmcblk0p9
179 10 13952 mmcblk0p10
179 11 3072 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 10240 mmcblk0p13
179 14 10240 mmcblk0p14
179 15 10240 mmcblk0p15
179 16 7160 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 8 mmcblk0p18
179 19 8192 mmcblk0p19
179 20 12288 mmcblk0p20
179 21 1536000 mmcblk0p21
179 22 204800 mmcblk0p22
179 23 36864 mmcblk0p23
179 24 5685231 mmcblk0p24 [COLOR="red"]<<< userdata partition has about 5.7 GB size[/COLOR]
179 32 30703616 mmcblk1
179 33 30703582 mmcblk1p1 [COLOR="red"]<<< this is your external sdcard partition[/COLOR]

get partition format

blkid

output:

/dev/block/mmcblk0p1: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat"
/dev/block/mmcblk0p10: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p19: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p20: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p21: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p22: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p23: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p24: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4" [COLOR="Red"]<<< userdata has ext4 format[/COLOR]
/dev/block/mmcblk1p1: UUID="02A3-21FE" LABEL="Volume" TYPE="exfat" [COLOR="Red"]<<< external sdcard has exfat format[/COLOR]

get currently mounted partitions

mount

output:

rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
none on /sys/fs/cgroup type tmpfs (rw,seclabel,relatime,mode=750,gid=1000)
none on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
none on /dev/memcg type cgroup (rw,relatime,memory)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
none on /sys/fs/cgroup/bfqio type cgroup (rw,relatime,bfqio)
/dev/block/mmcblk0p21 on /system type ext4 (ro,seclabel,relatime,data=ordered)

neither data nor external sdcard is mounted :rolleyes:

mount your external sdcard

mkdir /mnt/sdext
mount /dev/block/mmcblk1p1 /mnt/sdext

extract your data partition as image to your sdcard

dd if=/dev/block/mmcblk0p24 of=/mnt/sdext/userdata.img

important info: as your data partition is larger than 4GB, you can only put the whole image to your sdcard if it is in exFat or NTFS format (fat32 does not allow files larger than 4GB). You could copy the image splitted like follows:

dd if=/dev/block/mmcblk0p24 of=/mnt/sdext/userdata_1.img count=4000000
dd if=/dev/block/mmcblk0p24 of=/mnt/sdext/userdata_2.img skip=4000000

copy your images later to pc and put it together in windows cmd with

copy /B userdata_1.img + userdata_2.img userdata.img

Not tested though.

look if there is enough space on your external sdcard

df -H

H=human readable sizes with 1000 based system; use no option to list number of 1k blocks; use -P do list 512byte blocks, usefull as dd uses same block size per default

output:

Filesystem Size Used Avail Use% Mounted on
tmpfs 708M 41k 708M 1% /dev
none 708M 0 708M 0% /sys/fs/cgroup
tmpfs 708M 0 708M 0% /mnt
/dev/block/mmcblk0p21 1.5G 986M 562M 64% /system
/dev/block/mmcblk0p24 [COLOR="red"]5.7G[/COLOR] 5.3G 423M 93% /mnt/userdata
/dev/block/mmcblk1p1 31G 14G [COLOR="red"]18G[/COLOR] 44% /mnt/sdext

or mount your internal data partition as well and copy only the data you need

mkdir /mnt/userdata
mount /dev/block/mmcblk0p24 /mnt/userdata

use cd and ls -al commands to find your desired data;

in a secondary cmd at your pc copy directly to your pc via e.g. (contacts, sms, photos, TWRP backup, ...)

adb pull /mnt/userdata/data/com.android.providers.contacts/databases/contacts2.db
adb pull /mnt/userdata/data/com.android.providers.telephony/databases/mmssms.db
adb pull /mnt/userdata/media/0/DCIM
adb pull /mnt/userdata/media/0/TWRP

However, copying whole directories often failed and resulted in reboot of phone...

So, what to do with this image?

Mounting it in windows as new drive worked very well with OSFMount. As windows can not read ext4 partitions, you might want to install a ext4 driver like ext2fsd. And there is your data. Interesting folders are /media/0 where your internal sdcard data (like photos) resides and /data where all your apps store its data. You can find your contacts here /data/com.android.providers.contacts/databases/contacts2.db and your SMS here /data/com.android.providers.telephony/databases/mmssms.db. You can copy this databases to your new phone or inspect them via sqlite3.exe from your Android Development Tools. Here is a macro that could convert your contacts to vcard.

Credits:

Many of these information can be found at various xda threads, i do not remember all threads where I got which information from. Everything here was written from mind. Google and Wikipedia is also helpfull when it comes to command details. However this thread contains also most of the commands i showed above. This thread might give some inspirations about reading ext4 partition images under windows. If you feel that another thread has to be mentioned here, please write a message and I'll add it.