diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2016-09-07 12:58:47 +0300 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-09-15 10:22:46 +0200 |
commit | a231c431a522ae1821fc484bb1a1f9997ecabf20 (patch) | |
tree | 0513730154c45ce23dc35393bcf1ec609590a23b /meta-oe/recipes-devtools/android-tools/android-tools-conf | |
parent | 4fad615950a92db633d2d46fddd3fc491a853e55 (diff) | |
download | meta-openembedded-contrib-a231c431a522ae1821fc484bb1a1f9997ecabf20.tar.gz |
android-tools: add recipe from AOSP tag android-5.1.1_r37
Android tools offer filsystem tools for creating sparse images,
so package them in package of its own.
This recipe is re-worked and not a straight import from meta-shr.
It's built from AOSP source. I've dropped the ubuntu-ism which will
never be upstreamed.
The intent is to be closer to the upstream AOSP source code and be able
to update the recipe regularly.
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools-conf')
-rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup | 25 |
1 files changed, 25 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 new file mode 100644 index 0000000000..f7d9973722 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup @@ -0,0 +1,25 @@ +#!/bin/sh + +# TODO enable the lines below once we have support for getprop +# retrieve the product info from Android +# manufacturer=$(getprop ro.product.manufacturer Android) +# model=$(getprop ro.product.model Android) +# serial=$(getprop ro.serialno 0123456789ABCDEF) + +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 +# GNU/Linux) +serial="$(cat /proc/cmdline | sed 's/.*androidboot.serialno=//' | sed 's/ .*//')" + +echo $serial > /sys/class/android_usb/android0/iSerial +echo $manufacturer > /sys/class/android_usb/android0/iManufacturer +echo $model > /sys/class/android_usb/android0/iProduct + +echo "0" > /sys/class/android_usb/android0/enable +echo "18d1" > /sys/class/android_usbid_usb/android0/idVendor +echo "D002" > /sys/class/android_usb/android0/idProduct +echo "adb" > /sys/class/android_usb/android0/functions +echo "1" > /sys/class/android_usb/android0/enable + +sleep 4 |