File in external SD card cannot be deleted by File Explorer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File in external SD card cannot be deleted by File Explorer

4,599 Views
shaojun_wang
NXP Employee
NXP Employee

If boot Android from eMMC, the primary storage is VFAT partition of eMMC, mount to /mnt/sdcard.

The secondary storage in external SD card, mount to /mnt/extsd.

You may find the file in external SD card cannot be deleted by File Explorer, such as ASTRO, ES File Explorer and Zipper7.

 

When vold mount external SD card, the file group id is media_rw, permissions is ----rwxr-x, 0x702. File Explorer has no permission to delete these files.

If change the permission to ----rwxrwx, 0x700, the file in external SD card can be deleted.

In myandroid/system/vold , the patch is

 

diff --git a/Volume.cpp b/Volume.cpp

index 66262ec..32e3cbe 100644

--- a/Volume.cpp

+++ b/Volume.cpp

@@ -423,7 +423,7 @@ int Volume::mountVol() {

             gid = AID_MEDIA_RW;

         }

         if (Fat::doMount(devicePath, "/mnt/secure/staging", false, false, false,

-                AID_SYSTEM, gid, 0702, true)) {

+                AID_SYSTEM, gid, 0700, true)) {

             SLOGE("%s failed to mount via VFAT (%s)\n", devicePath, strerror(errno));

             continue;

         }


Attach some file explorers.

Original Attachment has been moved to: EStrongs_File_Explorer_1.6.1.8.apk.zip

Original Attachment has been moved to: astro.apk.zip

Original Attachment has been moved to: org.joa.zipperplus7_434551.apk.zip

Labels (1)
0 Kudos
0 Replies