开发者社区> 问答> 正文

安卓4.4.4系统多U盘

msm8916 Android4.4.4 核心板上有MicroUSB口,电路板上有USB口,两个口都能接U盘,但是同时只能使用其中一个,想同时使用2个U盘。(MicroUSB通过OTG连接U盘)。 有关脚本如下: vold.fstab文件




dev_mount sdcard /storage/sdcard1 auto /devices/msm_sdcc.2/mmc_host

# MTP
#dev_mount sdcard2 /mnt/sdcard/external_sd auto /devices/platform/msm_sdcc.3/mmc_host

init.qcom.rc 文件

on init
     # Set permissions for persist partition
    mkdir /persist 0771 system system
     # See storage config details at http://source.android.com/tech/storage/
       mkdir /mnt/shell/emulated 0700 shell shell
       mkdir /storage 0050 system sdcard_r
       mkdir /storage/emulated 0555 root root
       mkdir /storage/emulated/legacy 0555 root root
       mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
       mkdir /mnt/media_rw/sdcard2 0700 media_rw media_rw
       mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
       mkdir /mnt/media_rw/uicc0 0700 media_rw media_rw
       mkdir /mnt/media_rw/uicc1 0700 media_rw media_rw
       mkdir /storage/sdcard1 0700 root root
       mkdir /storage/sdcard2 0700 root root
       mkdir /storage/uicc0 0700 root root
       mkdir /storage/uicc1 0700 root root
       mkdir /storage/usbotg 0700 root root

fstab.qcom文件

on init
    # Set permissions for persist partition
    mkdir /persist 0771 system system
    # See storage config details at http://source.android.com/tech/storage/
    mkdir /mnt/shell/emulated 0700 shell shell
    mkdir /storage 0050 system sdcard_r
    mkdir /storage/emulated 0555 root root
    mkdir /storage/emulated/legacy 0555 root root
    mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
    mkdir /mnt/media_rw/sdcard2 0700 media_rw media_rw
    mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
    mkdir /mnt/media_rw/uicc0 0700 media_rw media_rw
    mkdir /mnt/media_rw/uicc1 0700 media_rw media_rw
    mkdir /storage/sdcard1 0700 root root
    mkdir /storage/sdcard2 0700 root root
    mkdir /storage/uicc0 0700 root root
    mkdir /storage/uicc1 0700 root root
    mkdir /storage/usbotg 0700 root root

    export EXTERNAL_STORAGE /storage/emulated/legacy
    export SECONDARY_STORAGE /storage/sdcard1
    export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
    export EMULATED_STORAGE_TARGET /storage/emulated
....
    # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
    # We chown/chmod /persist again so because mount is run as root + defaults
    chown system system /persist
    chmod 0771 /persist
    chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
    chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
    chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
    chmod 0664 /sys/devices/platform/msm_sdcc.4/polling

    # Chown polling nodes as needed from UI running on system server
    chown system system /sys/devices/platform/msm_sdcc.1/polling
    chown system system /sys/devices/platform/msm_sdcc.2/polling
    chown system system /sys/devices/platform/msm_sdcc.3/polling
    chown system system /sys/devices/platform/msm_sdcc.4/polling

如果还需要了解哪个文件的麻烦请告诉我。 另外我在电脑上修改过的vold.fstab文件,是否需要将空格键值替换成tab键值,然后通过adb传过去。 谢谢

展开
收起
游客oqdepcxlkowdw 2020-01-06 22:42:17 1059 0
1 条回答
写回答
取消 提交回答
  • 技术架构师 阿里云开发者社区技术专家博主 CSDN签约专栏技术博主 掘金签约技术博主 云安全联盟专家 众多开源代码库Commiter

    好神奇啊

    2020-01-12 00:07:04
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载