summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Mahaveer2016-06-22 13:17:30 -0500
committerVishal Mahaveer2016-06-23 11:19:39 -0500
commit8f26236a014b9c85a120842edc91f3d966c69ffb (patch)
tree56dce08f45143a81dde8d701e315c56b9731df82
parentce4fe0853d7595dce97d40f8213bec91008da6d0 (diff)
downloaddevice-ti-jacinto6evm-8f26236a014b9c85a120842edc91f3d966c69ffb.tar.gz
device-ti-jacinto6evm-8f26236a014b9c85a120842edc91f3d966c69ffb.tar.xz
device-ti-jacinto6evm-8f26236a014b9c85a120842edc91f3d966c69ffb.zip
jacinto6evm: enable configFS based adb
Changes for enabling configFS based adb. device/google/dragon/init.dragon.usb.rc file used as reference for these changes. Change-Id: I52bcfead1d242c55a8cd83149d28d240ff690aca Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--init.jacinto6evmboard.usb.rc126
1 files changed, 43 insertions, 83 deletions
diff --git a/init.jacinto6evmboard.usb.rc b/init.jacinto6evmboard.usb.rc
index 850dad4..59a309b 100644
--- a/init.jacinto6evmboard.usb.rc
+++ b/init.jacinto6evmboard.usb.rc
@@ -1,97 +1,57 @@
1on boot 1on boot
2 write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} 2 mount configfs none /config
3 write /sys/class/android_usb/android0/iProduct ${ro.product.model} 3 mkdir /config/usb_gadget/g1 0770 shell shell
4 write /sys/class/android_usb/android0/iSerial ${ro.serialno} 4 write /config/usb_gadget/g1/idVendor 0x0451
5 write /sys/class/android_usb/android0/idVendor 0451 5 write /config/usb_gadget/g1/idProduct 0xD101
6 write /sys/class/android_usb/android0/idProduct D101 6 mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
7 write /sys/class/android_usb/f_mass_storage/inquiry_string "Texas Instruments OMAP5 0100" 7 write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
8 8 write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
9on fs 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
10 mkdir /dev/usb-ffs 0770 shell shell 17 mkdir /dev/usb-ffs 0770 shell shell
11 mkdir /dev/usb-ffs/adb 0770 shell shell 18 mkdir /dev/usb-ffs/adb 0770 shell shell
12 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 19 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
13 write /sys/class/android_usb/android0/f_ffs/aliases adb 20 write /sys/class/android_usb/android0/f_ffs/aliases adb
14 21
15on property:sys.usb.config=none 22 # Create MTP and PTP functions
16 stop adbd 23 mkdir /config/usb_gadget/g1/functions/mtp.gs0 0770 shell shell
17 write /sys/class/android_usb/android0/enable 0 24 mkdir /config/usb_gadget/g1/functions/ptp.gs1 0770 shell shell
18 write /sys/class/android_usb/android0/bDeviceClass 0
19 setprop sys.usb.state ${sys.usb.config}
20
21on property:sys.usb.config=adb
22 write /sys/class/android_usb/android0/enable 0
23 write /sys/class/android_usb/android0/idVendor 0451
24 write /sys/class/android_usb/android0/idProduct D101
25 write /sys/class/android_usb/android0/functions ${sys.usb.config}
26 write /sys/class/android_usb/android0/enable 1
27 setprop sys.usb.state ${sys.usb.config}
28 25
29on property:sys.usb.config=mtp 26 setprop sys.usb.controller 48890000.usb
30 write /sys/class/android_usb/android0/enable 0 27 setprop sys.usb.configfs 1
31 write /sys/class/android_usb/android0/idVendor 0451
32 write /sys/class/android_usb/android0/idProduct D108
33 write /sys/class/android_usb/android0/functions ${sys.usb.config}
34 write /sys/class/android_usb/android0/enable 1
35 setprop sys.usb.state ${sys.usb.config}
36 28
37on property:sys.usb.config=mtp,adb 29on property:sys.usb.config=none && property:sys.usb.configfs=1
38 write /sys/class/android_usb/android0/enable 0 30 write /config/usb_gadget/g1/os_desc/use 0
39 write /sys/class/android_usb/android0/idVendor 0451 31 setprop sys.usb.ffs.ready 0
40 write /sys/class/android_usb/android0/idProduct D109
41 write /sys/class/android_usb/android0/functions ${sys.usb.config}
42 write /sys/class/android_usb/android0/enable 1
43 start adbd
44 setprop sys.usb.state ${sys.usb.config}
45 32
46on property:sys.usb.config=rndis 33on property:init.svc.adbd=stopped
47 write /sys/class/android_usb/android0/enable 0 34 setprop sys.usb.ffs.ready 0
48 write /sys/class/android_usb/android0/idVendor 0451
49 write /sys/class/android_usb/android0/idProduct D103
50 write /sys/class/android_usb/android0/functions ${sys.usb.config}
51 write /sys/class/android_usb/android0/bDeviceClass 224
52 write /sys/class/android_usb/android0/enable 1
53 setprop sys.usb.state ${sys.usb.config}
54 35
55on property:sys.usb.config=rndis,adb 36on property:sys.usb.config=mtp && property:sys.usb.configfs=1
56 write /sys/class/android_usb/android0/enable 0 37 write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
57 write /sys/class/android_usb/android0/idVendor 0451 38 write /config/usb_gadget/g1/os_desc/use 1
58 write /sys/class/android_usb/android0/idProduct D104 39 write /config/usb_gadget/g1/idProduct 0xD108
59 write /sys/class/android_usb/android0/functions ${sys.usb.config}
60 write /sys/class/android_usb/android0/bDeviceClass 224
61 write /sys/class/android_usb/android0/enable 1
62 start adbd
63 setprop sys.usb.state ${sys.usb.config}
64 40
65on property:sys.usb.config=ptp 41on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
66 write /sys/class/android_usb/android0/enable 0 42 write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
67 write /sys/class/android_usb/android0/idVendor 0451 43 write /config/usb_gadget/g1/os_desc/use 1
68 write /sys/class/android_usb/android0/idProduct D10D 44 write /config/usb_gadget/g1/idProduct 0xD109
69 write /sys/class/android_usb/android0/functions ${sys.usb.config}
70 write /sys/class/android_usb/android0/enable 1
71 setprop sys.usb.state ${sys.usb.config}
72 45
73on property:sys.usb.config=ptp,adb 46on property:sys.usb.config=ptp && property:sys.usb.configfs=1
74 write /sys/class/android_usb/android0/enable 0 47 write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
75 write /sys/class/android_usb/android0/idVendor 0451 48 write /config/usb_gadget/g1/os_desc/use 1
76 write /sys/class/android_usb/android0/idProduct D10E 49 write /config/usb_gadget/g1/idProduct 0xD10D
77 write /sys/class/android_usb/android0/functions ${sys.usb.config}
78 write /sys/class/android_usb/android0/enable 1
79 start adbd
80 setprop sys.usb.state ${sys.usb.config}
81 50
82on property:sys.usb.config=mass_storage 51on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
83 write /sys/class/android_usb/android0/enable 0 52 write /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id "PTP"
84 write /sys/class/android_usb/android0/idVendor 0451 53 write /config/usb_gadget/g1/os_desc/use 1
85 write /sys/class/android_usb/android0/idProduct D100 54 write /config/usb_gadget/g1/idProduct 0xD10E
86 write /sys/class/android_usb/android0/functions ${sys.usb.config}
87 write /sys/class/android_usb/android0/enable 1
88 setprop sys.usb.state ${sys.usb.config}
89 55
90on property:sys.usb.config=mass_storage,adb 56on property:sys.usb.config=adb && property:sys.usb.configfs=1
91 write /sys/class/android_usb/android0/enable 0 57 write /config/usb_gadget/g1/idProduct 0xD101
92 write /sys/class/android_usb/android0/idVendor 0451
93 write /sys/class/android_usb/android0/idProduct D102
94 write /sys/class/android_usb/android0/functions ${sys.usb.config}
95 write /sys/class/android_usb/android0/enable 1
96 start adbd
97 setprop sys.usb.state ${sys.usb.config}