How to recover a System partition that won't mount A relative of mine brought me his Galaxy S4 Mini GT-I9190, which is stuck at boot. When I boot into recovery it gives the error Failed to mount /system (invalid argument).

How can I dig through the file-system of an android phone which doesn't boot, except in Recovery? The goal is not to flash it but to recover the data if possible.

I don't mind rooting or flashing, but I don't want to overwrite the system partition that may still have the valuable info on it. I've managed to install clockworkmod according to these instructions.

Is there a way to mount it, or expose the raw device to USB, or just back it up to SD, without overwriting it?

EDIT: Now I have Clockworkmod installed. Trying to use it to make a backup of /system. It fails to mount /system with the message:

mounting /dev/block/platform/msm_sdcc.1/b/system on /system failed: Invalid Argument
W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/system (File exists)


EDIT 2: with ADB shell I looked into /system, found an empty folder called bin and removed it. Now mounting /system fails with a longer error:

Error mounting /system!
W:failed to mount /dev/block/platform/msm_sdcc.1/by-name/system (File exists)
I:Can't partition non mmcblk device: /devices/platform/msm_sdcc.3/mmc_host
My not-so-great solution ended up like this:


ClockWorkMod, installed with Odin according to the instructions (Odin seems to be slightly un-official so you're unfortunately always downloading from someone's Box or google drive, which is a bit uncomfortable)
ADB shell, (on PC: install java SDK, install android development kit)

Mount the SD card with CWM
In the shell, using DD to clone the unmountable partitions I wanted onto the SD, for later recovery
using CWM to mount the SD as a USB drive, moving the piece-of-partition to the PC
Repeat

Download fresh firmware from Sammobile and flash with Odin
Scratch through the partitions with a hex editor, to find the data I needed. Fortunately this was just text, things like pictures would have been harder.


A few features were still not working, WiFi for one, so the phone had to go back to the shop to be flashed with official firmware. At least it had the official bootloader on it at that stage, not CWM.