# adb su permission denied, no rom, rooted, need to fix internal sd card

im trying to fix a friends phone GT-I9000. basically i get error in mounting sdcard. after searching endlessly and installing 100s of stock rom. still no luck.

i assume that the partition on my internal sd card is corrupted.

i have come across this thread. http://forum.xda-developers.com/show....php?t=1253036

im hoping i can reset my partition on the sdcard.

but i can't get su permission on android sdk adb shell command phone is in clockwork recovery mod when running the adb commands

i.e. this is the code i have to do..

adb shell
mount /sdcard
su
parted /dev/block/mmcblk0
rm 1
rm 2
rm 3
quit


but it ends up like...

adb shell
~ $mount /sdcard mount /sdcard mount: permission denied (are you root?) ~$


the su command it not recongised.... any ideas?

the phone will not boot into any rom. only option is recovery or download mode. i have rooted it with CF-ROOT, which in turn installs CWM

therefore i can't install or turn on debugging

adb shell
mount /sdcard
su


adb shell
~ \$ mount /sdcard
mount /sdcard
mount: permission denied (are you root?)


it becomes quite clear why your su is not recognized: it comes too late. You need to move it one line up, as mount already requires root. Still, that would launch another shell, and wait for your input. Once you exit, the remaining commands would be executed. So correctly put, it should look like this:

adb shell
su
mount /sdcard


or like this:

adb shell su -c 'mount /sdcard'


So this part would work. The next part is something completely different:

su parted /dev/block/mmcblk0
rm 1
rm 2
rm 3
quit


The first line is your command. But the remaining lines are no shell commands, but the input to parted, so this needs to be handled differently:

su parted /dev/block/mmcblk0 <<MyCommandsHere
rm 1
rm 2
rm 3
quit
MyCommandsHere


That's a so-called Here-Doc.