Skip to content

Commit

Permalink
Upgrade to platform-tools-35.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 committed Aug 11, 2024
1 parent 2ad61df commit 1429993
Show file tree
Hide file tree
Showing 25 changed files with 119 additions and 62 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ set(ANDROID_MKE2FS_NAME "mke2fs.android")

# Version of android-tools and the version of boringssl being used.
# See: https://android.googlesource.com/platform/external/boringssl/+/platform-tools-${ANDROID_VERSION}/BORINGSSL_REVISION
set(ANDROID_VERSION 35.0.1)
set(BORINGSSL_VERSION 538b2a6cf0497cf8bb61ae726a484a3d7a34e54e)
set(ANDROID_VERSION 35.0.2)
set(BORINGSSL_VERSION 9cffd74fdb65c69506a0ce1b19420a67ad0cb19e)

# Vendor string used in version outputs.
set(ANDROID_VENDOR android-tools)
Expand Down
2 changes: 1 addition & 1 deletion patches/adb/0002-adb-disable-mdns-transport-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ index 4fa58faf..c14b3463 100644
- }
-
if (!getenv("ADB_USB") || strcmp(getenv("ADB_USB"), "0") != 0) {
if (should_use_libusb()) {
if (is_libusb_enabled()) {
libusb::usb_init();
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ diff --git a/sysdeps.h b/sysdeps.h
index 5ba85b4d..2115a32b 100644
--- a/sysdeps.h
+++ b/sysdeps.h
@@ -49,6 +49,12 @@ static inline void* mempcpy(void* dst, const void* src, size_t n) {
}
#endif
@@ -55,6 +55,12 @@ static inline void* mempcpy(void* dst, const void* src, size_t n) {

std::optional<ssize_t> network_peek(borrowed_fd fd);

+// Clang-only nullability specifiers
+#ifndef __clang__
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From bfd129ad4c023ffec8a16c1dbd8f1efebd68ff7b Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai@gmail.com>
Date: Sat, 10 Aug 2024 20:24:00 +0000
Subject: [PATCH] adb: Fix unknown __xx_write member in std::ostream

This fixes the following compiler error.

sysdeps.h:559:17: error: 'std::ostream` {aka 'class std::basic_ostream<char>`} has no member named '___xxx_write`
559 | #define write ___xxx_write
| ^~~~~~~~~~~~
---
sysdeps.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/sysdeps.h b/sysdeps.h
index e87501c..af548c5 100644
--- a/sysdeps.h
+++ b/sysdeps.h
@@ -555,8 +555,10 @@ static inline int adb_pwrite(int fd, const void* buf, size_t len, off64_t offset
#endif
}

+#ifdef write
#undef write
#define write ___xxx_write
+#endif
#undef pwrite
#define pwrite ___xxx_pwrite

25 changes: 25 additions & 0 deletions patches/adb/0008-adb-Disable-bonjour-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From bedc0c38148add6841832f0815fb589c78cc16f7 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai@gmail.com>
Date: Sun, 11 Aug 2024 04:47:21 +0000
Subject: [PATCH] adb: Disable bonjour check

---
adb.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/adb.cpp b/adb.cpp
index 225ddaf..1be30eb 100644
--- a/adb.cpp
+++ b/adb.cpp
@@ -1319,7 +1319,7 @@ HostRequestResult handle_host_request(std::string_view service, TransportType ty
}
status.set_usb_backend_forced(getenv("ADB_LIBUSB") != nullptr);

- if (using_bonjour()) {
+ if (false) {
status.set_mdns_backend(adb::proto::AdbServerStatus::BONJOUR);
} else {
status.set_mdns_backend(adb::proto::AdbServerStatus::OPENSCREEN);
--
2.46.0

6 changes: 3 additions & 3 deletions patches/adb/0013-adb-disable-fastdeploy-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ index 97debae1..35278e2f 100644
auto metadata = extract_metadata(apk_file[0]);
if (metadata.has_value()) {
auto patchFd = apply_patch_on_device(apk_dest.c_str());
@@ -290,6 +295,9 @@ static int install_app_legacy(int argc, const char** argv, bool use_fastdeploy)
@@ -285,6 +285,9 @@ static int install_app_legacy(int argc, const char** argv, bool use_fastdeploy)

return status;
}
Expand All @@ -53,8 +53,8 @@ index 97debae1..35278e2f 100644
+#endif
}

if (do_sync_push(apk_file, apk_dest.c_str(), false, CompressionType::Any, false)) {
@@ -499,6 +507,7 @@ int install_app(int argc, const char** argv) {
if (do_sync_push(apk_file, apk_dest.c_str(), false, CompressionType::Any, false, false)) {
@@ -494,6 +497,7 @@ int install_app(int argc, const char** argv) {
error_exit("Attempting to use streaming install on unsupported device");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,12 @@ diff --git a/libcutils/include/private/fs_config.h b/libcutils/include/private/f
index 45f46e5..b4ceade 100644
--- a/libcutils/include/private/fs_config.h
+++ b/libcutils/include/private/fs_config.h
@@ -22,13 +22,14 @@
#pragma once

@@ -24,14 +24,15 @@
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
-#include <sys/cdefs.h>
#include <unistd.h>

#include <linux/capability.h>

Expand All @@ -376,11 +377,11 @@ index 45f46e5..b4ceade 100644
+extern "C" {
+#endif

/*
* Used in:
@@ -43,4 +44,6 @@ __BEGIN_DECLS
/* This API is deprecated. New users should call get_fs_config. */
void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid,
unsigned* mode, uint64_t* capabilities);
@@ -56,4 +57,6 @@ struct fs_config {
bool get_fs_config(const char* path, bool dir, const char* target_out_path,
struct fs_config* conf);

-__END_DECLS
+#ifdef __cplusplus
Expand Down Expand Up @@ -463,18 +464,6 @@ index e89cb54..86b6604 100644
+#ifdef __cplusplus
+}
+#endif
diff --git a/libprocessgroup/cgroup_map.h b/libprocessgroup/cgroup_map.h
index 5cdf8b2..322d4c4 100644
--- a/libprocessgroup/cgroup_map.h
+++ b/libprocessgroup/cgroup_map.h
@@ -16,7 +16,6 @@

#pragma once

-#include <sys/cdefs.h>
#include <sys/types.h>

#include <map>
diff --git a/libprocessgroup/cgrouprc/include/android/cgrouprc.h b/libprocessgroup/cgrouprc/include/android/cgrouprc.h
index e704a36..e65aa4a 100644
--- a/libprocessgroup/cgrouprc/include/android/cgrouprc.h
Expand Down Expand Up @@ -554,18 +543,6 @@ index dbaeb93..0cc119c 100644
+#ifdef __cplusplus
+}
+#endif
diff --git a/libprocessgroup/task_profiles.h b/libprocessgroup/task_profiles.h
index 4663f64..bbba033 100644
--- a/libprocessgroup/task_profiles.h
+++ b/libprocessgroup/task_profiles.h
@@ -16,7 +16,6 @@

#pragma once

-#include <sys/cdefs.h>
#include <sys/types.h>
#include <functional>
#include <map>
diff --git a/libstats/push_compat/statsd_writer.h b/libstats/push_compat/statsd_writer.h
index f030b96..ffd38ea 100644
--- a/libstats/push_compat/statsd_writer.h
Expand Down Expand Up @@ -790,6 +767,31 @@ index c77d9ff..00bd562 100644

}

diff --git a/libvendorsupport/include/vendorsupport/api_level.h b/libvendorsupport/include/vendorsupport/api_level.h
index 3427bc6..080389d 100644
--- a/libvendorsupport/include/vendorsupport/api_level.h
+++ b/libvendorsupport/include/vendorsupport/api_level.h
@@ -14,9 +14,10 @@

#pragma once

-#include <sys/cdefs.h>

-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif

#define __ANDROID_VENDOR_API_MAX__ 1000000
#define __INVALID_API_LEVEL -1
@@ -62,4 +63,6 @@ int AVendorSupport_getSdkApiLevelOf(int vendorApiLevel);
int AVendorSupport_getVendorApiLevel();
#endif // __ANDROID_VENDOR__

-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
diff --git a/llkd/include/llkd.h b/llkd/include/llkd.h
index 0822a3e..a4e3037 100644
--- a/llkd/include/llkd.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ index 3a042e7..62d651d 100644
+#if GOOGLE_PROTOBUF_VERSION < 3016000
+ return MakeError<std::string>(status.error_message().as_string());
+#elif GOOGLE_PROTOBUF_VERSION < 4022000
return MakeError<std::string>(status.message().as_string());
+ return MakeError<std::string>(status.message().as_string());
+#else
+ return MakeError<std::string>(std::string(status.message()));
return MakeError<std::string>(std::string(status.message()));
+#endif
}
return ErrorOr<std::string>(std::move(json));
Expand All @@ -33,9 +33,9 @@ index 3a042e7..62d651d 100644
+#if GOOGLE_PROTOBUF_VERSION < 3016000
+ return MakeError<std::monostate>(status.error_message().as_string());
+#elif GOOGLE_PROTOBUF_VERSION < 4022000
return MakeError<std::monostate>(status.message().as_string());
+ return MakeError<std::monostate>(status.message().as_string());
+#else
+ return MakeError<std::monostate>(std::string(status.message()));
return MakeError<std::monostate>(std::string(status.message()));
+#endif
}
if (!message->ParseFromString(binary)) {
Expand Down
6 changes: 3 additions & 3 deletions vendor/CMakeLists.adb.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
protobuf_generate_cpp(ADB_APP_PROCESSES_PROTO_SRCS ADB_APP_PROCESSES_PROTO_HDRS
adb/proto/app_processes.proto)
protobuf_generate_cpp(ADB_DEVCIES_PROTO_SRCS ADB_DEVICES_PROTO_HDRS
adb/proto/devices.proto)
protobuf_generate_cpp(ADB_HOST_PROTO_SRCS ADB_HOST_PROTO_HDRS
adb/proto/adb_host.proto)
protobuf_generate_cpp(ADB_KEY_TYPE_PROTO_SRCS ADB_KEY_TYPE_PROTO_HDRS
adb/proto/key_type.proto)
protobuf_generate_cpp(ADB_KNOWN_HOSTS_PROTO_SRCS ADB_KNOWN_HOSTS_PROTO_HDRS
Expand Down Expand Up @@ -35,7 +35,7 @@ set(libadb_SOURCES
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_HOST_PROTO_SRCS} ${ADB_HOST_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})
Expand Down
1 change: 1 addition & 0 deletions vendor/CMakeLists.libbase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_library(libbase STATIC
libbase/posix_strerror_r.cpp
libbase/process.cpp
libbase/properties.cpp
libbase/result.cpp
libbase/stringprintf.cpp
libbase/strings.cpp
libbase/threads.cpp
Expand Down
2 changes: 1 addition & 1 deletion vendor/adb
Submodule adb updated from 3f0d72 to ce9ea5
2 changes: 1 addition & 1 deletion vendor/avb
Submodule avb updated from 20e8b4 to 6eedb1
2 changes: 1 addition & 1 deletion vendor/boringssl
Submodule boringssl updated from 538b2a to 9cffd7
2 changes: 1 addition & 1 deletion vendor/core
Submodule core updated from db5a18 to 90e490
2 changes: 1 addition & 1 deletion vendor/e2fsprogs
Submodule e2fsprogs updated from 028d97 to 81357d
2 changes: 1 addition & 1 deletion vendor/extras
Submodule extras updated from f5a14a to d8e488
2 changes: 1 addition & 1 deletion vendor/f2fs-tools
Submodule f2fs-tools updated from e20d15 to f49d42
2 changes: 1 addition & 1 deletion vendor/fmtlib
Submodule fmtlib updated from d41939 to c230d4
2 changes: 1 addition & 1 deletion vendor/libbase
Submodule libbase updated from b24357 to 328768
2 changes: 1 addition & 1 deletion vendor/libufdt
Submodule libufdt updated from 47c558 to 4ff186
2 changes: 1 addition & 1 deletion vendor/libusb
Submodule libusb updated from c96048 to ab84e0
2 changes: 1 addition & 1 deletion vendor/libziparchive
Submodule libziparchive updated from 94c11c to b1d0c4
2 changes: 1 addition & 1 deletion vendor/logging
Submodule logging updated from 90fafc to 153a15
2 changes: 1 addition & 1 deletion vendor/mkbootimg
Submodule mkbootimg updated from 8c48c3 to cbf4ce
2 changes: 1 addition & 1 deletion vendor/selinux
Submodule selinux updated from 2af768 to 0496d8

0 comments on commit 1429993

Please sign in to comment.