Fix updater binary for 7.0
Note: updater is currently not backwards compatible with older trees. Maybe
later...
Change-Id: I3c2a5ef69cfa9005502408f7054e3096a64ba34b
diff --git a/applypatch/Android.mk b/applypatch/Android.mk
index 48eab01..581e53a 100644
--- a/applypatch/Android.mk
+++ b/applypatch/Android.mk
@@ -34,7 +34,7 @@
LOCAL_MODULE := libapplypatch
LOCAL_MODULE_TAGS := eng
LOCAL_C_INCLUDES += bootable/recovery
-LOCAL_STATIC_LIBRARIES += libbase libotafault libmtdutils libmincrypttwrp libbz libz
+LOCAL_STATIC_LIBRARIES += libbase libotafault libmtdutils libcrypto_static libbz libz
include $(BUILD_STATIC_LIBRARY)
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index cc28585..c2fe11b 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -119,7 +119,7 @@
type = MTD;
} else if (pieces[0] == "EMMC") {
type = EMMC;
- } else if (strcmp(magic, "BML") == 0) {
+ } else if (pieces[0] == "BML") {
type = EMMC;
} else {
printf("LoadPartitionContents called with bad filename (%s)\n", filename);
@@ -127,7 +127,7 @@
}
const char* partition = pieces[1].c_str();
- if (strcmp(magic, "BML") == 0) {
+ if (pieces[0] == "BML") {
if (strcmp(partition, "boot") == 0) {
partition = BOARD_BML_BOOT;
} else if (strcmp(partition, "recovery") == 0) {
@@ -331,7 +331,7 @@
type = MTD;
} else if (pieces[0] == "EMMC") {
type = EMMC;
- } else if (strcmp(magic, "BML") == 0) {
+ } else if (pieces[0] == "BML") {
type = EMMC;
} else {
printf("WriteToPartition called with bad target (%s)\n", target);
@@ -340,7 +340,7 @@
const char* partition = pieces[1].c_str();
- if (strcmp(magic, "BML") == 0) {
+ if (pieces[0] == "BML") {
if (strcmp(partition, "boot") == 0) {
partition = BOARD_BML_BOOT;
} else if (strcmp(partition, "recovery") == 0) {