PKGBUILDs/community/android-tools/fix_build_core.patch

91 lines
3.4 KiB
Diff
Raw Normal View History

2019-08-05 02:25:49 +00:00
diff --git a/adb/adb.cpp b/adb/adb.cpp
index 24d4292d02..e4ad76b7c3 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -44,8 +44,6 @@
#include <android-base/parsenetaddress.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
-#include <build/version.h>
-#include <platform_tools_version.h>
#include "adb_auth.h"
#include "adb_io.h"
@@ -66,10 +64,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"
- "Version %s-%s\n"
+ "Version %s-ArchLinux\n"
"Installed as %s\n",
ADB_VERSION_MAJOR, ADB_VERSION_MINOR, ADB_SERVER_VERSION,
- PLATFORM_TOOLS_VERSION, android::build::GetBuildNumber().c_str(),
+ PLATFORM_TOOLS_VERSION,
android::base::GetExecutablePath().c_str());
}
diff --git a/adb/client/main.cpp b/adb/client/main.cpp
index 0c5c28f1b3..b6a1281521 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();
init_reconnect_handler();
- 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 {
2018-03-22 03:56:30 +00:00
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
2019-08-05 02:25:49 +00:00
index 53f01a0ce5..5be0d91085 100644
2018-03-22 03:56:30 +00:00
--- a/adb/client/usb_libusb.cpp
+++ b/adb/client/usb_libusb.cpp
2018-08-08 19:39:14 +00:00
@@ -30,7 +31,7 @@
2018-03-22 03:56:30 +00:00
#include <thread>
#include <unordered_map>
-#include <libusb/libusb.h>
+#include <libusb-1.0/libusb.h>
#include <android-base/file.h>
#include <android-base/logging.h>
2019-08-05 02:25:49 +00:00
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
2019-08-05 12:35:51 +00:00
index 8923f409df..d245a577ff 100644
2019-08-05 02:25:49 +00:00
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -58,9 +58,7 @@
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
-#include <build/version.h>
#include <liblp/liblp.h>
-#include <platform_tools_version.h>
#include <sparse/sparse.h>
#include <ziparchive/zip_archive.h>
2019-08-05 12:35:51 +00:00
@@ -1749,7 +1747,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
2019-08-05 02:25:49 +00:00
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
} else if (name == "version") {
- fprintf(stdout, "fastboot version %s-%s\n", PLATFORM_TOOLS_VERSION, android::build::GetBuildNumber().c_str());
+ fprintf(stdout, "fastboot version %s-ArchLinux\n", PLATFORM_TOOLS_VERSION);
fprintf(stdout, "Installed as %s\n", android::base::GetExecutablePath().c_str());
return 0;
#if !defined(_WIN32)
2018-03-22 03:56:30 +00:00
diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
2019-08-05 02:25:49 +00:00
index 8c0aa6bf4e..3ad5b53568 100644
2018-03-22 03:56:30 +00:00
--- a/fastboot/fs.cpp
+++ b/fastboot/fs.cpp
2018-08-08 19:39:14 +00:00
@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long long partSize,
2018-03-22 03:56:30 +00:00
static constexpr int block_size = 4096;
const std::string exec_dir = android::base::GetExecutableDirectory();
- const std::string mke2fs_path = exec_dir + "/mke2fs";
+ const std::string mke2fs_path = exec_dir + "/mke2fs.android";
std::vector<const char*> mke2fs_args = {mke2fs_path.c_str(), "-t", "ext4", "-b"};
std::string block_size_str = std::to_string(block_size);