diff options
author | Michael Stucki <mundaun@gmx.ch> | 2015-02-13 14:10:47 +0100 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-03-22 03:35:01 -0700 |
commit | ab1172cb3127d992339bb81f56f18ba1c084b068 (patch) | |
tree | 42f562183b7d3cbaa25f57b277377ffb92e8a8c0 | |
parent | a4edb44146d7bc7025f250dcb282d547f2ad613f (diff) | |
download | android_system_vold-ab1172cb3127d992339bb81f56f18ba1c084b068.tar.gz android_system_vold-ab1172cb3127d992339bb81f56f18ba1c084b068.tar.bz2 android_system_vold-ab1172cb3127d992339bb81f56f18ba1c084b068.zip |
Fix Ext4 sdcard permissions on mount
Fix ownership of sdcards the same way as for F2FS.
Change-Id: Ia34ad91444951e62f6d17374f480dcbdfa34cca3
-rw-r--r-- | Ext4.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -73,6 +73,12 @@ int Ext4::doMount(const char *fsPath, const char *mountPoint, bool ro, bool remo rc = mount(fsPath, mountPoint, "ext4", flags, data); + if (sdcard && rc == 0) { + // Write access workaround + chown(mountPoint, AID_MEDIA_RW, AID_MEDIA_RW); + chmod(mountPoint, 0755); + } + if (rc && errno == EROFS) { SLOGE("%s appears to be a read only filesystem - retrying mount RO", fsPath); flags |= MS_RDONLY; |