[Galaxy S 4 Mini Q&A, Help & Troubleshooting] sumeruter:
Short story: S4 mini duos (gt-i9192) successfully flashed with CM13 and TWRP. After some month stuck at samsung splash screen with boot loop. No recovery mode (bootloop), download mode is possible, flashing TWRP with Odin again successfull but doesn't help, debrick.img doesn't help, fastboot does not recognize phone, adb shell only works when phone is in battery charge mode (=off).

Everything I describe here is done in this battery charge mode adb shell.

"mount" shows that only system partition is mounted, cache, data and sdext are not mounted:

root@:/ # mount
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)

cache partition is mmcblk0p22:

root@:/ # ll /dev/block/platform/msm_sdcc.1/by-name
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

making an image (or just reading to /dev/null) from cache partition throws no errors:

1|root@:/ # dd if=/dev/block/mmcblk0p22 of=/dev/null
dd if=/dev/block/mmcblk0p22 of=/dev/null
409600+0 records in
409600+0 records out
209715200 bytes transferred in 7.943 secs (26402517 bytes/sec)

mounting userdata or other partitions is possible (grabbing the data also), trying to mount cache throws I/O error:

root@:/ # mkdir /mnt/cache
root@:/ # mount /dev/block/mmcblk0p22 /mnt/cache
mount: '/dev/block/mmcblk0p22'->'/mnt/cache': I/O error

running fsck shows there are problems:

e2fsck -f -c -y /dev/block/mmcblk0p22
e2fsck 1.42.9 (28-Dec-2013)
/dev/block/mmcblk0p22: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway? yes

e2fsck: unable to set superblock flags on /dev/block/mmcblk0p22

/dev/block/mmcblk0p22: ********** WARNING: Filesystem still has errors **********

trying to repair with -p option leads to an error:

e2fsck -f -p /dev/block/mmcblk0p22
/dev/block/mmcblk0p22: recovering journal
/dev/block/mmcblk0p22: Superblock needs_recovery flag is clear, but journal has data.
/dev/block/mmcblk0p22: Run journal anyway

/dev/block/mmcblk0p22: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)

overwriting cache partition with zeros (dangerous:fingers-crossed:) throws no errors (so hopefully the emmc is not totally dead?):

12|root@:/ # dd if=/dev/zero of=/dev/block/mmcblk0p22
dd: /dev/block/mmcblk0p22: No space left on device
409601+0 records in
409600+0 records out
209715200 bytes transferred in 105.509 secs (1987652 bytes/sec)

creating ext4 file system possible:

12|root@:/ # mke2fs -T ext4 /dev/block/mmcblk0p22
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
12800 inodes, 51200 blocks
2560 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=54525952
2 block groups
32768 blocks per group, 32768 fragments per group
6400 inodes per group
Superblock backups stored on blocks:
32768

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

But everything has no effect, fsck still shows the same errors. I have the impression of overwriting the cache partition with zeros does not really do so. Have I done something wrong? Is there any other tool I could run to do a partition check or to fix a partition? Any suggestions appreciated.

all tools from /system/bin and xbin

root@:/system/bin # ll
aapt
acpi -> toybox
am
app_process -> app_process32
app_process32
applypatch
appops
appwidget
arp -> toybox
atrace
base64 -> toybox
basename -> toybox
bcc
bdt
blkid
blockdev -> toybox
bmgr
bootanimation
brctl
btnvtool
btsnoop
bu
bugreport
bzcat -> toybox
cal -> toybox
cat -> toybox
chattr -> toybox
chcon -> toybox
chgrp -> toybox
chmod -> toybox
chown -> toybox
chroot -> toybox
cksum -> toybox
clatd
clear -> toybox
cmp -> toybox
comm -> toybox
content
cp -> toybox
cpio -> toybox
curl
cut -> toybox
dalvikvm -> dalvikvm32
dalvikvm32
date -> toybox
dd -> toolbox
debuggerd
dex2oat
df -> toybox
dhcpcd
dhcptool
diff -> toybox
dirname -> toybox
dmesg -> toybox
dnsmasq
dos2unix -> toybox
dpm
drmserver
du -> toybox
dumpstate
dumpsys
e2fsck
ebtables
echo -> toybox
egrep -> grep
env -> toybox
expand -> toybox
expr -> toybox
fallocate -> toybox
false -> toybox
fdisk -> toybox
fgrep -> grep
file -> toybox
find -> toybox
flock -> toybox
fm_qsoc_patches
free -> toybox
freeramdisk -> toybox
fsck.exfat
fsck.f2fs
fsck.ntfs
fsck_msdos
fsfreeze -> toybox
fstype -> toybox
ftpget -> toybox
ftpput -> toybox
gatekeeperd
gatt_testtool
gdbserver
geomagneticd
getenforce -> toybox
getevent -> toolbox
getprop -> toybox
grep -> toybox
groups -> toybox
gzip
hci_qcomm_init
head -> toybox
help -> toybox
hid
host -> toybox
hostapd
hostapd_cli
hostname -> toybox
hwclock -> toybox
id -> toybox
idmap
ifconfig -> toybox
iftop -> toolbox
ime
inotifyd -> toybox
input
insmod -> toybox
install -> toybox
install-recovery.sh
installd
insthk
ioctl -> toolbox
ionice -> toybox
iorenice -> toybox
iotop -> toybox
ip
ip6tables
iptables
irsc_util
keystore
keystore_cli
kill -> toybox
killall -> toybox
l2test_ertm
ld.mc
linker
lmkd
ln -> toybox
load_policy -> toybox
log -> toolbox
logcat
logd
logname -> toybox
logpersist.cat -> logpersist.start
logpersist.start
logpersist.stop -> logpersist.start
logwrapper
losetup -> toybox
ls -> toolbox
lsattr -> toybox
lsmod -> toybox
lsof -> toybox
lspci -> toybox
lsusb -> toybox
make_ext4fs
makedevs -> toybox
mcap_tool
md5sum -> toybox
mdnsd
media
mediaserver
mkdir -> toybox
mke2fs
mkfifo -> toybox
mkfs.exfat
mkfs.f2fs
mkfs.ntfs
mknod -> toybox
mkswap -> toybox
mktemp -> toybox
mm-qcamera-daemon
modinfo -> toybox
monkey
more -> toybox
mount -> toybox
mount.exfat
mount.ntfs
mountpoint -> toybox
mpdecision
mtpd
mv -> toybox
nandread -> toolbox
nbd-client -> toybox
nc -> toybox
ndc
netcat -> toybox
netd
netstat -> toybox
newfs_msdos -> toolbox
nice -> toybox
nl -> toybox
nohup -> toybox
nproc -> toybox
oatdump
od -> toybox
partprobe -> toybox
paste -> toybox
patch -> toybox
patchoat
pgrep -> toybox
pidof -> toybox
ping
ping6
pivot_root -> toybox
pkill -> toybox
pm
pmap -> toybox
pngtest
pppd
printenv -> toybox
printf -> toybox
prlimit -> toolbox
ps -> toolbox
pwd -> toybox
pwdx -> toybox
qmuxd
qseecomd
r
racoon
radiooptions
radish
readahead -> toybox
readlink -> toybox
realpath -> toybox
reboot
renice -> toybox
requestsync
reset -> toybox
resize -> toybox
resize2fs
restart -> toolbox
restorecon -> toybox
rev -> toybox
rfc
rfkill -> toybox
rild
rm -> toybox
rmdir -> toybox
rmmod -> toybox
rmt_storage
route -> toybox
run-as
runcon -> toybox
schedtest
scp
screencap
screenrecord
sdcard
secdiscard
sed -> toybox
sendevent -> toolbox
sensorservice
seq -> toybox
service
servicemanager
setenforce -> toybox
setprop -> toybox
setsid -> toybox
settings
sftp
sgdisk
sh
sha1sum -> toybox
showlease
sleep -> toybox
sm
sort -> toybox
split -> toybox
ssh
ssh-keygen
sshd
start -> toolbox
start-ssh
stat -> toybox
stop -> toolbox
strings -> toybox
su -> ../xbin/su
surfaceflinger
svc
swapoff -> toybox
swapon -> toybox
sync -> toybox
sysctl -> toybox
sysinit
tac -> toybox
tail -> toybox
tar -> toybox
taskset -> toybox
tc
tee -> toybox
telecom
telnet -> toybox
test -> toybox
thermald
time -> toybox
time_daemon
timeout -> toybox
tinycap
tinymix
tinypcminfo
tinyplay
tm
toolbox
top -> toolbox
touch -> toybox
toybox
tr -> toybox
tracepath
tracepath6
traceroute -> toybox
traceroute6
true -> toybox
truncate -> toybox
tty -> toybox
tune2fs
tzdatacheck
uiautomator
ulimit -> toybox
umount -> toybox
uname -> toybox
uncrypt
uniq -> toybox
unix2dos -> toybox
uptime -> toybox
usleep -> toybox
vconfig -> toybox
vdc
vmstat -> toybox
vold
watch -> toybox
wc -> toybox
wcnss_service
which -> toybox
whoami -> toybox
wm
wpa_cli
wpa_supplicant
xargs -> toybox
xxd -> toybox
xzcat -> toybox
yes -> toybox

root@:/system/xbin # ll
7z
add-property-tag
bash
bzip2
check-lost+found
cpustats
dexdump
fio
gunzip -> pigz
gzip -> pigz
htop
ksminfo
latencytop
librank
ls -> /system/bin/toybox
ltrace
micro_bench
micro_bench_static
nano
perfprofd
pigz
powertop
procmem
procrank
ps -> /system/bin/toybox
puncture_fs
rawbu
rsync
sane_schedstat
showmap
showslab
simpleperf
sqlite3
strace
su
taskstats
tcpdump
unpigz -> pigz
unrar
unzip
vim
wget
zcat -> pigz
zip