Add support for installation realme/OPPO OTA
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
diff --git a/startupArgs.cpp b/startupArgs.cpp
index f385e27..bf74f87 100755
--- a/startupArgs.cpp
+++ b/startupArgs.cpp
@@ -51,7 +51,7 @@
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) {
diff --git a/startupArgs.hpp b/startupArgs.hpp
index d388f55..006a5fb 100755
--- a/startupArgs.hpp
+++ b/startupArgs.hpp
@@ -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";