Skip to contentSkip to conversation

android-tools: Fix, enhance and move from meta-shr

PATCH In review Khem Raj 3 participants 4 messages Jul 1, 2016 – Jul 4, 2016

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 android-tools: Fix, enhance and move from meta-shr

android tools offer filsystem tools for creating sparse images, so package them in package of its own.

Fix src uri to latest

---
 .../android-tools-conf/android-gadget-setup        |    25 +
 .../android-tools/android-tools-conf_1.0.bb        |    13 +
 .../adbd-disable-client-authentication.patch       |    16 +
 .../android-tools/android-tools/add_adbd.patch     | 20218 +++++++++++++++++++
 .../android-tools/android-tools-adbd.service       |    12 +
 .../android-tools/disable-selinux-support.patch    |   137 +
 .../android-tools/reboot-syscall.patch             |    25 +
 .../android-tools/remove-libselinux.patch          |    13 +
 .../android-tools/android-tools_4.2.2.bb           |    82 +
 9 files changed, 20541 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/adbd-disable-client-authentication.patch
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/add_adbd.patch
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/disable-selinux-support.patch
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools/remove-libselinux.patch
 create mode 100644 meta-oe/recipes-devtools/android-tools/android-tools_4.2.2.bb
meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup new file +25 -0
new file mode 100644
index 0000000..f7d9973
@@ -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
meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb new file +13 -0
new file mode 100644
index 0000000..af98f92
@@ -0,0 +1,13 @@
+DESCRIPTION = "Different utilities from Android - corressponding configuration files"
+SECTION = "console/utils"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://android-gadget-setup"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir}
+}
meta-oe/recipes-devtools/android-tools/android-tools/adbd-disable-client-authentication.patch new file +16 -0
new file mode 100644
index 0000000..9539160
@@ -0,0 +1,16 @@
+--- android-tools-orig/core/adbd/adb_auth_client.c	2013-07-29 16:24:49.827822956 +0000
++++ android-tools/core/adbd/adb_auth_client.c	2013-07-29 16:25:29.931623038 +0000
+@@ -200,8 +200,11 @@
+         return;
+     }
+ 
+-    fdevent_install(&t->auth_fde, framework_fd, adb_auth_event, t);
+-    fdevent_add(&t->auth_fde, FDE_READ);
++    // fdevent_install(&t->auth_fde, framework_fd, adb_auth_event, t);
++    // fdevent_add(&t->auth_fde, FDE_READ);
++
++    adb_auth_reload_keys();
++    adb_auth_verified(t);
+ }
+ 
+ static void adb_auth_listener(int fd, unsigned events, void *data)
meta-oe/recipes-devtools/android-tools/android-tools/add_adbd.patch new file +20218 -0

2,946 lines not on this page · raw message

meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service new file +12 -0
new file mode 100644
index 0000000..88ed687

Lines of this file are not shown. View the raw message.

meta-oe/recipes-devtools/android-tools/android-tools/disable-selinux-support.patch new file +137 -0

137 lines not on this page · raw message

meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch new file +25 -0
new file mode 100644
index 0000000..0055416

Lines of this file are not shown. View the raw message.

meta-oe/recipes-devtools/android-tools/android-tools/remove-libselinux.patch new file +13 -0
new file mode 100644
index 0000000..24690b2

Lines of this file are not shown. View the raw message.

meta-oe/recipes-devtools/android-tools/android-tools_4.2.2.bb new file +82 -0

82 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.9.0

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi Khem,

Quoted 2 lines · Khem Raj

android tools offer filsystem tools for creating sparse images, so package them in package of its own.

fwiw, I plan to rework android-tools recipes for:
https://bugs.linaro.org/show_bug.cgi?id=2179

It's currently based on Ubuntu package, forked for Ubuntu phone. I've updated Debian package built from AOSP source and up-to-date. I've dropped the ubuntu-ism which will never be upstreamed.

The plan is to be closer to the upstream AOSP source code and be able to update the recipe regularly.

Obviously, it doesn't prevent to get current recipe moved to meta-oe. It's just a heads up :)

Cheers,
Fathi

author
#2 lore raw
Quoted 14 lines · Fathi Boudra

Hi Khem,

Quoted 2 lines · Khem Raj

android tools offer filsystem tools for creating sparse images, so package them in package of its own.

fwiw, I plan to rework android-tools recipes for:
https://bugs.linaro.org/show_bug.cgi?id=2179

It's currently based on Ubuntu package, forked for Ubuntu phone. I've updated Debian package built from AOSP source and up-to-date. I've dropped the ubuntu-ism which will never be upstreamed.

Quoted 5 lines

The plan is to be closer to the upstream AOSP source code and be able to update the recipe regularly.

Obviously, it doesn't prevent to get current recipe moved to meta-oe. It's just a heads up :)

Thanks for.update. I think this really should go into oe core. Since sparse file system is across many devices

Quoted 8 lines

Cheers,
Fathi
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 5 lines · Khem Raj
Quoted 2 lines

Obviously, it doesn't prevent to get current recipe moved to meta-oe. It's just a heads up :)

Thanks for.update. I think this really should go into oe core. Since sparse file system is across many devices

+1. for sure.. that would be very nice.