summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Siraswar2018-01-17 15:29:58 -0600
committerYogesh Siraswar2018-01-17 15:29:58 -0600
commit6502befe40ac5922193dde753c8fcc62cd2ae9ad (patch)
tree21c14ab66e7a784fc1f6ef2e29c3af9c32d5e65f /init.am43xevmboard.usb.rc
downloaddevice-ti-am43xevm-d-marshmallow-mr3-release.tar.gz
device-ti-am43xevm-d-marshmallow-mr3-release.tar.xz
device-ti-am43xevm-d-marshmallow-mr3-release.zip
am43xevm device filed-marshmallow-mr3-release
These file were verified on AM438x EVM: 1) Android 6AM1.3 release 2) 4.4 kernel Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
Diffstat (limited to 'init.am43xevmboard.usb.rc')
-rw-r--r--init.am43xevmboard.usb.rc56
1 files changed, 56 insertions, 0 deletions
diff --git a/init.am43xevmboard.usb.rc b/init.am43xevmboard.usb.rc
new file mode 100644
index 0000000..6923e8d
--- /dev/null
+++ b/init.am43xevmboard.usb.rc
@@ -0,0 +1,56 @@
1on boot
2 mount configfs none /config
3 mkdir /config/usb_gadget/g1 0770 shell shell
4 write /config/usb_gadget/g1/idVendor 0x0451
5 write /config/usb_gadget/g1/idProduct 0xD101
6 mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
7 write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
8 write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
9 write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
10 mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
11 mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
12 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Conf 1"
13 write /config/usb_gadget/g1/configs/b.1/MaxPower 120
14
15 # Create adb+ffs gadget function
16 mkdir /config/usb_gadget/g1/functions/ffs.adb 0770 shell shell
17 mkdir /dev/usb-ffs 0770 shell shell
18 mkdir /dev/usb-ffs/adb 0770 shell shell
19 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
20
21 # Create MTP and PTP functions
22 mkdir /config/usb_gadget/g1/functions/mtp.gs0 0770 shell shell
23 mkdir /config/usb_gadget/g1/functions/ptp.gs1 0770 shell shell
24
25 setprop sys.usb.controller 488d0000.usb
26 setprop sys.usb.configfs 1
27
28on property:sys.usb.config=none && property:sys.usb.configfs=1
29 write /config/usb_gadget/g1/os_desc/use 0
30 setprop sys.usb.ffs.ready 0
31
32on property:init.svc.adbd=stopped
33 setprop sys.usb.ffs.ready 0
34
35on property:sys.usb.config=mtp && property:sys.usb.configfs=1
36 write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
37 write /config/usb_gadget/g1/os_desc/use 1
38 write /config/usb_gadget/g1/idProduct 0xD108
39
40on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
41 write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
42 write /config/usb_gadget/g1/os_desc/use 1
43 write /config/usb_gadget/g1/idProduct 0xD109
44
45on property:sys.usb.config=ptp && property:sys.usb.configfs=1
46 write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
47 write /config/usb_gadget/g1/os_desc/use 1
48 write /config/usb_gadget/g1/idProduct 0xD10D
49
50on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
51 write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
52 write /config/usb_gadget/g1/os_desc/use 1
53 write /config/usb_gadget/g1/idProduct 0xD10E
54
55on property:sys.usb.config=adb && property:sys.usb.configfs=1
56 write /config/usb_gadget/g1/idProduct 0xD101