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 96 97 98
|
Description: Defer packaging fastdeploy with adb for 29.x.x tags.
Forwarded: not-needed
--- a/packages/modules/adb/client/adb_install.cpp
+++ b/packages/modules/adb/client/adb_install.cpp
@@ -185,14 +185,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;
@@ -280,16 +272,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, CompressionType::Any, false, false)) {
@@ -457,7 +439,6 @@
std::vector<const char*> argv, bool* use_fastdeploy,
FastDeploy_AgentUpdateStrategy* agent_update_strategy) {
*use_fastdeploy = false;
- *agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
std::vector<const char*> passthrough;
for (auto&& arg : argv) {
@@ -466,11 +447,8 @@
} else if (arg == "--no-fastdeploy"sv) {
*use_fastdeploy = false;
} else if (arg == "--force-agent"sv) {
- *agent_update_strategy = FastDeploy_AgentUpdateAlways;
} else if (arg == "--date-check-agent"sv) {
- *agent_update_strategy = FastDeploy_AgentUpdateNewerTimeStamp;
} else if (arg == "--version-check-agent"sv) {
- *agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
} else {
passthrough.push_back(arg);
}
@@ -484,12 +462,11 @@
bool incremental_wait = false;
bool use_fastdeploy = false;
- FastDeploy_AgentUpdateStrategy agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
auto unused_argv = parse_install_mode({argv, argv + argc}, &install_mode, &incremental_request,
&incremental_wait);
auto passthrough_argv =
- parse_fast_deploy_mode(std::move(unused_argv), &use_fastdeploy, &agent_update_strategy);
+ parse_fast_deploy_mode(std::move(unused_argv), &use_fastdeploy, nullptr);
auto [primary_mode, fallback_mode] =
calculate_install_mode(install_mode, use_fastdeploy, incremental_request);
@@ -499,14 +476,11 @@
error_exit("Attempting to use streaming install on unsupported device");
}
- if (use_fastdeploy && get_device_api_level() < kFastDeployMinApi) {
- fprintf(stderr,
- "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);
if (passthrough_argv.size() < 2) {
error_exit("install requires an apk argument");
--- a/packages/modules/adb/client/commandline.cpp
+++ b/packages/modules/adb/client/commandline.cpp
@@ -63,7 +63,6 @@
#include "bugreport.h"
#include "client/file_sync_client.h"
#include "commandline.h"
-#include "fastdeploy.h"
#include "incremental_server.h"
#include "services.h"
#include "shell_protocol.h"
|