1

I upgraded from the Note 1 with cyanogenmod 11 to the Note 4 (910C) with stock android (rooted). I want to use the ext4 formatted external sdcard, but Samsung does not added ext4 support for the extSdCard (WHY???????????), so it is not being recognized at boottime. Anyway, I managed to mount it, but I am only able to use it as root. Yes, the ooold permission problem.

I used this script for this:

REALMNT=/mnt/media_rw/extSdCard 
mount -t ext4 -o rw,noatime /dev/block/mmcblk1p1 "$REALMNT"
sdcard "$REALMNT" /storage/extSdCard 1023 1023 &

This script does mount the card, but with the wrong permissions. I also changed the permissions in /system/etc/permissions/platform.xml, no luck.

Some permissions I get after mounting the sdcard manually:

# ls -la /storage (notice 1015 instead of 1028)
  ....
  drwxrwxr-x 13 0 1015 4096 Jan 29 02:52 extSdCard

# ls -la /mnt/media_rw
drwx------ 9 1023 1028 0 Jan 29 03:30 .
drwxrwxr-x 7 0 1000 0 Jan 29 03:30 ..
drwx------ 2 1023 1023 0 Jan 29 03:30 UsbDriveA
drwx------ 2 1023 1023 0 Jan 29 03:30 UsbDriveB
drwx------ 2 1023 1023 0 Jan 29 03:30 UsbDriveC
drwx------ 2 1023 1023 0 Jan 29 03:30 UsbDriveD
drwx------ 2 1023 1023 0 Jan 29 03:30 UsbDriveE
drwx------ 2 1023 1023 0 Jan 29 03:30 UsbDriveF
drwxrwxrwx 13 1023 1023 4096 Jan 29 02:52 extSdCard

Clues?

Thanks!

  • Permissions are used differently in Android. To my knowledge there is no simple way to overcome this problem save for using a permission-free filesystem such as FAT-based one. – mikky Jan 31 '15 at 23:50
  • @mikky: CyanogenMod has ext4 support by default, you don't need to do anything. It mounts the sdcard without any problem, as it should. As soon as CyanogenMod announces support for the Note 4, I will get rid of this Samsung ROM. That will also fix quite a few other problems. – Luis A. Florit Jan 31 '15 at 23:54
  • Not true, at least not for CM11. Ext4 is supported but rights management isn't. vold doesn't expect the underlying filesystem to understand let alone enforce permissions. With ext4 and normal app use you will get permission problems. – mikky Jan 31 '15 at 23:56
  • Yes, I was talking about CM11 (more precisely, cm-11-20150119-NIGHTLY), but I've been using my ext4 card for months now. – Luis A. Florit Jan 31 '15 at 23:59
  • Could you elaborate on the use cases of the sdcard? I've been trying to use ext4-formatted sdcard on CM11 too but always ran into permissions trouble when sharing data between apps or when an app asked to have a directory created on it's behalf. – mikky Feb 1 '15 at 0:05

Your Answer

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

Browse other questions tagged or ask your own question.