diff --git a/Android.mk b/Android.mk
index 55377755..94b2cd66 100644
--- a/Android.mk
+++ b/Android.mk
@@ -571,23 +571,27 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libaosprecovery
LOCAL_MODULE_TAGS := eng optional
LOCAL_CFLAGS := -std=gnu++0x
-LOCAL_SRC_FILES := adb_install.cpp asn1_decoder.cpp legacy_property_service.cpp set_metadata.cpp tw_atomic.cpp
-LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload libselinux
+LOCAL_SRC_FILES := adb_install.cpp asn1_decoder.cpp legacy_property_service.cpp set_metadata.cpp tw_atomic.cpp installcommand.cpp
+LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload libselinux libminzip
+LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_SHARED_LIBRARIES += libstdc++ libstlport
- LOCAL_C_INCLUDES := bionic external/stlport/stlport
+ LOCAL_C_INCLUDES += bionic external/stlport/stlport
else
LOCAL_SHARED_LIBRARIES += libc++
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
LOCAL_SHARED_LIBRARIES += libmincrypttwrp
- LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
+ LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
LOCAL_SRC_FILES += verifier24/verifier.cpp
LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
else
- LOCAL_SHARED_LIBRARIES += libcrypto
+ LOCAL_SHARED_LIBRARIES += libcrypto libbase
LOCAL_SRC_FILES += verifier.cpp
endif
+ifeq ($(AB_OTA_UPDATER),true)
+ LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
+endif
ifneq ($(BOARD_RECOVERY_BLDRMSG_OFFSET),)
LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOARD_RECOVERY_BLDRMSG_OFFSET)
diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml
index f4344a05..b82aecff 100644
--- a/gui/theme/common/languages/en.xml
+++ b/gui/theme/common/languages/en.xml
@@ -621,7 +621,7 @@
Recovery Commands Complete
Running OpenRecoveryScript
OpenRecoveryScript Complete
- Could not find '{1}' in the zip file.
+ Invalid zip file format!
Checking for MD5 file...
Failed to map file '{1}'
Verifying zip signature...
diff --git a/installcommand.cpp b/installcommand.cpp
new file mode 100644
index 00000000..ba641436
--- /dev/null
+++ b/installcommand.cpp
@@ -0,0 +1,260 @@
+/*
+ * Copyright (C) 2007 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.
+ */
+
+#include
+#include
+#include
+
+#ifdef AB_OTA_UPDATER
+#include