Grant apps with pass_through mount mode media_rw gid
This is necessary to allow the FUSE daemon access to the lower filesystem on devices without sdcardfs Test: FUSE daemon has media_rw gid Bug: 144914977 Change-Id: I2ed3ab00fa1a4293703e1d066283334cadd1cd49
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user