Register

Cannot delete two folders on SDCard

This is a discussion on Cannot delete two folders on SDCard within the Rescue Squad forums, part of the Galaxy Nexus Support Forum category; I have a VZW Galaxy Nexus, rooted 4.0.4 using WUG's tool. Previously it was at 4.0.2 and I had CWM recovery, so OTA wouldn't work; ...

+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Milky Way
    Member #
    11201
    Join Date
    Jun 2012
    Posts
    4

    Cannot delete two folders on SDCard

    I have a VZW Galaxy Nexus, rooted 4.0.4 using WUG's tool. Previously it was at 4.0.2 and I had CWM recovery, so OTA wouldn't work; I downloaded 4.0.4 from Google, flashed and rooted using WUG's. I then restored the data backup and the phone backup that I took prior to rooting.

    Root was successful, I have superuser access, everything works in that regard. But, the restore somehow corrupted permissions on the DCIM and Nitrodesk folders (used for the camera of course, and for Touchdown's attachments). As a result, the camera became unable to save pictures, and Touchdown became unable to save attachments.

    After research, I found that renaming the problematic folders was the solution. I renamed DCIM to DCIM_bad and Touchdown to Nitrodesk_bad. I then rebooted the phone, took a picture with the camera - it saved correctly - and downloaded an email attachment - it also saved correctly. As expected, the camera and Touchdown both created new DCIM and Nitrodesk folders.

    Now, I have DCIM_bad and Touchdown_bad folders left over on the SD Card. I tried connecting the phone to my computer and deleting the folders via Windows Explorer. They disappear from the Explorer window, but are not in fact deleted from the SD Card; next time I connect the phone, they reappear. When I look at the SD Card contents via EStrong's File Explorer, I can see both Nitrodesk_bad and DCIM_bad, even though I "deleted" both of them via Explorer.

    If I try to delete the folders or any of their contents on the phone via EStrong's, I receive a message "<BLAH> cannot be deleted!", where <BLAH> is the name of the object I'm trying to delete. This applies to folders, subfolders and individual files of any time. If I look at Properties of the files/folders in question, they are showing readable and writable and not hidden. I can copy them, but not delete them. EStrongs has Superuser permissions.

    This is really disturbing and maddening. Could someone please help?

  2. # ADS
    Ads


  3. #2
    Vega
    Member #
    886
    Liked
    223 times
    Join Date
    Dec 2011
    Location
    new haven, CT
    Posts
    752
    Try to install terminal emulator and do it from the command line.. su to root first.
    Open terminal emulator:
    Type su then press enter
    Type 'cd /sdcard' press enter
    Type ls then press enter (to make sure you're in the right dir, and you see your DCIM_bad directory.)
    Type 'rm -r ./directoryname' (where directoryname is the name of the directory you wish to delete)
    Remember that the command prompt is case sensitive. and don't include the ' marks around the commands
    Last edited by fnmetal; 06-14-2012 at 04:39 PM.

  4. #3
    Milky Way
    Member #
    11201
    Join Date
    Jun 2012
    Posts
    4
    Permission denied on attempt to delete either directory. Attributes on both directories are drwxrwxr -x.

  5. #4
    Vega
    Member #
    886
    Liked
    223 times
    Join Date
    Dec 2011
    Location
    new haven, CT
    Posts
    752
    Hmm, that really is strange..

  6. #5
    Sirius
    Member #
    8985
    Liked
    31 times
    Twitter
    karmasyde
    Join Date
    Apr 2012
    Location
    delton, mi
    Posts
    441
    If all other options are exhausted...I'd relock/unroot using wugs...then unlock/root...restore the backup you originally restored...then run fix permissions see if that clears it up

    Swyped from my sourcerized Lte Gnex via tapatalk 2

  7. #6
    Milky Way
    Member #
    11201
    Join Date
    Jun 2012
    Posts
    4
    Hells no, not worth it. We're talking about 50MB space at most.

    How can this be anyway? This is a Linux OS, and even an MS guy like myself understands that root should have "godlike" access?

    Under Windows, it is actually possible to take away all permissions from an object, and then an administrator won't be able to manipulate it. BUT, the administrator can change permissions on the said object, and give himself rights, and then manipulate the object. Is this what happened here? Do I need to grant myself permissions on the two folders? What would be Linux commands for that?

    I am pretty comfortable with command line.

  8. #7
    Milky Way
    Member #
    11201
    Join Date
    Jun 2012
    Posts
    4
    Anyone? Bueller? Anyone?

    I thought you Linux people hated it when your own OS told you you can't do stuff as root.

  9. #8
    Vega
    Member #
    886
    Liked
    223 times
    Join Date
    Dec 2011
    Location
    new haven, CT
    Posts
    752
    There's corrupted data in the folder, i doubt its a problem with permissions, everything in the SD folder should be rw, especially if you're logged in as root. I think the problem is, you can't mount the SD partition like you can mount a physical SD, because the /sdcard partition is just a portion of all the memory on the device, which is being used by the phone, so it can't be unmounted and remounted by windows, therefore you can't use a dos utility like chkdsk or something to check it for errors, I don't know if there's a way to do it via adb shell, or terminal emulator.. fsck is the command for Linux to check a filesystem for errors, but the sdcard partition would have to be unmounted to run that command..
    The fact that you're dealing with shared memory makes everything difficult unfortunately ..

  10. #9
    Milky Way
    Member #
    15684
    Join Date
    Oct 2012
    Posts
    2
    Quote Originally Posted by Helpless_In_Seattle View Post
    Anyone? Bueller? Anyone?

    I thought you Linux people hated it when your own OS told you you can't do stuff as root.
    You need to relax, I think no one here was being a Linux fan or response you in any offensive terms.

    Anyway, I'm expecting this in a Samsung Galaxy S3 (running CM10) with the internal SDCard and I think it's related and hopefully with more details we can go through the original issue in the Nexus as well:
    - I create two folders using FileZilla connnecting through SHH with SSHDroid
    - I want to remove them and have problems from FileZilla interface
    - If I connect from SSH I can remove all the stuff in /storage/sdcard0 except the two folders. I'm root and it says permission denied. i.e I want to make a ls
    Code:
    ls folder/
    ls: can't open 'folder/': Permission denied
    - Additional to this strange behaviour, I notice that I can rename the folder without problems, even copy to /data or another rw fylesystem but I can't cut the folder or delete it from the internal sdcard
    With the rename option I rename the folders to .garbage and .trash but I can't delete them either
    - I tried creating two folders with same name in my PC and upload them to the phone to overwrite the original ones and get Permission problems again
    - Create a file inside the folders fails too
    Code:
    # touch .garbage/algo
    touch: .garbage/algo: Permission denied
    From CMW I go to the option Mounts & storage->Format sdcard and I have this output:
    Code:
    Formatting /sdcard...
    Error mounting /sdcard!
    Skipping format...
    Done.
    Expected since there is no a specific mount point for the internal SDCard

    As fnmetal said, it beign shared memory and no particular mount point complicates everything, I can't run fdisk i.e and in that case I don't even know which format do I have to give to the 'partition' because /storage/sdcard0 appears to be mounted with fuse

    If you need additional info just let me know

    Thanks in advance
    Last edited by cristianpark; 10-12-2012 at 08:47 AM.

  11. #10
    Milky Way
    Member #
    15684
    Join Date
    Oct 2012
    Posts
    2
    Guys, I put this double post because this one has the solution in it

    I see in mount points something that gets my attention
    Code:
    /dev/fuse on /storage/sdcard0 type fuse (rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other)
    Here you can see that /data/media is mounted with specific user and group ID. I discover by executing 'ps' and 'id' commands that 1023 ID belongs to media_rw user with wich the /data/media folder is mounted. I think login as media_rw user should do the trick but what I did in order to delete the folders was:

    1. Login as root (unnecesary if connected via SSH with SSHDroid)
    Code:
    su
    2. Mount /system with write permissions
    Code:
    mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system
    3. Run sdcard command again (as root)
    Code:
    /system/bin/sdcard /data/media 1023 1023
    4. Go to /data/media and delete the unwanted folders (let's say they are called .trash y .garbage)
    Code:
    rm -rf .trash .garbage
    5. Mount /system with read only permissions again (for security reasons)
    Code:
    mount -o ro,remount -t ext4 /dev/block/mmcblk0p9 /system
    6. Check that the folders doesn't exists
    Code:
    ls -lsa /data/media/
    the output must be something like this (no .trash or .garbage folders in here )
    Code:
    # ls -lsa /data/media/
    total 443361
       4 drwxrwxr-x   14 media_rw media_rw      4096 Oct 12 10:25 .
       4 drwxrwx--x   23 system   system        4096 Oct 12 06:01 ..
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:06 .mmsyscache
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 Alarms
       4 drwxrwxr-x    3 media_rw media_rw      4096 Oct 12 06:03 Android
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 DCIM
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 Download
       4 drwxrwxr-x    5 media_rw media_rw      4096 Oct 12 06:09 GOLauncherEX
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 Movies
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 Music
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 Notifications
       4 drwxrwxr-x    3 media_rw media_rw      4096 Oct 12 08:55 Pictures
       4 drwxrwxr-x    2 media_rw media_rw      4096 Oct 12 06:01 Ringtones
    136520 -rw-rw-r--    1 media_rw media_rw 139791302 Oct 11 23:06 cm-10-20121011.zip
    85104 -rw-rw-r--    1 media_rw media_rw  87138923 Oct 11 23:02 gapps-jb.zip
       4 drwxrwxr-x    3 media_rw media_rw      4096 Oct 12 06:06 xiialive
    I hope this can help the thread creator to solve his problem and stop talking bad about Linux users

 

 

Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Since the GN doesn't have an SDcard
    By cam1john in forum Galaxy Nexus Help
    Replies: 1
    Last Post: 06-08-2012, 10:20 AM
  2. Replies: 3
    Last Post: 04-03-2012, 06:03 PM
  3. clean up /mnt/sdcard
    By stfu21 in forum Galaxy Nexus Help
    Replies: 6
    Last Post: 02-26-2012, 09:40 AM
  4. Lost /sdcard/ directories. What were they?
    By angrybanana in forum Galaxy Nexus Help
    Replies: 0
    Last Post: 02-05-2012, 06:57 PM
  5. Wiping clears /sdcard directory?
    By mach330 in forum Galaxy Nexus Help
    Replies: 16
    Last Post: 12-21-2011, 04:22 PM

Search tags for this page

.mmsyscache

,
.mmsyscache android
,
.mmsyscache folder
,
.mmsyscache folder android
,
android .mmsyscache
,
android mmsyscache
,
can i delete mmsyscache
,

mmsyscache

,
mmsyscache android
,
mmsyscache folder
,
mmsyscache what is it
,

what is .mmsyscache

,
what is .mmsyscache android
,
what is mmsyscache
,
what is mmsyscache android
Click on a term to search for related topics.