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.

USB Storage auto mount under recovery mode

Dear Sir,

we work at 4AI.1.7/omap4470 platform.

USB storage can auto mount  under normal mode.But at recovery mode USB storage can not auto mount .

script at vold.fstab for auto mount function as below seem not  wrok:

dev_mount usbflash1 /mnt/HSusb1 auto /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.1

we can get node at sys/devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1 when USB storage insert under recovery mode.

/mnt/HSusb1 also establish by init.rc.

Can you give us some advice about this issue.

thanks.

SAM

 

  • Sam,

    Are you using Blaze, Blaze Tablet, or a custom OMAP board?  I am testing by plugging in a USB hard drive into a powered USB hub into one of the EHCI ports on Blaze Tablet.  When I do this, I see messages on the console that the hard drive has been detected, as /dev/block/sdb, for example.  This is the same in the recovery boot and the normal boot case.  Do you see this as well?  Where / how specifically did you try the mount?  (since ADB and the console aren't available in recovery mode)

    Regards,
    Gina 

  • Hi Gina,

    thank for you reply.

    first reply your question.

    We use custom OMAP board.

    we can see the message about USB storage be detect as /dev/block/sdX under recovery mode. 

    We have do some change that we can execute ADB under recovery mode.

    We assume vold.fstab  be reference in recovery /normal booting and auto mount USB storage as below command

    dev_mount usbflash1 /mnt/HSusb1 auto /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.1

    Is vold.fstab not be reference in recovery booting?

    thanks

    sam

  • Sam,

    There is a different init.rc file for the recovery image:

    $MYDROID/out/target/product/blaze_tablet/recovery/root/init.rc

    compared to the normal image:

    $MYDROID/out/target/product/blaze_tablet/root/init.rc

    The init.rc for the recovery image does not start vold; whereas, the init.rc for the normal image does, so I believe this explains the behavior you are seeing.  Have you tried modifying the recovery init.rc file as needed?

    Regards,
    Gina 

  • Gina,

    We have try to modify $MYDROID/out/target/product/blaze_tablet/recovery/root/init.rc and we can success mkdir directory .

    But we can not find file that can add following script 

    dev_mount usbflash1 /mnt/HSusb1 auto /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.1

    Can you help to find the correct file to edit  that we can auto mount USB storage under recovery mode.

    thanks

    SAM


  • Sam,

    Since dev_mount is a function provided by vold, I imagine it won't work in recovery mode where vold is not present.  Have you tried a regular "mount" command instead?

    Regards,
    Gina 

  • Sam,

    Is this working for you now?

    Thanks,
    Gina 

  • Hi sam liu1,

    I am very curious on your project. Are you trying to apply an Android Upgrade from an USB flash drive?

    and are you creating your own recovering GUI? or any open source GUI for Recovery Mode? Reason of asking is because I am actually working on an interesting project ( I think it is but please tell me if there are someone out there already making this working) that is to make an automated Android OS upgrade through the USB flash drive.