diff options
Diffstat (limited to 'soc/fs1130/init.usb.fs1130.rc')
-rw-r--r-- | soc/fs1130/init.usb.fs1130.rc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/soc/fs1130/init.usb.fs1130.rc b/soc/fs1130/init.usb.fs1130.rc new file mode 100644 index 0000000..00375da --- /dev/null +++ b/soc/fs1130/init.usb.fs1130.rc @@ -0,0 +1,42 @@ +# +# Copyright 2016 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. +# + +on boot + mkdir /dev/usb-ffs 0770 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mount configfs none /config + mkdir /config/usb_gadget/g1 0770 shell shell + write /config/usb_gadget/g1/idVendor 0x149a + mkdir /config/usb_gadget/g1/strings/0x409 0770 + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.hardware}${ro.serialno} + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model} + mkdir /config/usb_gadget/g1/functions/ffs.adb + mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/ffs.adb + mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 + setprop sys.usb.configfs 1 + setprop sys.usb.controller "18120000.usb" + +on property:sys.usb.config=none && property:sys.usb.configfs=1 + setprop sys.usb.ffs.ready 0 + +on property:init.svc.adbd=stopped + setprop sys.usb.ffs.ready 0 + +on property:sys.usb.config=adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idProduct 0x0006 |