diff options
-rw-r--r-- | board-info.txt | 2 | ||||
-rw-r--r-- | device_base.mk | 1 | ||||
-rwxr-xr-x | init.herring.rc | 2 | ||||
-rw-r--r-- | init.herring.usb.rc | 47 | ||||
-rw-r--r-- | overlay/frameworks/base/core/res/res/xml/storage_list.xml | 42 |
5 files changed, 93 insertions, 1 deletions
diff --git a/board-info.txt b/board-info.txt index 83f000e..5824ec3 100644 --- a/board-info.txt +++ b/board-info.txt @@ -1,3 +1,3 @@ require board=herring require version-bootloader=I9020XXJK1|I9020XXKA3 -require version-baseband=I9020XXJK8|I9020XXKB1|I9020XXKD1|I9020XXKE1|I9020UCKB2|I9020UCKD1|I9020UCKE1|I9020KRKB3|M200KRKC1 +require version-baseband=I9020XXJK8|I9020XXKB1|I9020XXKD1|I9020XXKF1|I9020UCKB2|I9020UCKD1|I9020UCKF1|I9020KRKB3|M200KRKC1 diff --git a/device_base.mk b/device_base.mk index 86f1cd3..3d79fd9 100644 --- a/device_base.mk +++ b/device_base.mk @@ -49,6 +49,7 @@ PRODUCT_COPY_FILES := \ # Init files PRODUCT_COPY_FILES += \ device/samsung/crespo/init.herring.rc:root/init.herring.rc \ + device/samsung/crespo/init.herring.usb.rc:root/init.herring.usb.rc \ device/samsung/crespo/ueventd.herring.rc:root/ueventd.herring.rc # Prebuilt kl and kcm keymaps diff --git a/init.herring.rc b/init.herring.rc index 4c4d991..7c9a226 100755 --- a/init.herring.rc +++ b/init.herring.rc @@ -1,3 +1,5 @@ +import init.herring.usb.rc + on boot mount debugfs /sys/kernel/debug /sys/kernel/debug diff --git a/init.herring.usb.rc b/init.herring.usb.rc new file mode 100644 index 0000000..73acf16 --- /dev/null +++ b/init.herring.usb.rc @@ -0,0 +1,47 @@ +on boot + write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer + write /sys/class/android_usb/android0/iProduct $ro.product.model + write /sys/class/android_usb/android0/iSerial $ro.serialno + write /sys/class/android_usb/f_mass_storage/inquiry_string "Google Nexus S 0100" + +on property:sys.usb.config=none + stop adbd + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/bDeviceClass 0 + setprop sys.usb.state $sys.usb.config + +on property:sys.usb.config=mass_storage + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 4e21 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state $sys.usb.config + +on property:sys.usb.config=mass_storage,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 4e22 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state $sys.usb.config + +on property:sys.usb.config=rndis + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 4e23 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state $sys.usb.config + +on property:sys.usb.config=rndis,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 4e24 + write /sys/class/android_usb/android0/functions $sys.usb.config + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state $sys.usb.config diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml new file mode 100644 index 0000000..806edda --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml @@ -0,0 +1,42 @@ +<?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 mountPoint="/mnt/sdcard". + Each storage should have both a mountPoint and storageDescription attribute. + The following attributes are optional: + + primary: (boolean) this storage is the primary external storage + removable: (boolean) this is removable storage (for example, a real SD card) + emulated: (boolean) the storage is emulated via the FUSE sdcard daemon + mtpReserve: (integer) number of megabytes of storage MTP should reserve for free storage + (used for emulated storage that is shared with system's data partition) + allowMassStorage: (boolean) true if this volume can be shared via USB mass storage + + A storage should not have both emulated and removable set to true +--> + +<StorageList xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- removable is not set in nosdcard product --> + <storage android:mountPoint="/mnt/sdcard" + android:storageDescription="@string/storage_usb" + android:primary="true" + android:allowMassStorage="true" /> +</StorageList> |