diff options
author | Mike Lockwood <lockwood@android.com> | 2011-06-08 17:40:00 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-06-17 15:53:58 -0400 |
commit | 352dfdfaea55601f2c36fe7286a158e84028bcf3 (patch) | |
tree | bf7c388b602c0a5255be180a1f8a85b3eb334283 /rootdir | |
parent | 9f7ad372b33dc6c69cc5818aaf36e6e51ecefe29 (diff) | |
download | system_core-352dfdfaea55601f2c36fe7286a158e84028bcf3.zip system_core-352dfdfaea55601f2c36fe7286a158e84028bcf3.tar.gz system_core-352dfdfaea55601f2c36fe7286a158e84028bcf3.tar.bz2 |
init.rc: Changes for new USB gadget drivers
Change-Id: I68fcf167c9fc71bb5f44793648a35d3181fd36d7
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.rc | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index a2c6beb..dc209f3 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -186,6 +186,9 @@ on post-fs-data # Set indication (checked by vold) that we have finished this action #setprop vold.post_fs_data_done 1 + chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file + chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file + on boot # basic network init ifup lo @@ -325,6 +328,28 @@ on property:vold.decrypt=trigger_shutdown_framework class_reset late_start class_reset main +# USB accessory configuration +on property:sys.usb.config=accessory + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d00 + 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 + +# USB accessory configuration, with adb +on property:sys.usb.config=accessory,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d01 + 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:persist.sys.usb.config=* + setprop sys.usb.config $persist.sys.usb.config + ## Daemon processes to be run by init. ## service ueventd /sbin/ueventd @@ -341,7 +366,7 @@ service console /system/bin/sh on property:ro.debuggable=1 start console -# adbd is controlled by the persist.service.adb.enable system property +# adbd is controlled via property triggers in init.<platform>.usb.rc service adbd /sbin/adbd class core disabled @@ -350,12 +375,6 @@ service adbd /sbin/adbd on property:ro.kernel.qemu=1 start adbd -on property:persist.service.adb.enable=1 - start adbd - -on property:persist.service.adb.enable=0 - stop adbd - service servicemanager /system/bin/servicemanager class core user system |