Can't delete directory form /storage/sdcard0

5.7k Views Asked by At

I have a Verizon Samsung Galaxy Note 2 running Android 4.1.1, rooted, with SuperSU. I have an app, FltPlanMobile that has become corrupted. I can delete the app but its config files remain behind so I want to delete them too. But for some reason, it won't go away. Here's what I'm trying (sorry for inlining but when I tried to create a code block, all the lines ran together):

C:\Program Files\Android\android-sdk-windows\platform-tools>adb shell

shell@android:/ $ su

su

root@android:/ # mount -o rw,remount /system

mount -o rw,remount /system

root@android:/ # cd /storage/sdcard0

cd /storage/sdcard0

root@android:/storage/sdcard0 # ls -l ls -l

drwxrwxr-x root sdcard_rw 2014-01-06 12:07 CallRecorder

drwxrwxr-x root sdcard_rw 2014-01-06 12:08 DCIM

drwxrwxr-x root sdcard_rw 2014-01-06 12:15 FltPlanMobile

...

root@android:/storage/sdcard0 # rm -r FltPlanMobile

rm -r FltPlanMobile

rm failed for FltPlanMobile, Permission denied

255|root@android:/storage/sdcard0 #

I also tried deleting this directory with RootExplorer, FileExpert, and issuing the commands directly from a terminal emulator window on the phone itself. Nothing works. But if I do for example mkdir foo, then rm foo works fine.

Here's something else odd - I can do a chmod 777 FltPlanMobile without getting an error. But when I ls -l again, the permissions haven't changed.

I don't get it - I have root, I'm mounted r/w, I'm pretty sure I'm on the actual file rather than a symlink, root owns this directory, the app has already been deleted so nothing should have a lock on it, what am I missing? Any help would be greatly appreciated.

1

There are 1 best solutions below

2
On

I had the same problem, but SDCard0 and SDCard1 are just links. The real directory is in data/media. Change the permissions of data/media and it will change the permissions of sdcard0 automatically without reverting. It worked for me! I was about to give up, but I tried that and it worked perfectly.