Skip to content

Commit

Permalink
android-tools: update to 35.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 committed May 2, 2024
1 parent 1a84176 commit 398882b
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 40 deletions.
36 changes: 28 additions & 8 deletions mingw-w64-android-tools/0001-android-tools-cmake.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
--- a/vendor/CMakeLists.adb.txt
+++ b/vendor/CMakeLists.adb.txt
@@ -29,23 +29,37 @@
@@ -31,24 +31,38 @@
adb/pairing_connection/pairing_connection.cpp
adb/services.cpp
adb/socket_spec.cpp
- adb/sysdeps_unix.cpp
adb/sysdeps/errno.cpp
- adb/sysdeps/posix/network.cpp
${ADB_APP_PROCESSES_PROTO_SRCS} ${ADB_APP_PROCESSES_PROTO_HDRS}
${ADB_DEVCIES_PROTO_SRCS} ${ADB_DEVICES_PROTO_HDRS}
${ADB_KNOWN_HOSTS_PROTO_SRCS} ${ADB_KNOWN_HOSTS_PROTO_HDRS}
${ADB_KEY_TYPE_PROTO_SRCS} ${ADB_KEY_TYPE_PROTO_HDRS}
${ADB_PAIRING_PROTO_SRCS} ${ADB_PAIRING_PROTO_HDRS})

-if(APPLE)
+if(WIN32)
+ list(APPEND libadb_SOURCES
list(APPEND libadb_SOURCES
- adb/client/usb_osx.cpp)
+ adb/client/usb_windows.cpp
+ adb/sysdeps_win32.cpp
+ adb/sysdeps/win32/errno.cpp
+ adb/sysdeps/win32/stat.cpp)
+elseif(APPLE)
list(APPEND libadb_SOURCES
- adb/client/usb_osx.cpp)
+ list(APPEND libadb_SOURCES
+ adb/client/usb_osx.cpp
+ adb/sysdeps_unix.cpp
+ adb/sysdeps/posix/network.cpp)
Expand Down Expand Up @@ -152,23 +153,42 @@
target_link_libraries(adb
--- a/vendor/CMakeLists.fastboot.txt
+++ b/vendor/CMakeLists.fastboot.txt
@@ -38,6 +38,7 @@
@@ -14,17 +14,7 @@
libbase/include)

add_library(libutil STATIC
- core/libutils/FileMap.cpp
- core/libutils/JenkinsHash.cpp
- core/libutils/LightRefBase.cpp
- core/libutils/NativeHandle.cpp
- core/libutils/Printer.cpp
- core/libutils/StopWatch.cpp
- core/libutils/SystemClock.cpp
- core/libutils/Threads.cpp
- core/libutils/Timers.cpp
- core/libutils/Tokenizer.cpp
- core/libutils/misc.cpp)
+ core/libutils/FileMap.cpp)

target_include_directories(libutil PUBLIC
core/include
@@ -43,6 +33,7 @@

# Only add common sources from libselinux_defaults and libselinux
# See the file list in selinux/libselinux/Android.bp
+if(NOT WIN32)
add_library(libselinux STATIC
selinux/libselinux/src/booleans.c
selinux/libselinux/src/callbacks.c
@@ -94,6 +95,7 @@
@@ -99,6 +90,7 @@

target_include_directories(libsepol PUBLIC
selinux/libsepol/include)
+endif(NOT WIN32)

set(fastboot_SOURCES
core/fastboot/bootimg_utils.cpp
@@ -111,7 +113,10 @@
@@ -116,7 +108,10 @@
core/fastboot/vendor_boot_img_utils.cpp
core/fastboot/util.cpp)

Expand All @@ -180,7 +200,7 @@
list(APPEND fastboot_SOURCES
core/fastboot/usb_osx.cpp)
else()
@@ -125,13 +130,24 @@
@@ -130,13 +125,24 @@
extras/ext4_utils/include extras/f2fs_utils
core/libziparchive/include mkbootimg/include/bootimg
core/fs_mgr/liblp/include core/fs_mgr/libstorage_literals avb)
Expand Down
24 changes: 22 additions & 2 deletions mingw-w64-android-tools/0002-android-tools-vendor.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// fiat_curve25519_adx_mul is defined in
--- a/vendor/boringssl/include/openssl/target.h
+++ b/vendor/boringssl/include/openssl/target.h
@@ -66,8 +66,13 @@
@@ -78,8 +78,13 @@
#define OPENSSL_APPLE
#endif

Expand All @@ -24,7 +24,27 @@
+#undef X509_NAME
#endif

// Trusty and Android baremetal aren't't Linux but currently define __linux__.
// Trusty and Android baremetal aren't Linux but currently define __linux__.
--- a/vendor/boringssl/third_party/fiat/p256_64.h
+++ b/vendor/boringssl/third_party/fiat/p256_64.h
@@ -172,7 +172,7 @@
*
*/
static FIAT_P256_FIAT_INLINE void fiat_p256_mul(fiat_p256_montgomery_domain_field_element out1, const fiat_p256_montgomery_domain_field_element arg1, const fiat_p256_montgomery_domain_field_element arg2) {
-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__)
+#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(OPENSSL_WINDOWS)
if (CRYPTO_is_BMI1_capable() && CRYPTO_is_BMI2_capable() &&
CRYPTO_is_ADX_capable()) {
fiat_p256_adx_mul(out1, arg1, arg2);
@@ -486,7 +486,7 @@
*
*/
static FIAT_P256_FIAT_INLINE void fiat_p256_square(fiat_p256_montgomery_domain_field_element out1, const fiat_p256_montgomery_domain_field_element arg1) {
-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__)
+#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(OPENSSL_WINDOWS)
if (CRYPTO_is_BMI1_capable() && CRYPTO_is_BMI2_capable() &&
CRYPTO_is_ADX_capable()) {
fiat_p256_adx_sqr(out1, arg1);
--- a/vendor/libziparchive/zip_cd_entry_map.h
+++ b/vendor/libziparchive/zip_cd_entry_map.h
@@ -90,7 +90,7 @@
Expand Down

This file was deleted.

21 changes: 9 additions & 12 deletions mingw-w64-android-tools/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_realname=android-tools
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=34.0.5
pkgver=35.0.1
_tag=${pkgver}
pkgrel=1
pkgdesc='Android platform tools (mingw-w64)'
Expand All @@ -29,17 +29,15 @@ source=("https://github.com/nmeum/android-tools/releases/download/${_tag}/${_rea
"AdbWinApi.def"
"0001-android-tools-cmake.patch"
"0002-android-tools-vendor.patch"
"0003-fix-building-with-gcc-mingw.patch"
"0004-fix-SetThreadDescription-name-collision.patch")
"0003-fix-building-with-gcc-mingw.patch")
noextract=("${_realname}-${_tag}.tar.xz")
sha256sums=('fb09cff12cfb82acf42a8ebebbc0342671bfcd02117716368bdc73fdda60304a'
'09f3774363bf710b9cdb902f4a722b424fd4d476f8fa3ada853d140300f57cf4'
'3e73291850b9c7f60ae65b5101666880d08a96f043666b9bcabccda9a37513d7'
sha256sums=('654030c7f96d25d7224cd6861fac14a043cf1d3980f40288cdfbe219f94ffaf9'
'd3e73acccaa8bf9210cca264c314076f456d47f2f011f298c66e0962523fb73c'
'7f399058428d1a9386de95b28518d299159ab121bb7cb2eb420bd10a3c0e2e5e'
'e6fc31c148e120fc69be53e0464434c492ab0eaa0dbc8f18dd3c19eb2dd2577b'
'ac0d83631f3f12438d374f80757b1699c00317d45c5a025da2d6ec89bb81e253'
'181432d376b0448dac2d24b49ce34cdb6eed188826e61bd5706e53d5411c57b5'
'528e7a2dbf366832d6ae339e013de7c311efb7fa9139ce3478bc18fe29b0542d'
'2fe4ceec9d73cea98a37ae7b6844a1c1abbb7bf14cb696f4e14b632fea33aa3c')
'72460a77aaac6d630da0d959c8e614ec6953cce9e3468bf96431225cb4c8617b'
'c167119777d8d1750f3988e68453b6a0d91e015242e57698824d04304fb4ace1'
'528e7a2dbf366832d6ae339e013de7c311efb7fa9139ce3478bc18fe29b0542d')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
Expand All @@ -60,8 +58,7 @@ prepare() {
apply_patch_with_msg \
0001-android-tools-cmake.patch \
0002-android-tools-vendor.patch \
0003-fix-building-with-gcc-mingw.patch \
0004-fix-SetThreadDescription-name-collision.patch
0003-fix-building-with-gcc-mingw.patch
}

build() {
Expand Down

0 comments on commit 398882b

Please sign in to comment.