Make this work for block-based OTA updates
As it was previously, the OTA updater was failing because the comparison was exact, instead of the string being scanned for UPDATE_PACKAGE.
The patch can be tested by going through a block-based OTA update process (ie, either MIUI OTA, or an AOSP ROM with block-based OTA updates).
Change-Id: I5e6e585327d4653381b1fcdf802656193427ab2f
diff --git a/startupArgs.cpp b/startupArgs.cpp
index 01b1955..5d19dc2 100755
--- a/startupArgs.cpp
+++ b/startupArgs.cpp
@@ -34,7 +34,7 @@
android::base::SetProperty("sys.usb.config", "fastboot");
DataManager::SetValue("tw_enable_adb", 0);
DataManager::SetValue("tw_enable_fastboot", 1);
- } else if (args[index] == UPDATE_PACKAGE) {
+ } else if (args[index].find(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) {
@@ -78,4 +78,4 @@
bool startupArgs::Get_Fastboot_Mode() {
return fastboot_mode;
-}
\ No newline at end of file
+}