The hardware engineer built a USB hub line on the basis of sugar-Standard <I don't quite understand>, but sugar-standard still can automatically mount the USB flash drive at this time.
Later, he made the USB interface into the A20 sugar-cubieboard 2, so when the original IMG was burned in, the U port did not respond, only one port can use the mouse.
According to the information, the android system automatically mounts the USB flash disk, which is related to a file named vold. fstab.
So find./-name "vold. fstab" in the company's source code Android/directory and find many such files.
1 Server_Rick$find ./ -name "vold.fstab"2 ./system/core/rootdir/etc/vold.fstab3 ./device/asus/grouper/vold.fstab4 ./device/softwinner/sugar-ref001/vold.fstab5 ./device/softwinner/sugar-evb/vold.fstab6 ./device/softwinner/sugar-standard/vold.fstab7 ./device/softwinner/wing-evb-v10/vold.fstab8 ./out/target/product/sugar-standard/system/etc/vold.fstab
Most of the files on the Internet are./system/CORE/rootdir/etc/vold. fstab.
However, it may be the reason why I have learned something from my new account. After opening the./system/CORE/rootdir/etc/vold. fstab file with vim, I only send this line:
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
So we opened the./device/softwinner/sugar-standard/vold. fstab file with vim and found the following content:
# Mounts the first usable partition of the specified device#/devices/platform/awsmc.3/mmc_host for sdiodev_mount sata /mnt/sata auto /devices/platform/sw_ahci.0dev_mount sdcard /mnt/sdcard auto /devices/virtual/block/nandk /devices/platform/sunxi-mmc.2/mmc_hostdev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_hostdev_mount usbhost1 /mnt/usbhost1 auto /devices/platform/sw-ehci.1/usb2/2-1/2-1.1dev_mount usbhost0 /mnt/usbhost0 auto /devices/platform/sw-ehci.1/usb2/2-1/2-1.3dev_mount usbhost2 /mnt/usbhost2 auto /devices/platform/sw-ehci.1/usb2/2-1/2-1.2
So I commented out all the content and copied the content in./devices/softwinner/sugar-cubieboard2/vold. fstab in the original source code provided by quanzhi, as follows:
# Mounts the first usable partition of the specified device#/devices/platform/awsmc.3/mmc_host for sdio#dev_mount sata /mnt/sata auto /devices/platform/sw_ahci.0#dev_mount sdcard /mnt/sdcard auto /devices/virtual/block/nandk /devices/platform/sunxi-mmc.2/mmc_host#dev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_host#dev_mount usbhost1 /mnt/usbhost1 auto /devices/platform/sw-ehci.1/usb2/2-1/2-1.1#dev_mount usbhost0 /mnt/usbhost0 auto /devices/platform/sw-ehci.1/usb2/2-1/2-1.3#dev_mount usbhost2 /mnt/usbhost2 auto /devices/platform/sw-ehci.1/usb2/2-1/2-1.2# change by jason 2014/07/11 --> from cubieboard2dev_mount sata /mnt/sata auto /devices/platform/sw_ahci.0dev_mount sdcard /mnt/sdcard auto /devices/virtual/block/nandk /devices/platform/sunxi-mmc.2/mmc_hostdev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_hostdev_mount usbhost1 /mnt/usbhost1 auto /devices/platform/sw-ehci.1 /devices/platform/sw_hcd_host0 /devices/platform/sw-ohci.1dev_mount usbhost2 /mnt/usbhost0 auto /devices/platform/sw-ehci.2
After saving and exiting, In the lichee/tools/Pack/chips/sun7i/configs/Android/sugar-standard/sys_config.fex file
Set usb_host_init_state to 1 as follows:
usb_host_init_state = 1
Then re-compile the entire Source Code <if it has been compiled, you do not need to compile it again>. After the installation, you can mount the USB flash drive.
However, you must understand the following question:
When the cubieboard2 demo board is connected to a PC through the OTG port for power supply, the mobile hard disk is mounted to the U port without external power supply. In this case, you can mount the disk and immediately remove the mobile hard disk. Then the system will do this in a loop.
Okay, that's it.
Reference materials from this friend:
Android sdcard Mount Process Analysis (1)
Http://www.cnblogs.com/TerryBlog/archive/2012/04/05/2432818.html
Several keywords: cubieboard2 vold. fstab Android USB disk automatic mounting