summaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-08-31 20:42:11 +0200
committerEthan Yonker <dees_troy@teamw.in>2016-08-31 20:42:13 +0200
commitb8e985c6a29dff748a44ffc9a142c8244ae18099 (patch)
tree65d8042da094e840dd8f44b6959c3b0fc7b1b934 /applypatch
parenttwrp: Use the correct lib name (diff)
downloadandroid_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.tar
android_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.tar.gz
android_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.tar.bz2
android_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.tar.lz
android_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.tar.xz
android_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.tar.zst
android_bootable_recovery-b8e985c6a29dff748a44ffc9a142c8244ae18099.zip
Diffstat (limited to 'applypatch')
-rw-r--r--applypatch/Android.mk2
-rw-r--r--applypatch/applypatch.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/applypatch/Android.mk b/applypatch/Android.mk
index 48eab014e..581e53aa1 100644
--- a/applypatch/Android.mk
+++ b/applypatch/Android.mk
@@ -34,7 +34,7 @@ LOCAL_SRC_FILES := applypatch.cpp bspatch.cpp freecache.cpp imgpatch.cpp utils.c
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 cc2858551..c2fe11b3b 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -119,7 +119,7 @@ static int LoadPartitionContents(const char* filename, FileContents* file) {
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 @@ static int LoadPartitionContents(const char* filename, FileContents* file) {
}
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 @@ int WriteToPartition(const unsigned char* data, size_t len, const char* target)
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 @@ int WriteToPartition(const unsigned char* data, size_t len, const char* target)
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) {