diff options
| author | AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in> | 2026-05-24 12:23:38 +0530 |
|---|---|---|
| committer | Khem Raj <khem.raj@oss.qualcomm.com> | 2026-05-24 08:25:06 -0700 |
| commit | 66f56dda5ec7afe2b059da3c50f0edf3d536964d (patch) | |
| tree | a0764cec5cd5d1e8399d738b80594fcbc0189c86 /meta-oe/recipes-devtools/android-tools/android-tools-conf | |
| parent | 33c1e33d2303d20e916783fb91e78781bab7cc2b (diff) | |
| download | meta-openembedded-66f56dda5ec7afe2b059da3c50f0edf3d536964d.tar.gz | |
android-tools: move android-tools v29.x from dynamic-layers/selinux to meta-oe
Relocate the recipe from dynamic-layers/selinux/ to the main
meta-oe/recipes-devtools/ directory.
The android-tools recipe (version 29.0.6.r14) was previously restricted
to the selinux dynamic-layer.
Investigation shows that version 29.0.6.r14 does not have a hard dependency
on libselinux for core tool functionality.
(adb, fastboot, and sparse image tools).
- Basic runable test was done for binaries in android-tools-native
- Checked for selinux absense by looking for selinx using $ ldd binary-name
Changes:
- Relocate recipe from dynamic-layers/selinux/ to recipes-devtools/
Signed-off-by: AshishKumar Mishra <ashishkumar.mishra@bmwtechworks.in>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.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 | 37 |
1 files changed, 37 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..26cf30eddd --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | [ ! -e /dev/pts ] && mkdir -p /dev/pts | ||
| 4 | [ ! -e /dev/pts/0 ] && mount devpts /dev/pts -t devpts | ||
| 5 | |||
| 6 | # TODO enable the lines below once we have support for getprop | ||
| 7 | # retrieve the product info from Android | ||
| 8 | # manufacturer=$(getprop ro.product.manufacturer Android) | ||
| 9 | # model=$(getprop ro.product.model Android) | ||
| 10 | # serial=$(getprop ro.serialno 0123456789ABCDEF) | ||
| 11 | |||
| 12 | #below are now needed in order to use FunctionFS for ADB, tested to work with 3.4+ kernels | ||
| 13 | if grep -q functionfs /proc/filesystems; then | ||
| 14 | mkdir -p /dev/usb-ffs/adb | ||
| 15 | mount -t functionfs adb /dev/usb-ffs/adb | ||
| 16 | #android-gadget-setup doesn't provide below 2 and without them it won't work, so we provide them here. | ||
| 17 | echo adb > /sys/class/android_usb/android0/f_ffs/aliases | ||
| 18 | echo ffs > /sys/class/android_usb/android0/functions | ||
| 19 | fi | ||
| 20 | |||
| 21 | manufacturer="$(cat /system/build.prop | grep -o 'ro.product.manufacturer=.*' | cut -d'=' -f 2)" | ||
| 22 | model="$(cat /system/build.prop | grep -o 'ro.product.model=.*' | cut -d'=' -f 2)" | ||
| 23 | # get the device serial number from /proc/cmdline directly(since we have no getprop on | ||
| 24 | # GNU/Linux) | ||
| 25 | serial="$(cat /proc/cmdline | sed 's/.*androidboot.serialno=//' | sed 's/ .*//')" | ||
| 26 | |||
| 27 | echo $serial > /sys/class/android_usb/android0/iSerial | ||
| 28 | echo $manufacturer > /sys/class/android_usb/android0/iManufacturer | ||
| 29 | echo $model > /sys/class/android_usb/android0/iProduct | ||
| 30 | |||
| 31 | echo "0" > /sys/class/android_usb/android0/enable | ||
| 32 | echo "18d1" > /sys/class/android_usb/android0/idVendor | ||
| 33 | echo "D002" > /sys/class/android_usb/android0/idProduct | ||
| 34 | echo "adb" > /sys/class/android_usb/android0/functions | ||
| 35 | echo "1" > /sys/class/android_usb/android0/enable | ||
| 36 | |||
| 37 | sleep 4 | ||
