summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2014-02-19 17:41:02 -0800
committerBenoit Goby <benoit@android.com>2014-02-19 17:48:49 -0800
commit1b9641127c539c73cf97d7a69fa917838043db92 (patch)
tree52e16fad9258882c2e9ef9b5b8894c88e80af7b7 /etc
parenta5d105e2397d81537facd93fd8a9d3e263d57dc9 (diff)
downloadbootable_recovery-1b9641127c539c73cf97d7a69fa917838043db92.zip
bootable_recovery-1b9641127c539c73cf97d7a69fa917838043db92.tar.gz
bootable_recovery-1b9641127c539c73cf97d7a69fa917838043db92.tar.bz2
recovery: Fix adb with linux 3.10
In kernel 3.10, f_adb has been removed and adbd can use functionfs instead. Mount functionfs on boot for adbd. On older kernels, mount will fail silently and adbd will revert to f_adb. Change-Id: I5db57aaf35b35859ea88c7d0e0661d8c553e5811
Diffstat (limited to 'etc')
-rw-r--r--etc/init.rc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/init.rc b/etc/init.rc
index 159747e..6e0595b 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -28,9 +28,15 @@ on init
chown root shell /tmp
chmod 0775 /tmp
+on fs
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18D1
write /sys/class/android_usb/android0/idProduct D001
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}