aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2019-05-23 11:55:05 +0000
committerKhem Raj <raj.khem@gmail.com>2019-05-24 10:11:28 -0700
commitac561d7ce0310da609e93450b6e8d2f70e28c6bb (patch)
tree54452a436f0e7f23ec5cb47d320fc94b706b6efd /meta-oe
parent68f2b466bf96273221d7c3d7ee25d07675d59b35 (diff)
downloadmeta-openembedded-contrib-ac561d7ce0310da609e93450b6e8d2f70e28c6bb.tar.gz
android-tools-conf: import one more improvement for android-gadget-setup from meta-luneos
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
index beca353e67..26cf30eddd 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
@@ -9,6 +9,15 @@
# model=$(getprop ro.product.model Android)
# serial=$(getprop ro.serialno 0123456789ABCDEF)
+#below are now needed in order to use FunctionFS for ADB, tested to work with 3.4+ kernels
+if grep -q functionfs /proc/filesystems; then
+ mkdir -p /dev/usb-ffs/adb
+ mount -t functionfs adb /dev/usb-ffs/adb
+ #android-gadget-setup doesn't provide below 2 and without them it won't work, so we provide them here.
+ echo adb > /sys/class/android_usb/android0/f_ffs/aliases
+ echo ffs > /sys/class/android_usb/android0/functions
+fi
+
manufacturer="$(cat /system/build.prop | grep -o 'ro.product.manufacturer=.*' | cut -d'=' -f 2)"
model="$(cat /system/build.prop | grep -o 'ro.product.model=.*' | cut -d'=' -f 2)"
# get the device serial number from /proc/cmdline directly(since we have no getprop on