I am trying to use my ext4 sdcard properly in Stock rooted Android 4.4.4. For this, I run

mount -rw -t ext4 /dev/block/mmcblk1p1 /mnt/media_rw/sdcard1

and then

/system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/sdcard1 /storage/sdcard1

I also tried

/system/bin/sdcard /mnt/media_rw/sdcard1 /storage/sdcard1 1023 1023

The problem is that the ownership of the tree created in /storage/sdcard1 is then 0.1015 instead of 1023.1023 (??), so I have permission problems...

Any idea why the /system/bin/sdcard command is not obeying the ownership flags?



Edit: The solution is here: https://source.android.com/devices/storage/config.html

"For Android releases 4.3 and later, the various fstab files used by init, vold and recovery were unified in the /fstab. file. For external storage volumes that are managed by vold, the entries should have the following format:"

 <src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>

"...Devices may provide external storage by emulating a case-insensitive, permissionless filesystem backed by internal storage. One possible implementation is provided by the FUSE daemon in system/core/sdcard, which can be added as a device-specific init.rc service:"

# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard <source_path> <dest_path> 1023 1023
    class late_start

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.