• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Android internal sd card partitions (or dead galaxy)

screaminbug

Well-Known Member
Hi,

Can anyone please check and post the output of parted from their galaxy.

Code:
adb shell
parted /dev/block/mmcblk0
print

I've kinda messed things up. Probably formatted one of the sd partitions with wrong FS. Result is that recovery (mini recovery mode) won't mount internal sd. That means i cannot put rectools on it to do a nandroid restore of my system.

Here is what log says.
Code:
[    6.228793] FAT: bogus number of reserved sectors
[    6.228845] VFS: Can't find a valid FAT filesystem on dev mmcblk0p2.
[    6.229093] init: command 'mount' r=-1(Invalid argument)
[    8.833529] init: command 'mount' r=-1(No such file or directory)
[    8.840341] init: Unable to open persistent property directory /data/property errno: 2

And if anyone has some idea how to get parted (or any other partitioning utility) working on minimal recovery, please do tell.

su is not possible (permission denied).

I didn't try to flash stock rom or anything, cause it probably won't help (as the sdcard can't be mounted). I guess my only hope is to try to correct the problem with the filesystem somehow.

Any help or any suggestion would be much appreciated.

For now the only thing I can do is to switch my phone off. :(
 
So I didn't switch it off.

The solution is quite simple.

Code:
mkdosfs /dev/block/mmcblk0p2

(doh)

reboot

adb push still won't push to sd card for some reason (permission denied !??)

but I managed to mount it on a PC with:
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file

And copied rectools. Now just have to copy nandroid backup on sd and restore it. (hopfully it'll work)

EDIT: yes!!! :)
 
Everything except copying backup to a pc and restoring files back on sd was done on the device's shell.

I should have just used mkdosfs in the first place. Instead I've used parted, deleted a partition, recreated partition with fat32 fs (which is the right FS), but something obviously went terribly wrong (probably someone with low-level knowledge of FSes could tell why).

Then even though I could mount this newly created partition and copy backed up files back on sd, the system couldn't mount it after reboot (and consequently couldn't do much -- since rectools are loaded from sd).

But one thing still eludes me. Why adb push something /sdcard returns "permission denied" when in recovery mode? Good thing I found a way to usb-mount the sdcard on a pc from the device's shell. Then I could just copy the files from my hard drive using standard cp command on a pc (running linux).
 
Probably wouldn't even bother to check permissions if you didn't mention it. But as you mentioned it, I've gone and checked. It looks ok (drwxrwxrwx).

The funny thing is that only in recovery adb push xxxx /sdcard doesn't work. It works happily when the system is booted.

Now this doesn't pose a problem to me, but if you or anyone else is interested, I probably could poke about a bit to see what's going on here.
 
were you able to fix your galaxy? I'm having the same problem here, forgot to disable lagfix before flashing. I would appreciate it if you helped me fix it.
 
So I didn't switch it off.

The solution is quite simple.

Code:
mkdosfs /dev/block/mmcblk0p2

(doh)

reboot

adb push still won't push to sd card for some reason (permission denied !??)

but I managed to mount it on a PC with:
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file

And copied rectools. Now just have to copy nandroid backup on sd and restore it. (hopfully it'll work)

EDIT: yes!!! :)

I got the same problem, but i have more problem, my samsung looks like not responding after boot. and while in recoveru mode, i see the internal SD Card is not wiped after i wipe it to factory mode. Can you help me ?

I am using Samsung Galaxy mini 2
 
Back
Top Bottom