Skip to content

Commit

Permalink
Add support for installation realme/OPPO OTA
Browse files Browse the repository at this point in the history
Support for '--special_update_package' command from boot message

For example realmeUI 2.0 using this command for boot message to install OTA packages
--special_update_package=/data/ota_package/OTA/.otaPackage/system_vendor_19720.1.3.202108120000042554318_patch

Change-Id: I7d1a49a3e05a439d4c96717c1700dd063f4e55c4
  • Loading branch information
Ctapchuk authored and epicX67 committed Nov 14, 2021
1 parent 0c8fc1a commit 2da4960
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion startupArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bool startupArgs::processRecoveryArgs(std::vector<std::string> args, int index)
android::base::SetProperty("sys.usb.config", "fastboot");
DataManager::SetValue("tw_enable_adb", 0);
DataManager::SetValue("tw_enable_fastboot", 1);
} else if (args[index].find(UPDATE_PACKAGE) != std::string::npos) {
} else if (args[index].find(UPDATE_PACKAGE) != std::string::npos || args[index].find(SPECIAL_UPDATE_PACKAGE) != std::string::npos) {
std::string::size_type eq_pos = args[index].find("=");
std::string arg = args[index].substr(eq_pos + 1, args[index].size());
if (arg.size() == 0) {
Expand Down
1 change: 1 addition & 0 deletions startupArgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
class startupArgs {
public:
static inline std::string const UPDATE_PACKAGE = "--update_package";
static inline std::string const SPECIAL_UPDATE_PACKAGE = "--special_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";
Expand Down

0 comments on commit 2da4960

Please sign in to comment.