Mount Second Partition on Android Device with vold

19,933

Maybe you'll have to have a look into /init.rc.

There are some "mkdir /mnt/..."-statements. You only have to add your "mkdir /mnt/sdcard2" and "ln -s /mnt/sdcard2 /sdcard2" to this file.

But be careful when editing this file!!!

Share:
19,933
songei2f
Author by

songei2f

Updated on June 19, 2022

Comments

  • songei2f
    songei2f almost 2 years

    I want to have access to an ext4 partition, without using Data2SD yet, on the SD card of my HTC Vision running the Virtuous Unity 1.3.0 ROM. I modded my /system/etc/vold.fstab file from this:

    dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 
    /devices/platform/msm_sdcc.4/mmc_host/mmc2
    

    To this:

    #dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 
    /devices/platform/msm_sdcc.4/mmc_host/mmc2
    
    dev_mount sdcard /mnt/sdcard 1 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc2
    
    dev_mount e4vol /mnt/sdcard2 2 /devices/platform/goldfish_mmc.0 
    /devices/platform/msm_sdcc.4/mmc_host/mmc2
    

    So I can get my second partition, with label e4vol, mount and usable on my Android device. Two issues, and I think one obviously has to do with the other.

    1. I have tried remounting the root read-write and creating the mount point /mnt/sdcard2, but it is gone on reboot. Seems like Android might have in the past created such mounts with mount.conf. Now it does not exist on Gingerbread ROMS. Thoughts?
    2. Is this all I would have to do to get my second partition mounted in Android, or do I also need to create /sdcard2 like /sdcard? I presume both are created as symlinks by vold as specified in this conf file, but I have not had time to check yet.

    I would ask forums, but this seems like a developer question and this is the most recent release of the OS. It seems to change a lot from version to version of the OS. Thanks in advance for your patience and help.

    UPDATE: So, moved the test mount to sdcard, and it did not work, even with a persistent mount point. So, not sure where I am going wrong.

  • Micromega
    Micromega almost 11 years
    init.rc is restored afer reboot.