summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--applypatch/Android.mk2
-rw-r--r--applypatch/applypatch.cpp8
-rw-r--r--mtdutils/mounts.h8
-rw-r--r--mtdutils/mtdutils.h8
-rw-r--r--updater/Android.mk20
5 files changed, 24 insertions, 22 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) {
diff --git a/mtdutils/mounts.h b/mtdutils/mounts.h
index 30b2927c2..d721355b8 100644
--- a/mtdutils/mounts.h
+++ b/mtdutils/mounts.h
@@ -17,6 +17,10 @@
#ifndef MTDUTILS_MOUNTS_H_
#define MTDUTILS_MOUNTS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct MountedVolume MountedVolume;
int scan_mounted_volumes(void);
@@ -30,4 +34,8 @@ int unmount_mounted_volume(const MountedVolume *volume);
int remount_read_only(const MountedVolume* volume);
+#ifdef __cplusplus
+}
+#endif
+
#endif // MTDUTILS_MOUNTS_H_
diff --git a/mtdutils/mtdutils.h b/mtdutils/mtdutils.h
index 6cbf37eec..235cbe7ce 100644
--- a/mtdutils/mtdutils.h
+++ b/mtdutils/mtdutils.h
@@ -19,6 +19,10 @@
#include <sys/types.h> // for size_t, etc.
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct MtdPartition MtdPartition;
int mtd_scan_partitions(void);
@@ -58,4 +62,8 @@ struct MtdPartition {
char *name;
};
+#ifdef __cplusplus
+}
+#endif
+
#endif // MTDUTILS_H_
diff --git a/updater/Android.mk b/updater/Android.mk
index b85fe557c..23ba592a8 100644
--- a/updater/Android.mk
+++ b/updater/Android.mk
@@ -33,27 +33,13 @@ LOCAL_CLANG := true
LOCAL_SRC_FILES := $(updater_src_files)
-LOCAL_STATIC_LIBRARIES += libfec libfec_rs libext4_utils_static libsquashfs_utils libcrypto_static
+LOCAL_STATIC_LIBRARIES += libfec libfec_rs libsquashfs_utils libcrypto_static
ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
LOCAL_CFLAGS += -DUSE_EXT4
LOCAL_CFLAGS += -Wno-unused-parameter
LOCAL_C_INCLUDES += system/extras/ext4_utils
-LOCAL_STATIC_LIBRARIES += \
- libext4_utils \
- libz
-ifneq ($(wildcard system/core/libmincrypt/rsa_e_3.c),)
-LOCAL_STATIC_LIBRARIES = \
- libext4_utils_static \
- libsparse_static \
- libz
-endif
-ifneq ($(wildcard system/core/include/mincrypt/sha256.h),)
-LOCAL_STATIC_LIBRARIES = \
- libext4_utils_static \
- libsparse_static \
- libz
-endif
+LOCAL_STATIC_LIBRARIES += libext4_utils_static libsparse_static
ifneq ($(wildcard external/lz4/Android.mk),)
LOCAL_STATIC_LIBRARIES += liblz4
endif
@@ -62,7 +48,7 @@ endif
LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS)
LOCAL_STATIC_LIBRARIES += libapplypatch libbase libotafault libedify libmtdutils libminzip libz
LOCAL_STATIC_LIBRARIES += libflashutils libmmcutils libbmlutils
-LOCAL_STATIC_LIBRARIES += libmincrypttwrp libbz
+LOCAL_STATIC_LIBRARIES += libbz
LOCAL_STATIC_LIBRARIES += libcutils liblog libc
LOCAL_STATIC_LIBRARIES += libselinux