Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F11047338
D8692.id25038.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
29 KB
Referenced Files
None
Subscribers
None
D8692.id25038.diff
View Options
diff --git a/abi_used_libs b/abi_used_libs
--- a/abi_used_libs
+++ b/abi_used_libs
@@ -1,10 +1,13 @@
ld-linux-x86-64.so.2
+libbrotlidec.so.1
+libbrotlienc.so.1
libc.so.6
libgcc_s.so.1
-libm.so.6
-libprotobuf-lite.so.23
+liblz4.so.1
+libprotobuf.so.23
libpthread.so.0
libselinux.so.1
libstdc++.so.6
libusb-1.0.so.0
libz.so.1
+libzstd.so.1
diff --git a/files/boringssl-disable-thirdpartydeps.patch b/files/boringssl-disable-thirdpartydeps.patch
new file mode 100644
--- /dev/null
+++ b/files/boringssl-disable-thirdpartydeps.patch
@@ -0,0 +1,25 @@
+commit a05f7bad3f07a4041e7011a629858a8b0921e9e0
+Author: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Fri May 15 20:04:43 2020 -0700
+
+ Do not use third-party dependency as it is missing in Android's version of the repo
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 75bf9981..9ec8e81b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -562,13 +562,6 @@ if(USE_CUSTOM_LIBCXX)
+ target_link_libraries(libcxx libcxxabi)
+ endif()
+
+-# Add minimal googletest targets. The provided one has many side-effects, and
+-# googletest has a very straightforward build.
+-add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc)
+-target_include_directories(boringssl_gtest PRIVATE third_party/googletest)
+-
+-include_directories(third_party/googletest/include)
+-
+ # Declare a dummy target to build all unit tests. Test targets should inject
+ # themselves as dependencies next to the target definition.
+ add_custom_target(all_tests)
+
\ No newline at end of file
diff --git a/files/deployagent.jar b/files/deployagent.jar
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/files/fix_build_core.patch b/files/fix_build_core.patch
--- a/files/fix_build_core.patch
+++ b/files/fix_build_core.patch
@@ -1,8 +1,8 @@
diff --git a/adb/adb.cpp b/adb/adb.cpp
-index 1ec145b25c..b6e943f6ee 100644
+index 08986b77e..46b603650 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
-@@ -44,8 +44,6 @@
+@@ -45,8 +45,6 @@
#include <android-base/parsenetaddress.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
@@ -11,7 +11,7 @@
#include "adb_auth.h"
#include "adb_io.h"
-@@ -66,10 +64,10 @@ std::string adb_version() {
+@@ -74,10 +72,10 @@ std::string adb_version() {
// Don't change the format of this --- it's parsed by ddmlib.
return android::base::StringPrintf(
"Android Debug Bridge version %d.%d.%d\n"
@@ -24,23 +24,92 @@
android::base::GetExecutablePath().c_str());
}
+@@ -1079,21 +1077,6 @@ void adb_set_reject_kill_server(bool value) {
+ }
+
+ static bool handle_mdns_request(std::string_view service, int reply_fd) {
+- if (!android::base::ConsumePrefix(&service, "mdns:")) {
+- return false;
+- }
+-
+- if (service == "check") {
+- std::string check = mdns_check();
+- SendOkay(reply_fd, check);
+- return true;
+- }
+- if (service == "services") {
+- std::string services_list = mdns_list_discovered_services();
+- SendOkay(reply_fd, services_list);
+- return true;
+- }
+-
+ return false;
+ }
+
+diff --git a/adb/client/adb_wifi.cpp b/adb/client/adb_wifi.cpp
+index 61a9a480c..ded4f8f61 100644
+--- a/adb/client/adb_wifi.cpp
++++ b/adb/client/adb_wifi.cpp
+@@ -179,23 +179,6 @@ bool adb_wifi_is_known_host(const std::string& host) {
+
+ void adb_wifi_pair_device(const std::string& host, const std::string& password,
+ std::string& response) {
+- auto mdns_info = mdns_get_pairing_service_info(host);
+-
+- if (!mdns_info.has_value()) {
+- // Check the address for a valid address and port.
+- std::string parsed_host;
+- std::string err;
+- int port = -1;
+- if (!android::base::ParseNetAddress(host, &parsed_host, &port, nullptr, &err)) {
+- response = "Failed to parse address for pairing: " + err;
+- return;
+- }
+- if (port <= 0 || port > 65535) {
+- response = "Invalid port while parsing address [" + host + "]";
+- return;
+- }
+- }
+-
+ auto priv_key = adb_auth_get_user_privkey();
+ auto x509_cert = GenerateX509Certificate(priv_key.get());
+ if (!x509_cert) {
+@@ -224,10 +207,7 @@ void adb_wifi_pair_device(const std::string& host, const std::string& password,
+
+ PairingResultWaiter waiter;
+ std::unique_lock<std::mutex> lock(waiter.mutex_);
+- if (!client->Start(mdns_info.has_value()
+- ? android::base::StringPrintf("%s:%d", mdns_info->addr.c_str(),
+- mdns_info->port)
+- : host,
++ if (!client->Start(host,
+ waiter.OnResult, &waiter)) {
+ response = "Failed: Unable to start pairing client.";
+ return;
+@@ -250,5 +230,6 @@ void adb_wifi_pair_device(const std::string& host, const std::string& password,
+ // Write to adb_known_hosts
+ write_known_host_to_file(device_guid);
+ // Try to auto-connect.
+- adb_secure_connect_by_service_name(device_guid.c_str());
++ // ARCH: following function requires mdns code that is not compatible with mdns system library
++ // adb_secure_connect_by_service_name(device_guid.c_str());
+ }
diff --git a/adb/client/main.cpp b/adb/client/main.cpp
-index 0c5c28f1b3..b6a1281521 100644
+index a19bd6d31..356aeb221 100644
--- a/adb/client/main.cpp
+++ b/adb/client/main.cpp
-@@ -118,10 +118,6 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply
- init_transport_registration();
+@@ -126,9 +126,6 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply
init_reconnect_handler();
+ adb_wifi_init();
- if (!getenv("ADB_MDNS") || strcmp(getenv("ADB_MDNS"), "0") != 0) {
- init_mdns_transport_discovery();
- }
--
+
if (!getenv("ADB_USB") || strcmp(getenv("ADB_USB"), "0") != 0) {
usb_init();
- } else {
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
-index 53f01a0ce5..b4c3aadc28 100644
+index 07cbc9418..614539219 100644
--- a/adb/client/usb_libusb.cpp
+++ b/adb/client/usb_libusb.cpp
@@ -30,7 +30,7 @@
@@ -52,8 +121,87 @@
#include <android-base/file.h>
#include <android-base/logging.h>
+diff --git a/adb/crypto/x509_generator.cpp b/adb/crypto/x509_generator.cpp
+index 43b815304..6900b3a49 100644
+--- a/adb/crypto/x509_generator.cpp
++++ b/adb/crypto/x509_generator.cpp
+@@ -17,6 +17,7 @@
+ #include "adb/crypto/x509_generator.h"
+
+ #include <vector>
++#include <string.h>
+
+ #include <android-base/logging.h>
+ #include <crypto_utils/android_pubkey.h>
+diff --git a/adb/pairing_auth/aes_128_gcm.cpp b/adb/pairing_auth/aes_128_gcm.cpp
+index 51520d814..2d5f86fa8 100644
+--- a/adb/pairing_auth/aes_128_gcm.cpp
++++ b/adb/pairing_auth/aes_128_gcm.cpp
+@@ -23,6 +23,8 @@
+ #include <openssl/hkdf.h>
+ #include <openssl/rand.h>
+
++#include <string.h>
++
+ namespace adb {
+ namespace pairing {
+
+diff --git a/adb/pairing_auth/pairing_auth.cpp b/adb/pairing_auth/pairing_auth.cpp
+index 0ac04e691..de2aa740e 100644
+--- a/adb/pairing_auth/pairing_auth.cpp
++++ b/adb/pairing_auth/pairing_auth.cpp
+@@ -21,6 +21,7 @@
+ #include <openssl/curve25519.h>
+ #include <openssl/mem.h>
+
++#include <string.h>
+ #include <iomanip>
+ #include <sstream>
+ #include <vector>
+diff --git a/adb/socket_spec.cpp b/adb/socket_spec.cpp
+index 5cad70d09..9f9730719 100644
+--- a/adb/socket_spec.cpp
++++ b/adb/socket_spec.cpp
+@@ -196,24 +196,7 @@ bool socket_spec_connect(unique_fd* fd, std::string_view address, int* port, std
+ fd->reset(network_loopback_client(port_value, SOCK_STREAM, error));
+ } else {
+ #if ADB_HOST
+- // Check if the address is an mdns service we can connect to.
+- if (auto mdns_info = mdns_get_connect_service_info(address.substr(4));
+- mdns_info != std::nullopt) {
+- fd->reset(network_connect(mdns_info->addr, mdns_info->port, SOCK_STREAM, 0, error));
+- if (fd->get() != -1) {
+- // TODO(joshuaduong): We still show the ip address for the serial. Change it to
+- // use the mdns instance name, so we can adjust to address changes on
+- // reconnects.
+- port_value = mdns_info->port;
+- if (serial) {
+- *serial = android::base::StringPrintf("%s.%s",
+- mdns_info->service_name.c_str(),
+- mdns_info->service_type.c_str());
+- }
+- }
+- } else {
+- fd->reset(network_connect(hostname, port_value, SOCK_STREAM, 0, error));
+- }
++ fd->reset(network_connect(hostname, port_value, SOCK_STREAM, 0, error));
+ #else
+ // Disallow arbitrary connections in adbd.
+ *error = "adbd does not support arbitrary tcp connections";
+diff --git a/adb/tls/tls_connection.cpp b/adb/tls/tls_connection.cpp
+index 853cdac08..3613c3768 100644
+--- a/adb/tls/tls_connection.cpp
++++ b/adb/tls/tls_connection.cpp
+@@ -18,6 +18,7 @@
+
+ #include <algorithm>
+ #include <vector>
++#include <limits.h>
+
+ #include <android-base/logging.h>
+ #include <android-base/strings.h>
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
-index 2fe3b1a9e0..a61b221ce3 100644
+index 4bf791ecf..42c48d816 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -59,10 +59,8 @@
@@ -67,7 +215,7 @@
#include <sparse/sparse.h>
#include <ziparchive/zip_archive.h>
-@@ -1783,7 +1781,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
+@@ -1863,7 +1861,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
} else if (name == "version") {
@@ -77,7 +225,7 @@
return 0;
#if !defined(_WIN32)
diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
-index 8c0aa6bf4e..3ad5b53568 100644
+index 8c0aa6bf4..3ad5b5356 100644
--- a/fastboot/fs.cpp
+++ b/fastboot/fs.cpp
@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long long partSize,
@@ -90,7 +238,7 @@
std::string block_size_str = std::to_string(block_size);
diff --git a/libcutils/include/cutils/threads.h b/libcutils/include/cutils/threads.h
-index ba4846e33b..f3fccc4895 100644
+index ba4846e33..f3fccc489 100644
--- a/libcutils/include/cutils/threads.h
+++ b/libcutils/include/cutils/threads.h
@@ -33,8 +33,6 @@ extern "C" {
@@ -101,4 +249,4 @@
-
//
// Deprecated: use `_Thread_local` in C or `thread_local` in C++.
- //
\ No newline at end of file
+ //
diff --git a/files/fix_libziparchive.patch b/files/fix_libziparchive.patch
new file mode 100644
--- /dev/null
+++ b/files/fix_libziparchive.patch
@@ -0,0 +1,12 @@
+diff --git a/zip_cd_entry_map.h b/zip_cd_entry_map.h
+index 4957f75..1cfb74d 100644
+--- a/zip_cd_entry_map.h
++++ b/zip_cd_entry_map.h
+@@ -17,6 +17,7 @@
+ #pragma once
+
+ #include <stdint.h>
++#include <stdlib.h>
+
+ #include <map>
+ #include <memory>
diff --git a/files/generate_build.rb b/files/generate_build.rb
--- a/files/generate_build.rb
+++ b/files/generate_build.rb
@@ -1,9 +1,5 @@
#!/usr/bin/ruby
-# Android build system is complicated and does not allow to build
-# separate parts easily.
-# This script tries to mimic Android build rules.
-
def expand(dir, files)
files.map { |f| File.join(dir, f) }
end
@@ -18,10 +14,8 @@
case ext
when ".c"
cc = "cc"
- lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS"
when ".cpp", ".cc"
cc = "cxx"
- lang_flags = "-std=gnu++2a $CXXFLAGS $CPPFLAGS"
else
raise "Unknown extension #{ext}"
end
@@ -29,12 +23,13 @@
output = s + ".o"
outputs << output
order_deps = if params[:order_deps]
- " || " + params[:order_deps].join(" ")
- else
- ""
- end
+ " || " + params[:order_deps].join(" ")
+ else
+ ""
+ end
- puts "build #{output}: #{cc} #{s}#{order_deps}\n cflags = #{lang_flags} #{cflags}"
+ # TODO: try to build the tools with LLVM libc: -stdlib=libc++
+ puts "build #{output}: #{cc} #{s}#{order_deps}\n cflags = #{cflags}"
end
return outputs
@@ -47,7 +42,7 @@
hfile = basename + ".pb.h"
ofile = cfile + ".o"
puts "build #{cfile} #{hfile}: protoc #{source}"
- puts "build #{ofile}: cc #{cfile}\n cflags = -std=gnu++2a $CXXFLAGS $CPPFLAGS -I."
+ puts "build #{ofile}: cxx #{cfile}\n cflags = -I."
return hfile, cfile, ofile
end
@@ -61,27 +56,29 @@
# Links object files
def link(output, objects, ldflags)
- puts "build #{output}: link #{objects.join(" ")}\n ldflags = #{ldflags} $LDFLAGS"
+ # TODO: try to build the tools with LLVM libc: -stdlib=libc++
+ puts "build #{output}: link #{objects.join(" ")}\n ldflags = #{ldflags}"
end
def genheader(input, variable, output)
puts "build #{output}: genheader #{input}\n var = #{variable}"
end
-puts "# This set of commands generated by generate_build.rb script\n\n"
+puts "# This script is generated by https://github.com/anatol/android-platform-tools-build tool\n\n"
puts "CC = #{ENV["CC"] || "clang"}"
puts "CXX = #{ENV["CXX"] || "clang++"}\n\n"
puts "CFLAGS = #{ENV["CFLAGS"]}"
+puts "CPPFLAGS = #{ENV["CPPFLAGS"]}"
puts "CXXFLAGS = #{ENV["CXXFLAGS"]}"
puts "LDFLAGS = #{ENV["LDFLAGS"]}"
puts "PLATFORM_TOOLS_VERSION = #{ENV["PLATFORM_TOOLS_VERSION"]}\n\n"
puts "" "
rule cc
- command = $CC $cflags -c $in -o $out
+ command = $CC -std=gnu11 $CFLAGS $CPPFLAGS $cflags -c $in -o $out
rule cxx
- command = $CXX $cflags -c $in -o $out
+ command = $CXX -std=gnu++2a $CXXFLAGS $CPPFLAGS $cflags -c $in -o $out
rule link
command = $CXX $ldflags $LDFLAGS $in -o $out
@@ -95,6 +92,8 @@
" ""
+key_type_h, key_type_c, key_type_o = protoc("core/adb/proto/key_type.proto")
+
adbdfiles = %w(
adb.cpp
adb_io.cpp
@@ -107,13 +106,14 @@
shell_service_protocol.cpp
sockets.cpp
transport.cpp
- transport_local.cpp
- transport_usb.cpp
types.cpp
)
-libadbd = compile(expand("core/adb", adbdfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Icore/diagnose_usb/include')
+libadbd = compile(expand("core/adb", adbdfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/src/include -Icore/diagnose_usb/include -Icore/adb/crypto/include -Icore/adb/proto -Icore/adb/tls/include', :order_deps => [key_type_h])
apkent_h, apkent_c, apkent_o = protoc("core/adb/fastdeploy/proto/ApkEntry.proto")
+app_processes_h, app_processes_c, app_processes_o = protoc("core/adb/proto/app_processes.proto")
+adb_known_hosts_h, adb_known_hosts_c, adb_known_hosts_o = protoc("core/adb/proto/adb_known_hosts.proto")
+pairing_h, pairing_c, pairing_o = protoc("core/adb/proto/pairing.proto")
deployagent_inc = "core/adb/client/deployagent.inc"
genheader("core/adb/deployagent.jar", "kDeployAgent", deployagent_inc)
@@ -124,6 +124,7 @@
adbfiles = %w(
client/adb_client.cpp
client/adb_install.cpp
+ client/adb_wifi.cpp
client/auth.cpp
client/bugreport.cpp
client/commandline.cpp
@@ -131,29 +132,44 @@
client/fastdeploy.cpp
client/fastdeploycallbacks.cpp
client/file_sync_client.cpp
+ client/incremental.cpp
+ client/incremental_server.cpp
+ client/incremental_utils.cpp
client/line_printer.cpp
client/main.cpp
+ client/pairing/pairing_client.cpp
+ client/transport_local.cpp
+ client/transport_usb.cpp
client/usb_dispatch.cpp
client/usb_libusb.cpp
client/usb_linux.cpp
+ crypto/key.cpp
+ crypto/rsa_2048_key.cpp
+ crypto/x509_generator.cpp
fastdeploy/deploypatchgenerator/apk_archive.cpp
fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp
fastdeploy/deploypatchgenerator/patch_utils.cpp
+ pairing_auth/aes_128_gcm.cpp
+ pairing_auth/pairing_auth.cpp
+ pairing_connection/pairing_connection.cpp
services.cpp
socket_spec.cpp
+ sysdeps/env.cpp
sysdeps/errno.cpp
sysdeps/posix/network.cpp
sysdeps_unix.cpp
+ tls/adb_ca_list.cpp
+ tls/tls_connection.cpp
)
-libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Ibase/libs/androidfw/include -Inative/include", :order_deps => [apkent_h, deployagent_inc, deployagentscript_inc])
-
+libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Ilibbase/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/src/include -Ibase/libs/androidfw/include -Inative/include -Icore/adb/crypto/include -Icore/adb/proto -Icore/adb/tls/include -Icore/adb/pairing_connection/include -Ilibziparchive/include -Icore/adb/pairing_auth/include",
+ :order_deps => [apkent_h, key_type_h, app_processes_h, adb_known_hosts_h, pairing_h, deployagent_inc, deployagentscript_inc])
androidfwfiles = %w(
LocaleData.cpp
ResourceTypes.cpp
TypeWrappers.cpp
ZipFileRO.cpp
)
-libandroidfw = compile(expand("base/libs/androidfw", androidfwfiles), "-Icore/base/include -Ibase/libs/androidfw/include -Icore/libutils/include -Icore/liblog/include -Icore/libsystem/include -Inative/include -Icore/libcutils/include -Icore/libziparchive/include")
+libandroidfw = compile(expand("base/libs/androidfw", androidfwfiles), "-Ilibbase/include -Ibase/libs/androidfw/include -Icore/libutils/include -Icore/liblog/include -Icore/libsystem/include -Inative/include -Icore/libcutils/include -Ilibziparchive/include")
basefiles = %w(
chrono_utils.cpp
@@ -162,13 +178,14 @@
liblog_symbols.cpp
logging.cpp
mapped_file.cpp
+ parsebool.cpp
parsenetaddress.cpp
stringprintf.cpp
strings.cpp
test_utils.cpp
threads.cpp
)
-libbase = compile(expand("core/base", basefiles), "-DADB_HOST=1 -Icore/base/include -Icore/include")
+libbase = compile(expand("libbase", basefiles), "-DADB_HOST=1 -Ilibbase/include -Icore/include")
logfiles = %w(
log_event_list.cpp
@@ -178,7 +195,7 @@
logprint.cpp
properties.cpp
)
-liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include -Icore/base/include")
+liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/liblog/include -Icore/include -Ilibbase/include")
cutilsfiles = %w(
android_get_control_file.cpp
@@ -193,21 +210,22 @@
sockets_unix.cpp
threads.cpp
)
-libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include -Icore/base/include")
+libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include -Ilibbase/include")
diagnoseusbfiles = %w(
diagnose_usb.cpp
)
-libdiagnoseusb = compile(expand("core/diagnose_usb", diagnoseusbfiles), "-Icore/include -Icore/base/include -Icore/diagnose_usb/include")
+libdiagnoseusb = compile(expand("core/diagnose_usb", diagnoseusbfiles), "-Icore/include -Ilibbase/include -Icore/diagnose_usb/include")
libcryptofiles = %w(
- android_pubkey.c
+ android_pubkey.cpp
)
-libcrypto = compile(expand("core/libcrypto_utils", libcryptofiles), "-Icore/libcrypto_utils/include -Iboringssl/include")
+libcrypto = compile(expand("core/libcrypto_utils", libcryptofiles), "-Icore/libcrypto_utils/include -Iboringssl/src/include")
# TODO: make subninja working
-#boringssl = subninja('boringssl/build/', ['crypto/libcrypto.a'])
-boringssl = ["boringssl/build/crypto/libcrypto.a"]
+#boringssl = subninja('boringssl/src/build/', ['ssl/libssl.a'])
+boringssl = ["boringssl/src/build/crypto/libcrypto.a", "boringssl/src/build/ssl/libssl.a"]
+boringssl_ldflags = "-Wl,--whole-archive " + boringssl.join(" ") + " -Wl,--no-whole-archive"
fastbootfiles = %w(
bootimg_utils.cpp
@@ -221,7 +239,7 @@
usb_linux.cpp
util.cpp
)
-libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Imkbootimg/include/bootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/fs_mgr/liblp/include -Icore/diagnose_usb/include -Iavb')
+libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Ilibbase/include -Icore/include -Icore/adb -Icore/libsparse/include -Imkbootimg/include/bootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Ilibziparchive/include -Icore/fs_mgr/liblp/include -Icore/diagnose_usb/include -Iavb')
fsmgrfiles = %w(
liblp/images.cpp
@@ -230,7 +248,7 @@
liblp/utility.cpp
liblp/writer.cpp
)
-libfsmgr = compile(expand("core/fs_mgr", fsmgrfiles), "-Icore/fs_mgr/liblp/include -Icore/base/include -Iextras/ext4_utils/include -Icore/libsparse/include")
+libfsmgr = compile(expand("core/fs_mgr", fsmgrfiles), "-Icore/fs_mgr/liblp/include -Ilibbase/include -Iextras/ext4_utils/include -Icore/libsparse/include")
sparsefiles = %w(
backed_block.cpp
@@ -240,7 +258,7 @@
sparse_err.cpp
sparse_read.cpp
)
-libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include")
+libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Ilibbase/include")
f2fsfiles = %w(
)
@@ -248,8 +266,12 @@
zipfiles = %w(
zip_archive.cc
+ zip_error.cpp
+ zip_cd_entry_map.cc
)
-libzip = compile(expand("core/libziparchive", zipfiles), "-Icore/base/include -Icore/include -Icore/libziparchive/include")
+# we use -std=c++17 as this lib currently does not compile with c++20 standard due to
+# https://stackoverflow.com/questions/37618213/when-is-a-private-constructor-not-a-private-constructor/57430419#57430419
+libzip = compile(expand("libziparchive", zipfiles), "-std=c++17 -Ilibbase/include -Icore/include -Ilibziparchive/include")
utilfiles = %w(
FileMap.cpp
@@ -259,16 +281,16 @@
VectorImpl.cpp
Unicode.cpp
)
-libutil = compile(expand("core/libutils", utilfiles), "-Icore/include -Icore/base/include")
+libutil = compile(expand("core/libutils", utilfiles), "-Icore/include -Ilibbase/include")
ext4files = %w(
ext4_utils.cpp
wipe.cpp
ext4_sb.cpp
)
-libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -Icore/base/include")
+libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -Ilibbase/include")
-link("fastboot", libfsmgr + libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libfastboot + libdiagnoseusb + boringssl, "-lz -lpcre2-8 -lpthread -ldl -lselinux -lsepol")
+link("fastboot", libfsmgr + libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libfastboot + libdiagnoseusb, boringssl_ldflags + " -lz -lpcre2-8 -lpthread -lselinux -lsepol")
# mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955)
libext2fsfiles = %w(
@@ -407,4 +429,4 @@
link("ext2simg", ext2simg + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lz -lpthread")
-link("adb", libbase + liblog + libcutils + libutil + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl + libandroidfw + libzip + [apkent_o], "-lpthread -lusb-1.0 -lprotobuf-lite -lz")
\ No newline at end of file
+link("adb", libbase + liblog + libcutils + libutil + libadbd + libadb + libdiagnoseusb + libcrypto + libandroidfw + libzip + [apkent_o, key_type_o, app_processes_o, adb_known_hosts_o, pairing_o], boringssl_ldflags + " -lpthread -lusb-1.0 -lprotobuf -lz -llz4 -lbrotlidec -lbrotlienc -lzstd")
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -1,19 +1,20 @@
name : android-tools
-version : 29.0.6
-release : 7
+version : 30.0.5
+release : 8
source :
- - git|https://android.googlesource.com/platform/system/core : platform-tools-29.0.6
- - git|https://android.googlesource.com/platform/system/extras : platform-tools-29.0.6
- - git|https://android.googlesource.com/platform/system/tools/mkbootimg : platform-tools-29.0.6
- - git|https://android.googlesource.com/platform/external/f2fs-tools : platform-tools-29.0.6
- - git|https://android.googlesource.com/platform/external/e2fsprogs : platform-tools-29.0.6
- - git|https://android.googlesource.com/platform/external/avb : platform-tools-29.0.6
- - git|https://android.googlesource.com/platform/frameworks/native : platform-tools-29.0.6
- # https://android.googlesource.com/platform/external/boringssl/+/platform-tools-29.0.6/BORINGSSL_REVISION
- - git|https://boringssl.googlesource.com/boringssl : a7a75f208caea8a303615724d4cc5f4e8dfb9695
- # originaly downloaded from https://android.googlesource.com/platform/frameworks/base/+archive/platform-tools-29.0.6/libs/androidfw.tar.gz
- - https://getsol.us/sources/androidfw-29.0.6.tar.gz : d4bd55b614f47e820ef9d59844218604b30eae143da21a8b7898081c57f7e459
- - git|https://github.com/M0Rf30/android-udev-rules : 20191103
+ - git|https://android.googlesource.com/platform/system/core : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/system/extras : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/system/libbase : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/system/libziparchive : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/system/tools/mkbootimg : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/external/f2fs-tools : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/external/e2fsprogs : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/external/avb : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/frameworks/native : platform-tools-30.0.5
+ - git|https://android.googlesource.com/platform/external/boringssl : platform-tools-30.0.5
+ # originaly downloaded from https://android.googlesource.com/platform/frameworks/base/+archive/platform-tools-30.0.5/libs/androidfw.tar.gz
+ - https://getsol.us/sources/androidfw-30.0.5.tar.gz : bde8ee93dd16b55a55ffef7b837bb3d71f338094f4d55b607208ace23d243428
+ - git|https://github.com/M0Rf30/android-udev-rules : 20201003
extract : no
license :
- Apache-2.0
@@ -25,13 +26,16 @@
Android development tools, this includes adb (android debug bridge) and fastboot (diagnostic protocol for androids fastboot bootloader)
clang : yes
builddeps :
+ - pkgconfig(libbrotlicommon)
+ - pkgconfig(liblz4)
- pkgconfig(libselinux)
- pkgconfig(libsepol)
- pkgconfig(libpcre2-8)
- pkgconfig(libusb-1.0)
+ - pkgconfig(libzstd)
+ - pkgconfig(protobuf)
- golang
- gtest-devel
- - protobuf-devel
- ruby
- vim
environment: |
@@ -51,19 +55,26 @@
# deployagent.jar should be built from sources, but to do that, we need whole Android SDK
# to avoid making this build too complicated, we include prebuilt binary and copy it into sources
+ # to extract prebuilt deployagent.jar, download prebuilt adb binary, execute `./adb install --fastdeploy someapp.apk`
+ # and fetch it with `adb pull /data/local/tmp/deployagent.jar` from your phone
cp $pkgfiles/deployagent.jar core/adb
# Patch the sources so they can build on Solus
%patch -p1 < $pkgfiles/fix_build_core.patch -d core
+ %patch -p1 < $pkgfiles/fix_libziparchive.patch -d libziparchive
+ %patch -p1 < $pkgfiles/boringssl-disable-thirdpartydeps.patch -d boringssl
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' avb/avbtool
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' mkbootimg/mkbootimg.py
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' mkbootimg/unpack_bootimg.py
# Generate ninja build files
+ # Originaly taken from https://github.com/anatol/android-platform-tools-build
+ # With permission to redistribute from original author Anatol Pomozov <anatol.pomozov@gmail.com>
+ # Slightly modified to suit Solus' build system
$pkgfiles/generate_build.rb > build.ninja
- mkdir -p boringssl/build && cd boringssl/build && cmake -GNinja ..
+ mkdir -p boringssl/src/build && cd boringssl/src/build && cmake -GNinja ..
build : |
- ninja %JOBS% -C boringssl/build
+ ninja %JOBS% -C boringssl/src/build crypto/libcrypto.a ssl/libssl.a
ninja %JOBS%
install : |
install -Dm00755 -t $installdir/usr/bin adb fastboot mke2fs.android e2fsdroid ext2simg avb/avbtool
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
--- a/pspec_x86_64.xml
+++ b/pspec_x86_64.xml
@@ -3,8 +3,8 @@
<Name>android-tools</Name>
<Homepage>https://developer.android.com/studio/releases/platform-tools</Homepage>
<Packager>
- <Name>Joshua Strobl</Name>
- <Email>joshua@streambits.io</Email>
+ <Name>Mislav Čakarić</Name>
+ <Email>mcakaric@gmail.com</Email>
</Packager>
<License>Apache-2.0</License>
<License>GPL-3.0-or-later</License>
@@ -33,12 +33,12 @@
</Files>
</Package>
<History>
- <Update release="7">
- <Date>2020-07-10</Date>
- <Version>29.0.6</Version>
+ <Update release="8">
+ <Date>2021-01-12</Date>
+ <Version>30.0.5</Version>
<Comment>Packaging update</Comment>
- <Name>Joshua Strobl</Name>
- <Email>joshua@streambits.io</Email>
+ <Name>Mislav Čakarić</Name>
+ <Email>mcakaric@gmail.com</Email>
</Update>
</History>
</PISI>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 11, 3:16 PM (3 h, 3 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5799535
Default Alt Text
D8692.id25038.diff (29 KB)
Attached To
Mode
D8692: Update android-tools to 30.0.5, new udev rules
Attached
Detach File
Event Timeline
Log In to Comment