diff options
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools')
6 files changed, 99 insertions, 26 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb index 3f9d49a2d2..342e7fd1a5 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb | |||
@@ -3,6 +3,8 @@ SECTION = "console/utils" | |||
3 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
5 | 5 | ||
6 | S = "${UNPACKDIR}" | ||
7 | |||
6 | SRC_URI = " \ | 8 | SRC_URI = " \ |
7 | file://android-gadget-setup \ | 9 | file://android-gadget-setup \ |
8 | file://android-gadget-start \ | 10 | file://android-gadget-start \ |
@@ -14,17 +16,17 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
14 | 16 | ||
15 | do_install() { | 17 | do_install() { |
16 | install -d ${D}${bindir} | 18 | install -d ${D}${bindir} |
17 | install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} | 19 | install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} |
18 | install -m 0755 ${WORKDIR}/android-gadget-start ${D}${bindir} | 20 | install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir} |
19 | install -m 0755 ${WORKDIR}/android-gadget-cleanup ${D}${bindir} | 21 | install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir} |
20 | 22 | ||
21 | if [ -r ${WORKDIR}/android-gadget-setup.machine ] ; then | 23 | if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then |
22 | install -d ${D}${sysconfdir} | 24 | install -d ${D}${sysconfdir} |
23 | install -m 0644 ${WORKDIR}/android-gadget-setup.machine ${D}${sysconfdir} | 25 | install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir} |
24 | fi | 26 | fi |
25 | 27 | ||
26 | install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d | 28 | install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d |
27 | install -m 0644 ${WORKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d | 29 | install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d |
28 | } | 30 | } |
29 | 31 | ||
30 | FILES:${PN} += " \ | 32 | FILES:${PN} += " \ |
@@ -33,3 +35,4 @@ FILES:${PN} += " \ | |||
33 | 35 | ||
34 | PROVIDES += "android-tools-conf" | 36 | PROVIDES += "android-tools-conf" |
35 | RPROVIDES:${PN} = "android-tools-conf" | 37 | RPROVIDES:${PN} = "android-tools-conf" |
38 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb index 34b1a9bdd2..764d6b404f 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb | |||
@@ -5,11 +5,13 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
5 | 5 | ||
6 | SRC_URI = "file://android-gadget-setup" | 6 | SRC_URI = "file://android-gadget-setup" |
7 | 7 | ||
8 | S = "${UNPACKDIR}" | ||
9 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 10 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
9 | 11 | ||
10 | do_install() { | 12 | do_install() { |
11 | install -d ${D}${bindir} | 13 | install -d ${D}${bindir} |
12 | install -m 0755 ${WORKDIR}/android-gadget-setup ${D}${bindir} | 14 | install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} |
13 | } | 15 | } |
14 | 16 | ||
15 | python () { | 17 | python () { |
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service index ddf8d7f74e..b6661f2e39 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service +++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service | |||
@@ -1,6 +1,6 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description=Android Debug Bridge | 2 | Description=Android Debug Bridge |
3 | ConditionPathExists=/var/usb-debugging-enabled | 3 | ConditionPathExists=/etc/usb-debugging-enabled |
4 | Before=android-system.service | 4 | Before=android-system.service |
5 | 5 | ||
6 | [Service] | 6 | [Service] |
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff b/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff index 177d69a97a..ddb41ea4b0 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff +++ b/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff | |||
@@ -17,9 +17,10 @@ Upstream-Status: Pending | |||
17 | +++ b/adb/adb_auth_host.c | 17 | +++ b/adb/adb_auth_host.c |
18 | @@ -75,6 +75,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, | 18 | @@ -75,6 +75,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, |
19 | BIGNUM* rem = BN_new(); | 19 | BIGNUM* rem = BN_new(); |
20 | BIGNUM* n = BN_new(); | 20 | - BIGNUM* n = BN_new(); |
21 | + const BIGNUM* n; | ||
21 | BIGNUM* n0inv = BN_new(); | 22 | BIGNUM* n0inv = BN_new(); |
22 | + BIGNUM* e = BN_new(); | 23 | + const BIGNUM* e; |
23 | 24 | ||
24 | if (RSA_size(rsa) != RSANUMBYTES) { | 25 | if (RSA_size(rsa) != RSANUMBYTES) { |
25 | ret = 0; | 26 | ret = 0; |
@@ -32,7 +33,7 @@ Upstream-Status: Pending | |||
32 | BN_set_bit(r, RSANUMWORDS * 32); | 33 | BN_set_bit(r, RSANUMWORDS * 32); |
33 | BN_mod_sqr(rr, r, n, ctx); | 34 | BN_mod_sqr(rr, r, n, ctx); |
34 | BN_div(NULL, rem, n, r32, ctx); | 35 | BN_div(NULL, rem, n, r32, ctx); |
35 | @@ -96,7 +97,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, | 36 | @@ -96,11 +97,10 @@ static int RSA_to_RSAPublicKey(RSA *rsa, |
36 | BN_div(n, rem, n, r32, ctx); | 37 | BN_div(n, rem, n, r32, ctx); |
37 | pkey->n[i] = BN_get_word(rem); | 38 | pkey->n[i] = BN_get_word(rem); |
38 | } | 39 | } |
@@ -41,3 +42,7 @@ Upstream-Status: Pending | |||
41 | 42 | ||
42 | out: | 43 | out: |
43 | BN_free(n0inv); | 44 | BN_free(n0inv); |
45 | - BN_free(n); | ||
46 | BN_free(rem); | ||
47 | BN_free(r); | ||
48 | BN_free(rr); | ||
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch new file mode 100644 index 0000000000..b77c0ebc13 --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From c9f8cb184a7218c97ff966db44da6dd814c0e273 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Fri, 21 Mar 2025 09:49:32 +0000 | ||
4 | Subject: [PATCH] ext4_utils: drop unused parameter from allocate_inode() | ||
5 | |||
6 | * fixes build with gcc-15: | ||
7 | http://errors.yoctoproject.org/Errors/Details/848455/ | ||
8 | |||
9 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_directory': | ||
10 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:115:29: error: too many arguments to function 'allocate_inode'; expected 0, have 1 | ||
11 | 115 | inode_num = allocate_inode(info); | ||
12 | | ^~~~~~~~~~~~~~ ~~~~ | ||
13 | In file included from TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:32: | ||
14 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here | ||
15 | 61 | u32 allocate_inode(); | ||
16 | | ^~~~~~~~~~~~~~ | ||
17 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_file': | ||
18 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:183:21: error: too many arguments to function 'allocate_inode'; expected 0, have 1 | ||
19 | 183 | inode_num = allocate_inode(info); | ||
20 | | ^~~~~~~~~~~~~~ ~~~~ | ||
21 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here | ||
22 | 61 | u32 allocate_inode(); | ||
23 | | ^~~~~~~~~~~~~~ | ||
24 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_link': | ||
25 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:218:21: error: too many arguments to function 'allocate_inode'; expected 0, have 1 | ||
26 | 218 | inode_num = allocate_inode(info); | ||
27 | | ^~~~~~~~~~~~~~ ~~~~ | ||
28 | TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here | ||
29 | 61 | u32 allocate_inode(); | ||
30 | | ^~~~~~~~~~~~~~ | ||
31 | make: *** [<builtin>: contents.o] Error 1 | ||
32 | |||
33 | Upstream-Status: Pending [this whole code was removed in newer version android-9.0.0_r1 https://android.googlesource.com/platform/system/extras/+/7a837fcd6e9c0e0219f743052c78cc1c5988dfaf] | ||
34 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
35 | --- | ||
36 | ext4_utils/contents.c | 6 +++--- | ||
37 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
38 | |||
39 | diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c | ||
40 | index 3144de93f..ac1b71706 100644 | ||
41 | --- a/ext4_utils/contents.c | ||
42 | +++ b/ext4_utils/contents.c | ||
43 | @@ -112,7 +112,7 @@ u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries, | ||
44 | len = blocks * info.block_size; | ||
45 | |||
46 | if (dir_inode_num) { | ||
47 | - inode_num = allocate_inode(info); | ||
48 | + inode_num = allocate_inode(); | ||
49 | } else { | ||
50 | dir_inode_num = EXT4_ROOT_INO; | ||
51 | inode_num = EXT4_ROOT_INO; | ||
52 | @@ -180,7 +180,7 @@ u32 make_file(const char *filename, u64 len) | ||
53 | struct ext4_inode *inode; | ||
54 | u32 inode_num; | ||
55 | |||
56 | - inode_num = allocate_inode(info); | ||
57 | + inode_num = allocate_inode(); | ||
58 | if (inode_num == EXT4_ALLOCATE_FAILED) { | ||
59 | error("failed to allocate inode\n"); | ||
60 | return EXT4_ALLOCATE_FAILED; | ||
61 | @@ -215,7 +215,7 @@ u32 make_link(const char *link) | ||
62 | u32 inode_num; | ||
63 | u32 len = strlen(link); | ||
64 | |||
65 | - inode_num = allocate_inode(info); | ||
66 | + inode_num = allocate_inode(); | ||
67 | if (inode_num == EXT4_ALLOCATE_FAILED) { | ||
68 | error("failed to allocate inode\n"); | ||
69 | return EXT4_ALLOCATE_FAILED; | ||
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb index 1c66ea4997..c04a1ef8c4 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb +++ b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb | |||
@@ -21,11 +21,11 @@ SRCREV_build = "16e987def3d7d8f7d30805eb95cef69e52a87dbc" | |||
21 | 21 | ||
22 | SRCREV_FORMAT = "core_extras_libhardware_libselinux_build" | 22 | SRCREV_FORMAT = "core_extras_libhardware_libselinux_build" |
23 | SRC_URI = " \ | 23 | SRC_URI = " \ |
24 | git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=git/system/core \ | 24 | git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/system/core \ |
25 | git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=git/system/extras \ | 25 | git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/system/extras \ |
26 | git://${ANDROID_MIRROR}/platform/hardware/libhardware;name=libhardware;protocol=https;nobranch=1;destsuffix=git/hardware/libhardware \ | 26 | git://${ANDROID_MIRROR}/platform/hardware/libhardware;name=libhardware;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/hardware/libhardware \ |
27 | git://${ANDROID_MIRROR}/platform/external/libselinux;name=libselinux;protocol=https;nobranch=1;destsuffix=git/external/libselinux \ | 27 | git://${ANDROID_MIRROR}/platform/external/libselinux;name=libselinux;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/external/libselinux \ |
28 | git://${ANDROID_MIRROR}/platform/build;name=build;protocol=https;nobranch=1;destsuffix=git/build \ | 28 | git://${ANDROID_MIRROR}/platform/build;name=build;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/build \ |
29 | file://core/0001-adb-remove-selinux-extensions.patch;patchdir=system/core \ | 29 | file://core/0001-adb-remove-selinux-extensions.patch;patchdir=system/core \ |
30 | file://core/0002-adb-Use-local-sockets-where-appropriate.patch;patchdir=system/core \ | 30 | file://core/0002-adb-Use-local-sockets-where-appropriate.patch;patchdir=system/core \ |
31 | file://core/0003-adb-define-shell-command.patch;patchdir=system/core \ | 31 | file://core/0003-adb-define-shell-command.patch;patchdir=system/core \ |
@@ -48,6 +48,7 @@ SRC_URI = " \ | |||
48 | file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \ | 48 | file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \ |
49 | file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \ | 49 | file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \ |
50 | file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \ | 50 | file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \ |
51 | file://extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch;patchdir=system/extras \ | ||
51 | file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \ | 52 | file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \ |
52 | file://libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch;patchdir=external/libselinux \ | 53 | file://libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch;patchdir=external/libselinux \ |
53 | file://android-tools-adbd.service \ | 54 | file://android-tools-adbd.service \ |
@@ -61,7 +62,6 @@ SRC_URI = " \ | |||
61 | " | 62 | " |
62 | 63 | ||
63 | 64 | ||
64 | S = "${WORKDIR}/git" | ||
65 | B = "${WORKDIR}/${BPN}" | 65 | B = "${WORKDIR}/${BPN}" |
66 | 66 | ||
67 | # http://errors.yoctoproject.org/Errors/Details/133881/ | 67 | # http://errors.yoctoproject.org/Errors/Details/133881/ |
@@ -88,7 +88,7 @@ TOOLS:class-native = "fastboot ext4_utils mkbootimg" | |||
88 | TOOLS:class-nativesdk = "fastboot ext4_utils mkbootimg" | 88 | TOOLS:class-nativesdk = "fastboot ext4_utils mkbootimg" |
89 | 89 | ||
90 | do_compile() { | 90 | do_compile() { |
91 | cp ${WORKDIR}/gitignore ${S}/.gitignore | 91 | cp ${UNPACKDIR}/gitignore ${S}/.gitignore |
92 | 92 | ||
93 | # Setting both variables below causing our makefiles to not work with | 93 | # Setting both variables below causing our makefiles to not work with |
94 | # implicit make rules | 94 | # implicit make rules |
@@ -123,7 +123,7 @@ do_compile() { | |||
123 | 123 | ||
124 | for tool in ${TOOLS}; do | 124 | for tool in ${TOOLS}; do |
125 | mkdir -p ${B}/${tool} | 125 | mkdir -p ${B}/${tool} |
126 | oe_runmake -f ${B}/${tool}.mk -C ${B}/${tool} | 126 | oe_runmake -f ${UNPACKDIR}/${BPN}/${tool}.mk -C ${B}/${tool} |
127 | done | 127 | done |
128 | } | 128 | } |
129 | 129 | ||
@@ -151,7 +151,7 @@ do_install() { | |||
151 | fi | 151 | fi |
152 | 152 | ||
153 | # Outside the if statement to avoid errors during do_package | 153 | # Outside the if statement to avoid errors during do_package |
154 | install -D -p -m0644 ${WORKDIR}/android-tools-adbd.service \ | 154 | install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \ |
155 | ${D}${systemd_unitdir}/system/android-tools-adbd.service | 155 | ${D}${systemd_unitdir}/system/android-tools-adbd.service |
156 | 156 | ||
157 | if echo ${TOOLS} | grep -q "fastboot" ; then | 157 | if echo ${TOOLS} | grep -q "fastboot" ; then |
@@ -187,9 +187,3 @@ FILES:${PN}-fstools = "\ | |||
187 | " | 187 | " |
188 | 188 | ||
189 | BBCLASSEXTEND = "native" | 189 | BBCLASSEXTEND = "native" |
190 | |||
191 | android_tools_enable_devmode() { | ||
192 | touch ${IMAGE_ROOTFS}/var/usb-debugging-enabled | ||
193 | } | ||
194 | |||
195 | ROOTFS_POSTPROCESS_COMMAND_${PN}-adbd += "${@bb.utils.contains("USB_DEBUGGING_ENABLED", "1", "android_tools_enable_devmode;", "", d)}" | ||