Files
android_bootable_recovery/startupArgs.hpp
T
bigbiff 1f9e4847ce twrpinstall: create library for twrpinstall
This library will need to mirror AOSP for any changes to installing
packages. The library has been separated out in order to make importing
updates from AOSP into the TWRP project.

twinstall.cpp has been removed from the recovery binary and added to
this library. It has been refactored for libziparchive.

Sideload has been reworked to use the newer methods from AOSP on
flashing packages through adb sideload.

We are also removing old libraries for adb and verifier.

Lastly before flashing a zip or image, we want to unlock block devices
for writing so that when an OTA is flashed to the inactive slot,
the flash will succeed.

Change-Id: I6d8702fc9031ffaf9f666b4ba375dc7d9362e473
2020-12-02 13:43:42 -05:00

55 lines
1.8 KiB
C++
Executable File

/*
Copyright 2012-2020 TeamWin
This file is part of TWRP/TeamWin Recovery Project.
TWRP is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TWRP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with TWRP. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef STARTUPARGS_HPP
#define STARTUPARGS_HPP
#include <android-base/properties.h>
#include "data.hpp"
#include "gui/gui.hpp"
#include "openrecoveryscript.hpp"
#include "partitions.hpp"
#include "twcommon.h"
#include "twrp-functions.hpp"
#include "variables.h"
#include "bootloader_message/include/bootloader_message/bootloader_message.h"
#include "twinstall/get_args.h"
class startupArgs {
public:
static inline std::string const UPDATE_PACKAGE = "--update_package";
static inline std::string const WIPE_CACHE = "--wipe_cache";
static inline std::string const WIPE_DATA = "--wipe_data";
static inline std::string const SEND_INTENT = "--send_intent";
static inline std::string const SIDELOAD = "--sideload";
static inline std::string const REASON = "--reason";
static inline std::string const FASTBOOT = "--fastboot";
static inline std::string const NANDROID = "--nandroid";
static inline std::string const RESCUE_PARTY = "--prompt_and_wipe_data";
void parse(int *argc, char ***argv);
bool Should_Skip_Decryption();
std::string Get_Intent();
bool Get_Fastboot_Mode();
private:
bool SkipDecryption = false;
bool fastboot_mode = false;
std::string Send_Intent;
};
#endif