fstab.freescale文件修改如下:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/devices/soc0/soc.1/2100000.aips-bus/2190000.usdhc/mmc_host /mnt/media_rw/extsd vfat defaults voldmanaged=extsd:auto
/devices/soc0/soc.1/2100000.aips-bus/2184000.usb/ci_hdrc.0 /mnt/media_rw/udisk vfat defaults voldmanaged=udisk:auto
/devices/soc0/soc.1/2100000.aips-bus/2184200.usb/ci_hdrc.1 /mnt/media_rw/udisk2 vfat defaults voldmanaged=udisk2:auto
/dev/block/mmcblk2p5 /system ext4 ro wait
/dev/block/mmcblk2p4 /data ext4 nosuid,nodev,nodiratime,noatime,nomblk_io_submit,noauto_da_alloc,errors=panic wait,encryptable=footer
/dev/block/mmcblk2p6 /cache ext4 nosuid,nodev,nomblk_io_submit wait
/dev/block/mmcblk2p7 /device ext4 ro,nosuid,nodev wait
/dev/block/mmcblk2p1 /boot emmc defaults defaults
/dev/block/mmcblk2p2 /recovery emmc defaults defaults
/dev/block/mmcblk2p8 /misc emmc defaults defaults
/dev/block/mmcblk2p10 /backconf ext4 rw wait
/dev/block/mmcblk2p11 /navi ext4 rw
init.rc新增如下:
mkdir /mnt/media_rw/edisk 0755 system system
symlink /mnt/media_rw/edisk /storage/edisk
mkdir /mnt/media_rw/udisk 0755 system system
symlink /mnt/media_rw/udisk /storage/udisk
symlink /storage/udisk /mnt/udisk
mkdir /mnt/media_rw/udisk2 0755 system system
symlink /mnt/media_rw/udisk2 /storage/udisk2
symlink /storage/udisk2 /mnt/udisk2
frameworks/base/core/res/res/xml/storage_list.xml,驱动新增udisk2后,framework层修改如下:
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2011, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- The <device> element should contain one or more <storage> elements.
Exactly one of these should have the attribute primary="true".
This storage will be the primary external storage and should have path="/mnt/sdcard".
Each storage should have both a path and description attribute set.
The following boolean attributes are optional:
primary: this storage is the primary external storage
removable: this is removable storage (for example, a real SD card)
emulated: the storage is emulated via the FUSE sdcard daemon
mtp-reserve: number of megabytes of storage MTP should reserve for free storage
(used for emulated storage that is shared with system's data partition)
A storage should not have both emulated and removable set to true
-->
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:storageDescription="@string/storage_internal"
android:primary="true"
android:emulated="true"
android:mtpReserve="100" />
<storage android:mountPoint="/storage/extsd"
android:storageDescription="@string/storage_sd_card"
android:primary="false"
android:removable="true" />
<storage android:mountPoint="/storage/udisk"
android:storageDescription="@string/storage_usb"
android:primary="false"
android:removable="true" />
<storage android:mountPoint="/storage/udisk2"
android:storageDescription="@string/storage_usb"
android:primary="false"
android:removable="true" />
</StorageList>