summaryrefslogtreecommitdiffstats
path: root/init.herring.usb.rc
blob: 73acf1641d867c520253ccaffea28b8e9970be2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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