Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android-tools: bump revision #7806

Closed
wants to merge 1 commit into from
Closed

android-tools: bump revision #7806

wants to merge 1 commit into from

Conversation

Grimler91
Copy link
Member

Test build with ndk r23

@finagolfin
Copy link
Member

@ian4hu, any luck with getting this working with NDK 23?

@ian4hu
Copy link
Contributor

ian4hu commented Oct 27, 2021

working

I am looking at this.

@ian4hu
Copy link
Contributor

ian4hu commented Oct 28, 2021

It seems that the ndk r23 enable some compiler assertion for api level. I even can not build the old version 31.0.0p1 for android-tools with ndk r23.

The macro __INTRODUCED_IN(__api_level) stop the compiler to compile with non-expected api level now.

with android-tools@31.0.2 by ndk r23

[72/635] Building CXX object vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o
FAILED: vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o
/home/builder/.termux-build/_cache/android-r23b-api-24-v0/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/home/builder/.termux-build/_cache/android-r23b-api-24-v0 --sysroot=/home/builder/.termux-build/_cache/android-r23b-api-24-v0/sysroot  -I/home/builder/.termux-build/android-tools/build/vendor -I/home/builder/.termux-build/android-tools/src/vendor/libbase/include -I/home/builder/.termux-build/android-tools/src/vendor/core/include -I/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include -fstack-protector-strong -Oz --target=aarch64-linux-android24  -I/data/data/com.termux/files/usr/include -std=gnu++2a -Wno-attributes -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -fPIC -MD -MT vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o -MF vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o.d -o vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o -c /home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:219:5: error: '__android_log_set_default_tag' is unavailable: introduced in Android 30
    __android_log_set_default_tag(tag.c_str());
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:371:6: note: '__android_log_set_default_tag' has been explicitly marked unavailable here
void __android_log_set_default_tag(const char* tag) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:242:7: warning: array designators are a C99 extension [-Wc99-designator]
      [android::base::VERBOSE] = 7,              // KERN_DEBUG (there is no verbose kernel log
      ^~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:326:5: error: '__android_log_logd_logger' is unavailable: introduced in Android 30
    __android_log_logd_logger(&log_message);
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:254:6: note: '__android_log_logd_logger' has been explicitly marked unavailable here
void __android_log_logd_logger(const struct __android_log_message* log_message) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:406:5: error: '__android_log_set_logger' is unavailable: introduced in Android 30
    __android_log_set_logger([](const struct __android_log_message* log_message) {
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:244:6: note: '__android_log_set_logger' has been explicitly marked unavailable here
void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:422:5: error: '__android_log_set_aborter' is unavailable: introduced in Android 30
    __android_log_set_aborter([](const char* abort_message) { Aborter()(abort_message); });
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:276:6: note: '__android_log_set_aborter' has been explicitly marked unavailable here
void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:510:7: error: '__android_log_call_aborter' is unavailable: introduced in Android 30
      __android_log_call_aborter(msg.c_str());
      ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:287:6: note: '__android_log_call_aborter' has been explicitly marked unavailable here
void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:527:5: error: '__android_log_write_log_message' is unavailable: introduced in Android 30
    __android_log_write_log_message(&log_message);
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:232:6: note: '__android_log_write_log_message' has been explicitly marked unavailable here
void __android_log_write_log_message(struct __android_log_message* log_message) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:544:34: error: '__android_log_get_minimum_priority' is unavailable: introduced in Android 30
    return PriorityToLogSeverity(__android_log_get_minimum_priority());
                                 ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:360:9: note: '__android_log_get_minimum_priority' has been explicitly marked unavailable here
int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(30);
        ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:556:12: error: '__android_log_is_loggable' is unavailable: introduced in Android 30
    return __android_log_is_loggable(priority, tag, ANDROID_LOG_INFO);
           ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:317:5: note: '__android_log_is_loggable' has been explicitly marked unavailable here
int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INTRODUCED_IN(30);
    ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:565:34: error: '__android_log_set_minimum_priority' is unavailable: introduced in Android 30
    return PriorityToLogSeverity(__android_log_set_minimum_priority(priority));
                                 ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:349:9: note: '__android_log_set_minimum_priority' has been explicitly marked unavailable here
int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(30);
        ^
1 warning and 9 errors generated.
[75/635] Building CXX object vendor/CMakeFiles/libbase.dir/libbase/properties.cpp.o
ninja: build stopped: subcommand failed.

with android-tools@31.0.0p1 by ndk r23

[72/630] Building CXX object vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o
FAILED: vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o
/home/builder/.termux-build/_cache/android-r23b-api-24-v0/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/home/builder/.termux-build/_cache/android-r23b-api-24-v0 --sysroot=/home/builder/.termux-build/_cache/android-r23b-api-24-v0/sysroot  -I/home/builder/.termux-build/android-tools/build/vendor -I/home/builder/.termux-build/android-tools/src/vendor/libbase/include -I/home/builder/.termux-build/android-tools/src/vendor/core/include -I/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include -fstack-protector-strong -Oz --target=aarch64-linux-android24  -I/data/data/com.termux/files/usr/include -std=gnu++2a -Wno-attributes -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -fPIC -MD -MT vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o -MF vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o.d -o vendor/CMakeFiles/libbase.dir/libbase/logging.cpp.o -c /home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:223:5: error: '__android_log_set_default_tag' is unavailable: introduced in Android 30
    __android_log_set_default_tag(tag.c_str());
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:371:6: note: '__android_log_set_default_tag' has been explicitly marked unavailable here
void __android_log_set_default_tag(const char* tag) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:246:7: warning: array designators are a C99 extension [-Wc99-designator]
      [android::base::VERBOSE] = 7,              // KERN_DEBUG (there is no verbose kernel log
      ^~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:328:5: error: '__android_log_logd_logger' is unavailable: introduced in Android 30
    __android_log_logd_logger(&log_message);
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:254:6: note: '__android_log_logd_logger' has been explicitly marked unavailable here
void __android_log_logd_logger(const struct __android_log_message* log_message) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:408:5: error: '__android_log_set_logger' is unavailable: introduced in Android 30
    __android_log_set_logger([](const struct __android_log_message* log_message) {
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:244:6: note: '__android_log_set_logger' has been explicitly marked unavailable here
void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:424:5: error: '__android_log_set_aborter' is unavailable: introduced in Android 30
    __android_log_set_aborter([](const char* abort_message) { Aborter()(abort_message); });
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:276:6: note: '__android_log_set_aborter' has been explicitly marked unavailable here
void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:512:7: error: '__android_log_call_aborter' is unavailable: introduced in Android 30
      __android_log_call_aborter(msg.c_str());
      ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:287:6: note: '__android_log_call_aborter' has been explicitly marked unavailable here
void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:529:5: error: '__android_log_write_log_message' is unavailable: introduced in Android 30
    __android_log_write_log_message(&log_message);
    ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:232:6: note: '__android_log_write_log_message' has been explicitly marked unavailable here
void __android_log_write_log_message(struct __android_log_message* log_message) __INTRODUCED_IN(30);
     ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:546:34: error: '__android_log_get_minimum_priority' is unavailable: introduced in Android 30
    return PriorityToLogSeverity(__android_log_get_minimum_priority());
                                 ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:360:9: note: '__android_log_get_minimum_priority' has been explicitly marked unavailable here
int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(30);
        ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:558:12: error: '__android_log_is_loggable' is unavailable: introduced in Android 30
    return __android_log_is_loggable(priority, tag, ANDROID_LOG_INFO);
           ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:317:5: note: '__android_log_is_loggable' has been explicitly marked unavailable here
int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INTRODUCED_IN(30);
    ^
/home/builder/.termux-build/android-tools/src/vendor/libbase/logging.cpp:567:34: error: '__android_log_set_minimum_priority' is unavailable: introduced in Android 30
    return PriorityToLogSeverity(__android_log_set_minimum_priority(priority));
                                 ^
/home/builder/.termux-build/android-tools/src/vendor/logging/liblog/include/android/log.h:349:9: note: '__android_log_set_minimum_priority' has been explicitly marked unavailable here
int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(30);
        ^
1 warning and 9 errors generated.
[75/630] Building CXX object vendor/CMakeFiles/libbase.dir/libbase/properties.cpp.o
ninja: build stopped: subcommand failed.

I am trying to rebuild it with ndk r21 to find the difference .

@finagolfin
Copy link
Member

Yes, it got harder because of that change. I mentioned it a couple weeks ago.

@ian4hu
Copy link
Contributor

ian4hu commented Oct 29, 2021

@ian4hu, any luck with getting this working with NDK 23?

Now I am trying downgrade the required API level 30 to 24, but the output deb package installed on device cause Segmentation Fault for adb. I am still working on it.

Copy link
Contributor

@ian4hu ian4hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Grimler91 I just fixed the segfault with the fix-ndk.patch updated as fix-ndk.patch

Notice: the patch file code line L408-L409 is the segfault fix and I am not a C++ expert and dont known why but it actually fixed the segment fault.

-static std::map<std::string, std::string>& g_properties = *new std::map<std::string, std::string>;
+static std::map<std::string, std::string> g_properties;

Without that change, the adb and fastboot will segfault, and not work.

@ian4hu
Copy link
Contributor

ian4hu commented Oct 29, 2021

Also, @buttaface @thunder-coding Please take a review at the fix-ndk.patch update.

https://gist.github.com/ian4hu/1b4e030bc40be19b57f352b70ba0ce39#file-fix-ndk-patch

Patch to the fix-ndk.patch is

Index: packages/android-tools/fix-ndk.patch
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/android-tools/fix-ndk.patch b/packages/android-tools/fix-ndk.patch
--- a/packages/android-tools/fix-ndk.patch	(revision 1a6eac1d8578fc3a36454f0211b983959b3ea81e)
+++ b/packages/android-tools/fix-ndk.patch	(date 1635487135055)
@@ -1,7 +1,220 @@
-diff -uNr android-tools-31.0.2/vendor/adb/sysdeps.h android-tools-31.0.2.mod/vendor/adb/sysdeps.h
---- android-tools-31.0.2/vendor/adb/sysdeps.h	2021-07-20 11:13:01.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/adb/sysdeps.h	2021-10-08 09:55:05.170121003 +0000
-@@ -514,7 +514,11 @@
+diff --git a/vendor/CMakeLists.adb.txt b/vendor/CMakeLists.adb.txt
+index 2b6d8f0..ee55949 100644
+--- a/vendor/CMakeLists.adb.txt
++++ b/vendor/CMakeLists.adb.txt
+@@ -192,7 +192,6 @@ target_link_libraries(adb
+ 	brotlidec
+ 	brotlienc
+ 	lz4
+-	pthread
+ 	usb-1.0
+ 	z
+ 	zstd)
+diff --git a/vendor/CMakeLists.fastboot.txt b/vendor/CMakeLists.fastboot.txt
+index 1d43937..189d91b 100644
+--- a/vendor/CMakeLists.fastboot.txt
++++ b/vendor/CMakeLists.fastboot.txt
+@@ -135,4 +135,4 @@ target_compile_definitions(fastboot PRIVATE
+ target_link_libraries(fastboot
+ 	libsparse libzip libcutils liblog libfsmgr libutil
+ 	libbase libext4 libselinux libsepol libdiagnoseusb crypto
+-	z pcre2-8 pthread dl)
++	z pcre2-8 dl)
+diff --git a/vendor/CMakeLists.mke2fs.txt b/vendor/CMakeLists.mke2fs.txt
+index a8f89fd..d1cae40 100644
+--- a/vendor/CMakeLists.mke2fs.txt
++++ b/vendor/CMakeLists.mke2fs.txt
+@@ -112,6 +112,6 @@ add_executable("${ANDROID_MKE2FS_NAME}"
+ 	e2fsprogs/misc/util.c)
+ 
+ target_link_libraries("${ANDROID_MKE2FS_NAME}"
+-	libext2fs libsparse libbase libzip liblog libutil pthread z)
++	libext2fs libsparse libbase libzip liblog libutil z)
+ target_include_directories("${ANDROID_MKE2FS_NAME}" PRIVATE
+ 	e2fsprogs/lib)
+diff --git a/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h b/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h
+index 83f40a9..9804b76 100644
+--- a/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h
++++ b/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h
+@@ -53,7 +53,7 @@ typedef struct PairingAuthCtx PairingAuthCtx;
+  * @return a new PairingAuthCtx server instance. Caller is responsible for
+  *         destroying the context via #pairing_auth_destroy.
+  */
+-PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(30);
++PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(24);
+ 
+ /**
+  * Creates a new PairingAuthCtx instance as the client.
+@@ -64,14 +64,14 @@ PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRO
+  * @return a new PairingAuthCtx client instance. Caller is responsible for
+  *         destroying the context via #pairing_auth_destroy.
+  */
+-PairingAuthCtx* pairing_auth_client_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(30);
++PairingAuthCtx* pairing_auth_client_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(24);
+ 
+ /**
+  * Destroys the PairingAuthCtx.
+  *
+  * @param ctx the PairingAuthCtx instance to destroy. Will abort if null.
+  */
+-void pairing_auth_destroy(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
++void pairing_auth_destroy(PairingAuthCtx* ctx) __INTRODUCED_IN(24);
+ 
+ /**
+  * Returns the exact size of the SPAKE2 msg.
+@@ -82,7 +82,7 @@ void pairing_auth_destroy(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
+  * @param ctx the PairingAuthCtx instance. Will abort if null.
+  * @return the size of the SPAKE2 message in bytes. This is guaranteed to be > 0.
+  */
+-size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
++size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(24);
+ 
+ /**
+  * Writes the SPAKE2 message to exchange with the other party to |out_buf|.
+@@ -96,7 +96,7 @@ size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
+  *                be have at least #pairing_auth_msg_size size. Will abort if
+  *                out_buf is null.
+  */
+-void pairing_auth_get_spake2_msg(PairingAuthCtx* ctx, uint8_t* out_buf) __INTRODUCED_IN(30);
++void pairing_auth_get_spake2_msg(PairingAuthCtx* ctx, uint8_t* out_buf) __INTRODUCED_IN(24);
+ 
+ /**
+  * Processes the peer's |their_msg| and attempts to initialize the cipher for
+@@ -117,7 +117,7 @@ void pairing_auth_get_spake2_msg(PairingAuthCtx* ctx, uint8_t* out_buf) __INTROD
+  *         for more details on the SPAKE2 protocol.
+  */
+ bool pairing_auth_init_cipher(PairingAuthCtx* ctx, const uint8_t* their_msg, size_t msg_len)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ /**
+  * Returns a safe buffer size for encrypting data of a certain size.
+@@ -130,7 +130,7 @@ bool pairing_auth_init_cipher(PairingAuthCtx* ctx, const uint8_t* their_msg, siz
+  * @return the minimum buffer size, in bytes, to hold an encrypted message of size len. See
+  * #pairing_auth_encrypt for usage.
+  */
+-size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRODUCED_IN(30);
++size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRODUCED_IN(24);
+ 
+ /**
+  * Encrypts input data and writes the encrypted data into a user-provided buffer.
+@@ -147,7 +147,7 @@ size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRO
+  *         otherwise.
+  */
+ bool pairing_auth_encrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inlen, uint8_t* outbuf,
+-                          size_t* outlen) __INTRODUCED_IN(30);
++                          size_t* outlen) __INTRODUCED_IN(24);
+ 
+ /**
+  * Returns a safe buffer size for decrypting data of a certain size.
+@@ -162,7 +162,7 @@ bool pairing_auth_encrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inle
+  *         #pairing_auth_decrypt for usage.
+  */
+ size_t pairing_auth_safe_decrypted_size(PairingAuthCtx* ctx, const uint8_t* buf, size_t len)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ /**
+  * Decrypts input data and writes the decrypted data into a user-provided buffer.
+@@ -180,7 +180,7 @@ size_t pairing_auth_safe_decrypted_size(PairingAuthCtx* ctx, const uint8_t* buf,
+  *         otherwise.
+  */
+ bool pairing_auth_decrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inlen, uint8_t* outbuf,
+-                          size_t* outlen) __INTRODUCED_IN(30);
++                          size_t* outlen) __INTRODUCED_IN(24);
+ 
+ #ifdef __cplusplus
+ }
+diff --git a/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h b/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h
+index 8e63db7..f158015 100644
+--- a/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h
++++ b/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h
+@@ -79,7 +79,7 @@ typedef void (*pairing_result_cb)(const PeerInfo*, int, void*);
+ //         invoked. Otherwise, cb is guaranteed to be invoked, even if you
+ //         destroy the ctx while in the pairing process.
+ bool pairing_connection_start(PairingConnectionCtx* ctx, int fd, pairing_result_cb cb, void* opaque)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ // Creates a new PairingConnectionCtx instance as the client.
+ //
+@@ -98,7 +98,7 @@ PairingConnectionCtx* pairing_connection_client_new(const uint8_t* pswd, size_t
+                                                     const PeerInfo* peer_info,
+                                                     const uint8_t* x509_cert_pem, size_t x509_size,
+                                                     const uint8_t* priv_key_pem, size_t priv_size)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ // Creates a new PairingConnectionCtx instance as the server.
+ //
+@@ -117,14 +117,14 @@ PairingConnectionCtx* pairing_connection_server_new(const uint8_t* pswd, size_t
+                                                     const PeerInfo* peer_info,
+                                                     const uint8_t* x509_cert_pem, size_t x509_size,
+                                                     const uint8_t* priv_key_pem, size_t priv_size)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ // Destroys the PairingConnectionCtx instance.
+ //
+ // It is safe to destroy the instance at any point in the pairing process.
+ //
+ // @param ctx the PairingConnectionCtx instance to destroy. Will abort if null.
+-void pairing_connection_destroy(PairingConnectionCtx* ctx) __INTRODUCED_IN(30);
++void pairing_connection_destroy(PairingConnectionCtx* ctx) __INTRODUCED_IN(24);
+ 
+ #ifdef __cplusplus
+ }
+diff --git a/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h b/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h
+index babff94..93dcf9a 100644
+--- a/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h
++++ b/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h
+@@ -45,7 +45,7 @@ typedef struct PairingServerCtx PairingServerCtx;
+ // Callback containing the result of the pairing. If #PeerInfo is null,
+ // then the pairing failed. Otherwise, pairing succeeded and #PeerInfo
+ // contains information about the peer.
+-typedef void (*pairing_server_result_cb)(const PeerInfo*, void*) __INTRODUCED_IN(30);
++typedef void (*pairing_server_result_cb)(const PeerInfo*, void*) __INTRODUCED_IN(24);
+ 
+ // Starts the pairing server.
+ //
+@@ -61,7 +61,7 @@ typedef void (*pairing_server_result_cb)(const PeerInfo*, void*) __INTRODUCED_IN
+ // @param opaque the opaque userdata.
+ // @return the port number the server is listening on. Returns 0 on failure.
+ uint16_t pairing_server_start(PairingServerCtx* ctx, pairing_server_result_cb cb, void* opaque)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ // Creates a new PairingServerCtx instance.
+ //
+@@ -83,7 +83,7 @@ uint16_t pairing_server_start(PairingServerCtx* ctx, pairing_server_result_cb cb
+ PairingServerCtx* pairing_server_new(const uint8_t* pswd, size_t pswd_len,
+                                      const PeerInfo* peer_info, const uint8_t* x509_cert_pem,
+                                      size_t x509_size, const uint8_t* priv_key_pem,
+-                                     size_t priv_size, uint16_t port) __INTRODUCED_IN(30);
++                                     size_t priv_size, uint16_t port) __INTRODUCED_IN(24);
+ 
+ // Same as #pairing_server_new, except that the x509 certificate and private key
+ // is generated internally.
+@@ -100,12 +100,12 @@ PairingServerCtx* pairing_server_new(const uint8_t* pswd, size_t pswd_len,
+ //         for destroying the context via #pairing_server_destroy.
+ PairingServerCtx* pairing_server_new_no_cert(const uint8_t* pswd, size_t pswd_len,
+                                              const PeerInfo* peer_info, uint16_t port)
+-        __INTRODUCED_IN(30);
++        __INTRODUCED_IN(24);
+ 
+ // Destroys the PairingServerCtx instance.
+ //
+ // @param ctx the PairingServerCtx instance to destroy.
+-void pairing_server_destroy(PairingServerCtx* ctx) __INTRODUCED_IN(30);
++void pairing_server_destroy(PairingServerCtx* ctx) __INTRODUCED_IN(24);
+ 
+ #ifdef __cplusplus
+ }
+diff --git a/vendor/adb/sysdeps.h b/vendor/adb/sysdeps.h
+index 316afe7..8d5da69 100644
+--- a/vendor/adb/sysdeps.h
++++ b/vendor/adb/sysdeps.h
+@@ -514,7 +514,11 @@ static inline int adb_gethostname(char* name, size_t len) {
  }
  
  static inline int adb_getlogin_r(char* buf, size_t bufsize) {
@@ -14,9 +227,10 @@
  }
  
  static inline int adb_read(borrowed_fd fd, void* buf, size_t len) {
-diff -uNr android-tools-31.0.2/vendor/base/libs/androidfw/ResourceTypes.cpp android-tools-31.0.2.mod/vendor/base/libs/androidfw/ResourceTypes.cpp
---- android-tools-31.0.2/vendor/base/libs/androidfw/ResourceTypes.cpp	2021-05-28 20:48:32.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/base/libs/androidfw/ResourceTypes.cpp	2021-10-08 09:55:05.174121003 +0000
+diff --git a/vendor/base/libs/androidfw/ResourceTypes.cpp b/vendor/base/libs/androidfw/ResourceTypes.cpp
+index 2233827..bc5e9e2 100644
+--- a/vendor/base/libs/androidfw/ResourceTypes.cpp
++++ b/vendor/base/libs/androidfw/ResourceTypes.cpp
 @@ -42,7 +42,7 @@
  #include <utils/String16.h>
  #include <utils/String8.h>
@@ -26,10 +240,11 @@
  #include <binder/TextOutput.h>
  #endif
  
-diff -uNr android-tools-31.0.2/vendor/boringssl/crypto/CMakeLists.txt android-tools-31.0.2.mod/vendor/boringssl/crypto/CMakeLists.txt
---- android-tools-31.0.2/vendor/boringssl/crypto/CMakeLists.txt	2021-06-02 15:08:20.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/boringssl/crypto/CMakeLists.txt	2021-10-08 09:55:05.175121003 +0000
-@@ -167,7 +167,7 @@
+diff --git a/vendor/boringssl/crypto/CMakeLists.txt b/vendor/boringssl/crypto/CMakeLists.txt
+index cde92b5..e25871c 100644
+--- a/vendor/boringssl/crypto/CMakeLists.txt
++++ b/vendor/boringssl/crypto/CMakeLists.txt
+@@ -167,7 +167,7 @@ perlasm(test/trampoline-x86_64.${ASM_EXT} test/asm/trampoline-x86_64.pl)
  
  add_custom_command(
    OUTPUT err_data.c
@@ -38,40 +253,10 @@
    DEPENDS
    err/err_data_generate.go
    err/asn1.errordata
-diff -uNr android-tools-31.0.2/vendor/CMakeLists.adb.txt android-tools-31.0.2.mod/vendor/CMakeLists.adb.txt
---- android-tools-31.0.2/vendor/CMakeLists.adb.txt	2021-06-02 15:20:44.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/CMakeLists.adb.txt	2021-10-08 09:55:05.167121003 +0000
-@@ -192,7 +192,6 @@
- 	brotlidec
- 	brotlienc
- 	lz4
--	pthread
- 	usb-1.0
- 	z
- 	zstd)
-diff -uNr android-tools-31.0.2/vendor/CMakeLists.fastboot.txt android-tools-31.0.2.mod/vendor/CMakeLists.fastboot.txt
---- android-tools-31.0.2/vendor/CMakeLists.fastboot.txt	2021-07-15 11:17:07.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/CMakeLists.fastboot.txt	2021-10-08 09:55:05.168121003 +0000
-@@ -135,4 +135,4 @@
- target_link_libraries(fastboot
- 	libsparse libzip libcutils liblog libfsmgr libutil
- 	libbase libext4 libselinux libsepol libdiagnoseusb crypto
--	z pcre2-8 pthread dl)
-+	z pcre2-8 dl)
-diff -uNr android-tools-31.0.2/vendor/CMakeLists.mke2fs.txt android-tools-31.0.2.mod/vendor/CMakeLists.mke2fs.txt
---- android-tools-31.0.2/vendor/CMakeLists.mke2fs.txt	2021-06-02 15:20:41.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/CMakeLists.mke2fs.txt	2021-10-08 09:55:05.169121003 +0000
-@@ -112,6 +112,6 @@
- 	e2fsprogs/misc/util.c)
- 
- target_link_libraries("${ANDROID_MKE2FS_NAME}"
--	libext2fs libsparse libbase libzip liblog libutil pthread z)
-+	libext2fs libsparse libbase libzip liblog libutil z)
- target_include_directories("${ANDROID_MKE2FS_NAME}" PRIVATE
- 	e2fsprogs/lib)
-diff -uNr android-tools-31.0.2/vendor/core/fs_mgr/liblp/utility.cpp android-tools-31.0.2.mod/vendor/core/fs_mgr/liblp/utility.cpp
---- android-tools-31.0.2/vendor/core/fs_mgr/liblp/utility.cpp	2020-12-20 20:06:59.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/core/fs_mgr/liblp/utility.cpp	2021-10-08 09:55:05.176121003 +0000
+diff --git a/vendor/core/fs_mgr/liblp/utility.cpp b/vendor/core/fs_mgr/liblp/utility.cpp
+index d8e171b..31b34a5 100644
+--- a/vendor/core/fs_mgr/liblp/utility.cpp
++++ b/vendor/core/fs_mgr/liblp/utility.cpp
 @@ -34,7 +34,7 @@
  #include <ext4_utils/ext4_utils.h>
  #include <openssl/sha.h>
@@ -81,7 +266,7 @@
  #include <cutils/android_get_control_file.h>
  #endif
  
-@@ -208,7 +208,7 @@
+@@ -208,7 +208,7 @@ bool SetBlockReadonly(int fd, bool readonly) {
  }
  
  base::unique_fd GetControlFileOrOpen(std::string_view path, int flags) {
@@ -90,10 +275,11 @@
      int fd = android_get_control_file(path.data());
      if (fd >= 0) {
          int newfd = TEMP_FAILURE_RETRY(dup(fd));
-diff -uNr android-tools-31.0.2/vendor/core/init/reboot.cpp android-tools-31.0.2.mod/vendor/core/init/reboot.cpp
---- android-tools-31.0.2/vendor/core/init/reboot.cpp	2021-07-20 11:13:01.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/core/init/reboot.cpp	2021-10-08 09:55:05.177121003 +0000
-@@ -246,7 +246,7 @@
+diff --git a/vendor/core/init/reboot.cpp b/vendor/core/init/reboot.cpp
+index 464746d..dadf811 100644
+--- a/vendor/core/init/reboot.cpp
++++ b/vendor/core/init/reboot.cpp
+@@ -246,7 +246,7 @@ static bool FindPartitionsToUmount(std::vector<MountEntry>* block_dev_partitions
          if (dump) {
              LOG(INFO) << "mount entry " << mentry->mnt_fsname << ":" << mentry->mnt_dir << " opts "
                        << mentry->mnt_opts << " type " << mentry->mnt_type;
@@ -102,10 +288,11 @@
              std::string mount_dir(mentry->mnt_dir);
              // These are R/O partitions changed to R/W after adb remount.
              // Do not umount them as shutdown critical services may rely on them.
-diff -uNr android-tools-31.0.2/vendor/core/libcutils/properties.cpp android-tools-31.0.2.mod/vendor/core/libcutils/properties.cpp
---- android-tools-31.0.2/vendor/core/libcutils/properties.cpp	2020-12-20 20:06:59.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/core/libcutils/properties.cpp	2021-10-08 09:55:05.178121003 +0000
-@@ -91,7 +91,7 @@
+diff --git a/vendor/core/libcutils/properties.cpp b/vendor/core/libcutils/properties.cpp
+index 03f0496..11c4786 100644
+--- a/vendor/core/libcutils/properties.cpp
++++ b/vendor/core/libcutils/properties.cpp
+@@ -91,7 +91,7 @@ int property_get(const char* key, char* value, const char* default_value) {
      return len;
  }
  
@@ -114,10 +301,11 @@
  
  #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
  #include <sys/_system_properties.h>
-diff -uNr android-tools-31.0.2/vendor/e2fsprogs/lib/ext2fs/ismounted.c android-tools-31.0.2.mod/vendor/e2fsprogs/lib/ext2fs/ismounted.c
---- android-tools-31.0.2/vendor/e2fsprogs/lib/ext2fs/ismounted.c	2019-08-21 17:14:14.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/e2fsprogs/lib/ext2fs/ismounted.c	2021-10-08 09:55:05.178121003 +0000
-@@ -196,7 +196,7 @@
+diff --git a/vendor/e2fsprogs/lib/ext2fs/ismounted.c b/vendor/e2fsprogs/lib/ext2fs/ismounted.c
+index 6cd497d..dcdd4fd 100644
+--- a/vendor/e2fsprogs/lib/ext2fs/ismounted.c
++++ b/vendor/e2fsprogs/lib/ext2fs/ismounted.c
+@@ -196,7 +196,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
  #endif /* __GNU__ */
  	*mount_flags = EXT2_MF_MOUNTED;
  
@@ -126,10 +314,11 @@
  	/* Check to see if the ro option is set */
  	if (hasmntopt(mnt, MNTOPT_RO))
  		*mount_flags |= EXT2_MF_READONLY;
-diff -uNr android-tools-31.0.2/vendor/f2fs-tools/lib/libf2fs.c android-tools-31.0.2.mod/vendor/f2fs-tools/lib/libf2fs.c
---- android-tools-31.0.2/vendor/f2fs-tools/lib/libf2fs.c	2020-12-20 12:53:55.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/f2fs-tools/lib/libf2fs.c	2021-10-08 09:55:05.179121003 +0000
-@@ -714,7 +714,7 @@
+diff --git a/vendor/f2fs-tools/lib/libf2fs.c b/vendor/f2fs-tools/lib/libf2fs.c
+index 55fa391..cf2716c 100644
+--- a/vendor/f2fs-tools/lib/libf2fs.c
++++ b/vendor/f2fs-tools/lib/libf2fs.c
+@@ -714,7 +714,7 @@ static int is_mounted(const char *mpt, const char *device)
  
  	while ((mnt = getmntent(file)) != NULL) {
  		if (!strcmp(device, mnt->mnt_fsname)) {
@@ -138,9 +327,10 @@
  			if (hasmntopt(mnt, MNTOPT_RO))
  				c.ro = 1;
  #endif
-diff -uNr android-tools-31.0.2/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h android-tools-31.0.2.mod/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
---- android-tools-31.0.2/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h	2021-07-20 11:13:01.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h	2021-10-08 10:01:07.304004004 +0000
+diff --git a/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h b/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
+index 6fd38ee..bb62fd4 100644
+--- a/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
++++ b/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
 @@ -23,6 +23,7 @@
  #include <android-base/logging.h>
  #include <android-base/off64_t.h>
@@ -149,16 +339,10 @@
  #ifdef __ANDROID__
  #include <linux/incrementalfs.h>
  #endif
-@@ -400,4 +401,4 @@
- 
- } // namespace incfs
- 
--} // namespace android
-\ No newline at end of file
-+} // namespace android
-diff -uNr android-tools-31.0.2/vendor/libbase/include/android-base/unique_fd.h android-tools-31.0.2.mod/vendor/libbase/include/android-base/unique_fd.h
---- android-tools-31.0.2/vendor/libbase/include/android-base/unique_fd.h	2020-11-12 18:02:33.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/libbase/include/android-base/unique_fd.h	2021-10-08 09:55:05.180121003 +0000
+diff --git a/vendor/libbase/include/android-base/unique_fd.h b/vendor/libbase/include/android-base/unique_fd.h
+index 9ceb5db..bf6f5cc 100644
+--- a/vendor/libbase/include/android-base/unique_fd.h
++++ b/vendor/libbase/include/android-base/unique_fd.h
 @@ -46,7 +46,7 @@
  // unique_fd is also known as ScopedFd/ScopedFD/scoped_fd; mentioned here to help
  // you find this class if you're searching for one of those names.
@@ -168,7 +352,7 @@
  #include <android/fdsan.h>
  #endif
  
-@@ -54,7 +54,7 @@
+@@ -54,7 +54,7 @@ namespace android {
  namespace base {
  
  struct DefaultCloser {
@@ -177,9 +361,10 @@
    static void Tag(int fd, void* old_addr, void* new_addr) {
      if (android_fdsan_exchange_owner_tag) {
        uint64_t old_tag = android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_UNIQUE_FD,
-diff -uNr android-tools-31.0.2/vendor/libbase/logging.cpp android-tools-31.0.2.mod/vendor/libbase/logging.cpp
---- android-tools-31.0.2/vendor/libbase/logging.cpp	2021-07-20 11:13:01.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/libbase/logging.cpp	2021-10-08 09:55:05.180121003 +0000
+diff --git a/vendor/libbase/logging.cpp b/vendor/libbase/logging.cpp
+index 168ca42..e3896f3 100644
+--- a/vendor/libbase/logging.cpp
++++ b/vendor/libbase/logging.cpp
 @@ -61,11 +61,17 @@
  namespace android {
  namespace base {
@@ -199,9 +384,10 @@
  #elif defined(_WIN32)
    static bool first = true;
    static char progname[MAX_PATH] = {};
-diff -uNr android-tools-31.0.2/vendor/libbase/properties.cpp android-tools-31.0.2.mod/vendor/libbase/properties.cpp
---- android-tools-31.0.2/vendor/libbase/properties.cpp	2020-11-12 18:02:33.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/libbase/properties.cpp	2021-10-08 09:55:05.181121003 +0000
+diff --git a/vendor/libbase/properties.cpp b/vendor/libbase/properties.cpp
+index 8190987..6d48ab8 100644
+--- a/vendor/libbase/properties.cpp
++++ b/vendor/libbase/properties.cpp
 @@ -16,7 +16,7 @@
  
  #include "android-base/properties.h"
@@ -211,7 +397,7 @@
  #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
  #include <sys/system_properties.h>
  #include <sys/_system_properties.h>
-@@ -32,8 +32,6 @@
+@@ -32,11 +32,9 @@
  #include <android-base/parseint.h>
  #include <android-base/strings.h>
  
@@ -219,8 +405,12 @@
 -
  #define PROP_VALUE_MAX 92
  
- static std::map<std::string, std::string>& g_properties = *new std::map<std::string, std::string>;
-@@ -63,8 +61,6 @@
+-static std::map<std::string, std::string>& g_properties = *new std::map<std::string, std::string>;
++static std::map<std::string, std::string> g_properties;
+ 
+ int __system_property_set(const char* key, const char* value) {
+   if (key == nullptr || *key == '\0') return -1;
+@@ -63,8 +61,6 @@ int __system_property_get(const char* key, char* value) {
    return strlen(value);
  }
  
@@ -229,7 +419,7 @@
  namespace android {
  namespace base {
  
-@@ -108,7 +104,7 @@
+@@ -108,7 +104,7 @@ template uint64_t GetUintProperty(const std::string&, uint64_t, uint64_t);
  
  std::string GetProperty(const std::string& key, const std::string& default_value) {
    std::string property_value;
@@ -238,7 +428,7 @@
    const prop_info* pi = __system_property_find(key.c_str());
    if (pi == nullptr) return default_value;
  
-@@ -134,7 +130,7 @@
+@@ -134,7 +130,7 @@ bool SetProperty(const std::string& key, const std::string& value) {
    return (__system_property_set(key.c_str(), value.c_str()) == 0);
  }
  
@@ -247,9 +437,10 @@
  
  struct WaitForPropertyData {
    bool done;
-diff -uNr android-tools-31.0.2/vendor/libziparchive/zip_archive.cc android-tools-31.0.2.mod/vendor/libziparchive/zip_archive.cc
---- android-tools-31.0.2/vendor/libziparchive/zip_archive.cc	2021-06-02 15:08:21.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/libziparchive/zip_archive.cc	2021-10-08 09:55:05.182121003 +0000
+diff --git a/vendor/libziparchive/zip_archive.cc b/vendor/libziparchive/zip_archive.cc
+index fe1baa1..21d2627 100644
+--- a/vendor/libziparchive/zip_archive.cc
++++ b/vendor/libziparchive/zip_archive.cc
 @@ -39,7 +39,9 @@
  #define lseek64 lseek
  #endif
@@ -261,7 +452,7 @@
  #include <android/fdsan.h>
  #endif
  
-@@ -88,7 +90,7 @@
+@@ -88,7 +90,7 @@ static constexpr uint64_t kMaxFileLength = 256 * static_cast<uint64_t>(1u << 30u
   * of the string length into the hash table entry.
   */
  
@@ -270,7 +461,7 @@
  uint64_t GetOwnerTag(const ZipArchive* archive) {
    return android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_ZIPARCHIVE,
                                          reinterpret_cast<uint64_t>(archive));
-@@ -102,7 +104,7 @@
+@@ -102,7 +104,7 @@ ZipArchive::ZipArchive(MappedZipFile&& map, bool assume_ownership)
        central_directory(),
        directory_map(),
        num_entries(0) {
@@ -279,7 +470,7 @@
    if (assume_ownership) {
      CHECK(mapped_zip.HasFd());
      android_fdsan_exchange_owner_tag(mapped_zip.GetFileDescriptor(), 0, GetOwnerTag(this));
-@@ -120,7 +122,7 @@
+@@ -120,7 +122,7 @@ ZipArchive::ZipArchive(const void* address, size_t length)
  
  ZipArchive::~ZipArchive() {
    if (close_file && mapped_zip.GetFileDescriptor() >= 0) {
@@ -288,9 +479,122 @@
      android_fdsan_close_with_tag(mapped_zip.GetFileDescriptor(), GetOwnerTag(this));
  #else
      close(mapped_zip.GetFileDescriptor());
-diff -uNr android-tools-31.0.2/vendor/logging/liblog/logger_write.cpp android-tools-31.0.2.mod/vendor/logging/liblog/logger_write.cpp
---- android-tools-31.0.2/vendor/logging/liblog/logger_write.cpp	2021-07-20 11:13:01.000000000 +0000
-+++ android-tools-31.0.2.mod/vendor/logging/liblog/logger_write.cpp	2021-10-08 09:55:05.183121003 +0000
+diff --git a/vendor/logging/liblog/include/android/log.h b/vendor/logging/liblog/include/android/log.h
+index 12de595..6742aa9 100644
+--- a/vendor/logging/liblog/include/android/log.h
++++ b/vendor/logging/liblog/include/android/log.h
+@@ -229,7 +229,7 @@ typedef void (*__android_aborter_function)(const char* abort_message);
+  *
+  * Available since API level 30.
+  */
+-void __android_log_write_log_message(struct __android_log_message* log_message) __INTRODUCED_IN(30);
++void __android_log_write_log_message(struct __android_log_message* log_message) __INTRODUCED_IN(24);
+ 
+ /**
+  * Sets a user defined logger function.  All log messages sent to liblog will be set to the
+@@ -241,7 +241,7 @@ void __android_log_write_log_message(struct __android_log_message* log_message)
+  *
+  * Available since API level 30.
+  */
+-void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(30);
++void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(24);
+ 
+ /**
+  * Writes the log message to logd.  This is an __android_logger_function and can be provided to
+@@ -251,7 +251,7 @@ void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(
+  *
+  * Available since API level 30.
+  */
+-void __android_log_logd_logger(const struct __android_log_message* log_message) __INTRODUCED_IN(30);
++void __android_log_logd_logger(const struct __android_log_message* log_message) __INTRODUCED_IN(24);
+ 
+ /**
+  * Writes the log message to stderr.  This is an __android_logger_function and can be provided to
+@@ -262,7 +262,7 @@ void __android_log_logd_logger(const struct __android_log_message* log_message)
+  * Available since API level 30.
+  */
+ void __android_log_stderr_logger(const struct __android_log_message* log_message)
+-    __INTRODUCED_IN(30);
++    __INTRODUCED_IN(24);
+ 
+ /**
+  * Sets a user defined aborter function that is called for __android_log_assert() failures.  This
+@@ -273,7 +273,7 @@ void __android_log_stderr_logger(const struct __android_log_message* log_message
+  *
+  * Available since API level 30.
+  */
+-void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_IN(30);
++void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_IN(24);
+ 
+ /**
+  * Calls the stored aborter function.  This allows for other logging libraries to use the same
+@@ -284,7 +284,7 @@ void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_
+  *
+  * Available since API level 30.
+  */
+-void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(30);
++void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(24);
+ 
+ /**
+  * Sets android_set_abort_message() on device then aborts().  This is the default aborter.
+@@ -295,7 +295,7 @@ void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(30);
+  * Available since API level 30.
+  */
+ void __android_log_default_aborter(const char* abort_message) __attribute__((noreturn))
+-__INTRODUCED_IN(30);
++__INTRODUCED_IN(24);
+ 
+ /**
+  * Use the per-tag properties "log.tag.<tagname>" along with the minimum priority from
+@@ -314,7 +314,7 @@ __INTRODUCED_IN(30);
+  *
+  * Available since API level 30.
+  */
+-int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INTRODUCED_IN(30);
++int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INTRODUCED_IN(24);
+ 
+ /**
+  * Use the per-tag properties "log.tag.<tagname>" along with the minimum priority from
+@@ -335,7 +335,7 @@ int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INT
+  * Available since API level 30.
+  */
+ int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int default_prio)
+-    __INTRODUCED_IN(30);
++    __INTRODUCED_IN(24);
+ 
+ /**
+  * Sets the minimum priority that will be logged for this process.
+@@ -346,7 +346,7 @@ int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int def
+  *
+  * Available since API level 30.
+  */
+-int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(30);
++int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(24);
+ 
+ /**
+  * Gets the minimum priority that will be logged for this process.  If none has been set by a
+@@ -357,7 +357,7 @@ int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(30)
+  *
+  * Available since API level 30.
+  */
+-int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(30);
++int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(24);
+ 
+ /**
+  * Sets the default tag if no tag is provided when writing a log message.  Defaults to
+@@ -368,7 +368,7 @@ int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(30);
+  *
+  * Available since API level 30.
+  */
+-void __android_log_set_default_tag(const char* tag) __INTRODUCED_IN(30);
++void __android_log_set_default_tag(const char* tag) __INTRODUCED_IN(24);
+ 
+ #ifdef __cplusplus
+ }
+diff --git a/vendor/logging/liblog/logger_write.cpp b/vendor/logging/liblog/logger_write.cpp
+index a0153f8..8863f29 100644
+--- a/vendor/logging/liblog/logger_write.cpp
++++ b/vendor/logging/liblog/logger_write.cpp
 @@ -39,6 +39,8 @@
  #include "logger.h"
  #include "uio.h"
@@ -300,7 +604,7 @@
  #ifdef __ANDROID__
  #include "logd_writer.h"
  #include "pmsg_writer.h"
-@@ -108,31 +110,6 @@
+@@ -108,31 +110,6 @@ void __android_log_close() {
  #endif
  }
  

@ian4hu
Copy link
Contributor

ian4hu commented Oct 29, 2021

I have create a new pull request with the updated patch #7882

@finagolfin finagolfin closed this Oct 29, 2021
@Grimler91 Grimler91 deleted the android-tools branch October 29, 2021 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants