2

I am trying to mount an EXT4 formatted SD card under Cyanogenmod 13.1 (Android 6.0.1).

So far, I have setup scripts to mount the card at /mnt/ext_sdcard during boot. My current understanding is that the "sdcard" service must then be invoked to create a FUSE mount pointing to the real mount point which will eventually lead the media scanner to the newly mounted disk.

Following some older older documentation and forum threads lead me to this command in terminal: service sdcard /system/bin/sdcard /mnt/ext_sdcard /mnt/test 1023 1023 class late_start

When I run the command (as root of course), it fails with an exit status of 1 and no output/error messages.

My question: Am I doing something wrong, or is this command deprecated in 6.0.1 (the documents/forum thread seemed to relate to KitKat)? What is the correct syntax/arguments for using this command?

0

Are you putting this command in an init.*.rc file? My understanding is you would have this in a init.extmount.rc for example. This requires extracting and repacking the boot.img.

Since I had nothing better to do, I created this: https://github.com/BenBaltz/mountext

Its a recovery flashable zip to install your script by unpacking the boot.img and repacking it with the modifications.

EDIT Terminal commands

su -c mount -o bind /mnt/ext_sdcard /path/to/new/dir
  • Thanks Ben, I'll check out your script. Also, yes I am using this command in the main init.rc file currently – Jake Jan 20 '17 at 12:11
  • I tried your command in init.mountext..rc and I got service: Unknown command sdcard. Then I tried service call sdcard... which returned Service sdcard does not exist. Also I found two running instances of sdcard on my system and found they were invoked with /system/bin/sdcard -u1023 -g1023 -U0 /mnt/media_rw/8005-91F9 8005-91F9. Does this command vary between Android ROM's? – Jake Jan 20 '17 at 12:23
  • @Jake I don't see anything after 'I got'. – Ben Baltz Jan 20 '17 at 12:26
  • @Jake This is what the bootlogs said? You have to reboot for it to be run. – Ben Baltz Jan 20 '17 at 12:29
  • No, I ran it directly in terminal (as root). I'd rather run them in terminal until I'm sure they work rather than patching system files. – Jake Jan 20 '17 at 12:31

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.