aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/stub-out-fastdeploy.patch
blob: d86ef230f70449d9247491ec46b04998d7b4fd41 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Upstream-Status: Pending

Description: Defer packaging fastdeploy with adb for 29.x.x tags.
Forwarded: not-needed
--- a/system/core/adb/client/commandline.cpp
+++ b/system/core/adb/client/commandline.cpp
@@ -59,7 +59,6 @@
 #include "bugreport.h"
 #include "client/file_sync_client.h"
 #include "commandline.h"
-#include "fastdeploy.h"
 #include "services.h"
 #include "shell_protocol.h"
 #include "sysdeps/chrono.h"
--- a/system/core/adb/client/adb_install.cpp
+++ b/system/core/adb/client/adb_install.cpp
@@ -35,7 +35,6 @@
 #include "adb_utils.h"
 #include "client/file_sync_client.h"
 #include "commandline.h"
-#include "fastdeploy.h"
 
 static constexpr int kFastDeployMinApi = 24;
 
@@ -167,14 +166,6 @@
     }
 
     if (use_fastdeploy) {
-        auto metadata = extract_metadata(file);
-        if (metadata.has_value()) {
-            // pass all but 1st (command) and last (apk path) parameters through to pm for
-            // session creation
-            std::vector<const char*> pm_args{argv + 1, argv + argc - 1};
-            auto patchFd = install_patch(pm_args.size(), pm_args.data());
-            return stream_patch(file, std::move(metadata.value()), std::move(patchFd));
-        }
     }
 
     struct stat sb;
@@ -267,16 +258,6 @@
     argv[last_apk] = apk_dest.c_str(); /* destination name, not source location */
 
     if (use_fastdeploy) {
-        auto metadata = extract_metadata(apk_file[0]);
-        if (metadata.has_value()) {
-            auto patchFd = apply_patch_on_device(apk_dest.c_str());
-            int status = stream_patch(apk_file[0], std::move(metadata.value()), std::move(patchFd));
-
-            result = pm_command(argc, argv);
-            delete_device_file(apk_dest);
-
-            return status;
-        }
     }
 
     if (do_sync_push(apk_file, apk_dest.c_str(), false)) {
@@ -292,7 +273,6 @@
     InstallMode installMode = INSTALL_DEFAULT;
     bool use_fastdeploy = false;
     bool is_reinstall = false;
-    FastDeploy_AgentUpdateStrategy agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
 
     for (int i = 1; i < argc; i++) {
         if (!strcmp(argv[i], "--streaming")) {
@@ -313,13 +293,10 @@
             use_fastdeploy = false;
         } else if (!strcmp(argv[i], "--force-agent")) {
             processedArgIndicies.push_back(i);
-            agent_update_strategy = FastDeploy_AgentUpdateAlways;
         } else if (!strcmp(argv[i], "--date-check-agent")) {
             processedArgIndicies.push_back(i);
-            agent_update_strategy = FastDeploy_AgentUpdateNewerTimeStamp;
         } else if (!strcmp(argv[i], "--version-check-agent")) {
             processedArgIndicies.push_back(i);
-            agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
         }
     }
 
@@ -331,13 +308,11 @@
         error_exit("Attempting to use streaming install on unsupported device");
     }
 
-    if (use_fastdeploy && get_device_api_level() < kFastDeployMinApi) {
-        printf("Fast Deploy is only compatible with devices of API version %d or higher, "
-               "ignoring.\n",
-               kFastDeployMinApi);
+    if (use_fastdeploy) {
+        printf("Fast Deploy is unavailable in this build of adb, "
+               "ignoring.\n");
         use_fastdeploy = false;
     }
-    fastdeploy_set_agent_update_strategy(agent_update_strategy);
 
     std::vector<const char*> passthrough_argv;
     for (int i = 0; i < argc; i++) {