Hi all,
I have been playing around with Nexus 7 with AOSP 4.4. I have added USB flash support with minor changes. Referred: Typical Configuration Examples | Android Developers
However I with these changes apps don't have write permission to /storage/sdcard1
So I decided to provided write access to /storage/sdcard1.
Simple solution is to modify platform.xml and add "media_rw" group for android.permission.WRITE_EXTERNAL_STORAGE permission.
Hard ways is to put all apps in media_rw group before they are started:
Now as we know that this permission is based on linux-groups (reference) I decided to manually add this media_rw (gid=1023) group to list of group ids before an application starts. This can be done in startProcessLocked() of ActivityManagerService.java. Now process is member of media_rw group. Still it can not access /storage/sdcard1/. I checked this from java code as well as native library.
Anybody knows why is this behavior? Am I missing something?
Thanks!
I have been playing around with Nexus 7 with AOSP 4.4. I have added USB flash support with minor changes. Referred: Typical Configuration Examples | Android Developers
However I with these changes apps don't have write permission to /storage/sdcard1
So I decided to provided write access to /storage/sdcard1.
Simple solution is to modify platform.xml and add "media_rw" group for android.permission.WRITE_EXTERNAL_STORAGE permission.
Hard ways is to put all apps in media_rw group before they are started:
Now as we know that this permission is based on linux-groups (reference) I decided to manually add this media_rw (gid=1023) group to list of group ids before an application starts. This can be done in startProcessLocked() of ActivityManagerService.java. Now process is member of media_rw group. Still it can not access /storage/sdcard1/. I checked this from java code as well as native library.
Anybody knows why is this behavior? Am I missing something?
Thanks!
