Support Two USB Disks through USB Hub in Android

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Support Two USB Disks through USB Hub in Android

3,207 次查看
shaojun_wang
NXP Employee
NXP Employee

1. In device/fsl/imx6/sabresd/vold.fstab, change

    dev_mount udisk /mnt/udisk auto /devices/platform/fsl-ehci.0/usb1

    to

    dev_mount udisk /mnt/udisk auto /devices/platform/fsl-ehci.0/usb1/1-1/1-1.4

    dev_mount udisk1 /mnt/udisk1 auto /devices/platform/fsl-ehci.0/usb1/1-1/1-1.1

    1-1 is usb hub device name in sysfs, 1-1.4 and 1-1.1 is usb hub port number in sysfs. You can get this number from kernel log when insert usb hub and usb disk.


2. In device/fsl/imx6/sabresd/overlay/frameworks/base/core/res/res/xml/storage_list.xm, add below code before </StorageList>.

    <storage android:mountPoint="/mnt/udisk1"

        android:storageDescription="@string/storage_usb"

        android:primary="false"

        android:removable="true" />

3. Apply below patch in device/fsl/imx6/etc/init.rc

    diff --git a/imx6/etc/init.rc b/imx6/etc/init.rc

    index b33b654..397b809

    --- a/imx6/etc/init.rc

    +++ b/imx6/etc/init.rc

    @@ -24,7 +24,7 @@ loglevel 3

         export LOOP_MOUNTPOINT /mnt/obb

         export SHM_MOUNTPOINT /mnt/shm

         export EXTERNAL_STORAGE /mnt/sdcard

    -    export SECONDARY_STORAGE /mnt/extsd:/mnt/udisk

    +   export SECONDARY_STORAGE /mnt/extsd:/mnt/udisk:/mnt/udisk1

         export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/

         export LIGHTSENSOR_PATH /sys/class/i2c-adapter/i2c-1/1-0044

     @@ -55,6 +55,8 @@ loglevel 3

         symlink /mnt/extsd /extsd

         mkdir /mnt/udisk 0000 system system

         symlink /mnt/udisk /udisk

    +   mkdir /mnt/udisk1 0000 system system

    +   symlink /mnt/udisk1 /udisk1

         mkdir /system

         mkdir /data 0771 system system

         mkdir /cache 0770 system cache

标记 (3)
0 回复数