This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mount multi partitions on android



Hi everyone!

I'm customising my jorjin raccoon board with android 4.2.2.

I have tried integrating USB with two partitions on my board, but not successfully.

What I did is that  I modified file vold.fstab at system/etc/ like the following:

# automount usb storage devices
dev_mount  usbflash1  /storage/usb0  auto  /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.2  /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.2
dev_mount  usbflash2  /storage/usb1  2  /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.2  /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.2

My result is just only first partition mounted

How I can mount both two partitions on my board ?

Best Regard !

  • Hi,

    AOSP does not support mounting multiple partitions on the same device.
    The vold.fstab that you are using contains two volumes but with same syspath, it is not designed to handle in this way.
    If the two partitions are always available during bootup, you may just mount it in init.rc

     Regards,

  • Hi,

    Thanks you for responding!

    I have some interesting tests with my file vold.fstab .

    With the file vold.fstab  above then the first partition mounted. But, When I change two lines of the vold.fstab for each other, then second partition mounted.

    That means vold just implements the first line of vold.fstab, and ignore the second line, if two line have the same sysfs_path.

    Why vold does not support mount multi  volumes the same sysfs_path?

    You said I can mount multi partitions by changing init.rc. So When I do so. Mounting volume  bypasses  vold, Is that right?

    Best Regard!

  • Hi,

    that is a vold limitation, it will just keep the first line and discard the other.
    The limitation comes from hardcoded values in the AOSP java framework (at least it use to).

    When using init.rc the script lines are ran directly, and thus don't use vold to mount partition. In that case, mounting follows the traditional Linux way. 

  • Hi,

    Thanks you so much for  your suggestion !

    Regard.