Removed support for -f shortcut flag as this conflicts with some package manager flags Renamed use_localagent global to match conventions Fixed case where tmp files were created unnecessarily Removed dead code (delete_host_file) Cleaned up multiple layers of error handling by using fatal() as soon as error conditions occur Fix: 113631900 Test: mm Test: adb install -r --fastdeploy --nostreaming --force-agent --local-agent ~/example_apks/example.apk Test: adb install -r --fastdeploy --no-streaming --force-agent --local-agent ~/example_apks/example.apk Test: observe that fast deploy works as usual Test: adb install -r -f --nostreaming --force-agent --local-agent ~/example_apks/example.apk Test: adb install -r -f --no-streaming --force-agent --local-agent ~/example_apks/example.apk Test: observe that fast deploy is no longer invoked by -f Change-Id: Ic719df1003ac319e48b32f7f377f6f91d17f6a6f (cherry picked from commit 0584689beaff604ceeccaf706dc368213d07b977)
34 lines
1.3 KiB
C++
34 lines
1.3 KiB
C++
/*
|
|
* Copyright (C) 2018 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "adb.h"
|
|
|
|
enum FastDeploy_AgentUpdateStrategy {
|
|
FastDeploy_AgentUpdateAlways,
|
|
FastDeploy_AgentUpdateNewerTimeStamp,
|
|
FastDeploy_AgentUpdateDifferentVersion
|
|
};
|
|
|
|
void fastdeploy_set_local_agent(bool use_localagent);
|
|
int get_device_api_level();
|
|
void update_agent(FastDeploy_AgentUpdateStrategy agentUpdateStrategy);
|
|
int extract_metadata(const char* apkPath, FILE* outputFp);
|
|
int create_patch(const char* apkPath, const char* metadataPath, const char* patchPath);
|
|
int apply_patch_on_device(const char* apkPath, const char* patchPath, const char* outputPath);
|
|
int install_patch(const char* apkPath, const char* patchPath, int argc, const char** argv);
|
|
std::string get_patch_path(const char* apkPath);
|