diff options
author | Badhri Jagan Sridharan <Badhri@google.com> | 2015-08-28 17:39:28 -0700 |
---|---|---|
committer | Badhri Jagan Sridharan <Badhri@google.com> | 2015-09-01 15:39:22 -0700 |
commit | 48d59acc57701dce66113544ccf2a711e21fb1f4 (patch) | |
tree | 7dbd3d28b397395f528c940dc5af15f7ffbf80ff /rootdir/init.usb.rc | |
parent | 4a1f02eaa3e35ac2d975a2e632880ac26daff3bb (diff) | |
download | system_core-48d59acc57701dce66113544ccf2a711e21fb1f4.zip system_core-48d59acc57701dce66113544ccf2a711e21fb1f4.tar.gz system_core-48d59acc57701dce66113544ccf2a711e21fb1f4.tar.bz2 |
init.usb.rc: Add new system property for configfs
This CL helps to execute a different set of
commands for the usb configs specified in
init.usb.rc. Aimed at using configfs based
commands over android composition driver.
Bug=23633457
Change-Id: Ifa5f804e1cff93d15ad57d0ed553300bc5868936
Diffstat (limited to 'rootdir/init.usb.rc')
-rw-r--r-- | rootdir/init.usb.rc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/rootdir/init.usb.rc b/rootdir/init.usb.rc index 6482230..cb1cd57 100644 --- a/rootdir/init.usb.rc +++ b/rootdir/init.usb.rc @@ -9,8 +9,11 @@ on post-fs-data chown system system /sys/class/android_usb/android0/f_rndis/ethaddr chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr +on boot + setprop sys.usb.configfs 0 + # Used to disable USB when switching states -on property:sys.usb.config=none +on property:sys.usb.config=none && property:sys.usb.configfs=0 stop adbd write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/bDeviceClass 0 @@ -19,7 +22,7 @@ on property:sys.usb.config=none # adb only USB configuration # This is the fallback configuration if the # USB manager fails to set a standard configuration -on property:sys.usb.config=adb +on property:sys.usb.config=adb && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 4EE7 @@ -29,7 +32,7 @@ on property:sys.usb.config=adb setprop sys.usb.state ${sys.usb.config} # USB accessory configuration -on property:sys.usb.config=accessory +on property:sys.usb.config=accessory && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 2d00 @@ -38,7 +41,7 @@ on property:sys.usb.config=accessory setprop sys.usb.state ${sys.usb.config} # USB accessory configuration, with adb -on property:sys.usb.config=accessory,adb +on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 2d01 @@ -48,7 +51,7 @@ on property:sys.usb.config=accessory,adb setprop sys.usb.state ${sys.usb.config} # audio accessory configuration -on property:sys.usb.config=audio_source +on property:sys.usb.config=audio_source && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 2d02 @@ -57,7 +60,7 @@ on property:sys.usb.config=audio_source setprop sys.usb.state ${sys.usb.config} # audio accessory configuration, with adb -on property:sys.usb.config=audio_source,adb +on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 2d03 @@ -67,7 +70,7 @@ on property:sys.usb.config=audio_source,adb setprop sys.usb.state ${sys.usb.config} # USB and audio accessory configuration -on property:sys.usb.config=accessory,audio_source +on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 2d04 @@ -76,7 +79,7 @@ on property:sys.usb.config=accessory,audio_source setprop sys.usb.state ${sys.usb.config} # USB and audio accessory configuration, with adb -on property:sys.usb.config=accessory,audio_source,adb +on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=0 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18d1 write /sys/class/android_usb/android0/idProduct 2d05 |