File: hard-code-build-number.patch

package info (click to toggle)
android-platform-tools 34.0.5-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 150,900 kB
  • sloc: cpp: 805,786; java: 293,500; ansic: 128,288; xml: 127,491; python: 41,481; sh: 14,245; javascript: 9,665; cs: 3,846; asm: 2,049; makefile: 1,917; yacc: 440; awk: 368; ruby: 183; sql: 140; perl: 88; lex: 67
file content (47 lines) | stat: -rw-r--r-- 1,772 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: just hard code rather than deal with circular deps
Forwarded: not-needed
--- a/packages/modules/adb/adb.cpp
+++ b/packages/modules/adb/adb.cpp
@@ -47,9 +47,6 @@
 #include <android-base/utf8.h>
 #include <diagnose_usb.h>
 
-#include <build/version.h>
-#include <platform_tools_version.h>
-
 #include "adb_auth.h"
 #include "adb_io.h"
 #include "adb_listeners.h"
@@ -100,7 +97,7 @@
             "Installed as %s\n"
             "Running on %s\n",
             ADB_VERSION_MAJOR, ADB_VERSION_MINOR, ADB_SERVER_VERSION, PLATFORM_TOOLS_VERSION,
-            android::build::GetBuildNumber().c_str(), android::base::GetExecutablePath().c_str(),
+            "debian", android::base::GetExecutablePath().c_str(),
             GetOSVersion().c_str());
 }
 
--- a/system/core/fastboot/fastboot.cpp
+++ b/system/core/fastboot/fastboot.cpp
@@ -64,11 +64,9 @@
 #include <android-base/stringprintf.h>
 #include <android-base/strings.h>
 #include <android-base/unique_fd.h>
-#include <build/version.h>
 #include <libavb/libavb.h>
 #include <liblp/liblp.h>
 #include <liblp/super_layout_builder.h>
-#include <platform_tools_version.h>
 #include <sparse/sparse.h>
 #include <ziparchive/zip_archive.h>
 
@@ -1962,8 +1960,7 @@
                 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-%s\n", PLATFORM_TOOLS_VERSION, "debian");
                 fprintf(stdout, "Installed as %s\n", android::base::GetExecutablePath().c_str());
                 return 0;
             } else {