Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9003916b authored by Zimuzo Ezeozue's avatar Zimuzo Ezeozue Committed by Android (Google) Code Review
Browse files

Merge "Grant apps with pass_through mount mode media_rw gid"

parents d48208f2 da8df986
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1574,8 +1574,15 @@ public final class ProcessList {
            gidList.add(userGid);
        }
        if (mountExternal == Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE) {
            // For DownloadProviders and MTP: To grant access to /sdcard/Android/
            gidList.add(Process.SDCARD_RW_GID);
        }
        if (mountExternal == Zygote.MOUNT_EXTERNAL_PASS_THROUGH) {
            // For the FUSE daemon: To grant access to the lower filesystem.
            // EmulatedVolumes: /data/media and /mnt/expand/<volume>/data/media
            // PublicVolumes: /mnt/media_rw/<volume>
            gidList.add(Process.MEDIA_RW_GID);
        }
        if (packageName.equals("com.android.externalstorage")) {
            // Allows access to 'unreliable' (USB OTG) volumes via SAF
            gidList.add(Process.MEDIA_RW_GID);