3

i am using samsung s2 and a custom rom, external sd card is mounted to /emmc but i want it to mount to /mnt/sdcard/external_sd, how could i mount it using init.d?

i made a file called "99mount" with a the content

mount -o bind /emmc /mnt/sdcard/external_sd

however, it isn't being executed an start tried also

busybox mount -o bind /emmc /mnt/sdcard/external_sd

and no luck, do i need to add 99mount to some xx.rc file?

  • 2
    Would creating a symbolic link from /mnt/sdcard/external_sd to /emmc work for your purposes? – Matthew Read Apr 18 '12 at 19:58
3

Your SD card isn't prepared at the time that the bind command is executed, because the mounting process hasn't ended yet. To bind, you have to wait several seconds for the mounting of SD card & external SD to be finished.

#!system/bin/sh    
sleep 10    
n="$(dumpsys mount | grep -c 'external')"    
until [ $n -eq 1 ]    
do    
sleep 1    
n="$(dumpsys mount | grep -c 'external')"    
done    
mount -o bind source target

Note: n="??" is changeable by according to your own system.

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.