From e49a9e527a51f43db792263bb60bfc91293848da Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 19 May 2015 11:33:18 -0700 Subject: Stop using libstdc++. These are already getting libc++, so it isn't necessary. If any of the other static libraries (such as adb) use new or delete from libc++, there will be symbol collisions. Change-Id: I55e43ec60006d3c2403122fa1174bde06f18e09f --- Android.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 0484065a1..3bcbeab03 100644 --- a/Android.mk +++ b/Android.mk @@ -76,7 +76,6 @@ LOCAL_STATIC_LIBRARIES := \ libcutils \ liblog \ libselinux \ - libstdc++ \ libm \ libc @@ -119,7 +118,6 @@ LOCAL_STATIC_LIBRARIES := \ libminui \ libminzip \ libcutils \ - libstdc++ \ libc include $(BUILD_EXECUTABLE) -- cgit v1.2.3 From 80e46e08de5f65702fa7f7cd3ef83f905d919bbc Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 3 Jun 2015 10:49:29 -0700 Subject: recovery: Switch to clang And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65 --- Android.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 3bcbeab03..cfe303082 100644 --- a/Android.mk +++ b/Android.mk @@ -14,11 +14,10 @@ LOCAL_PATH := $(call my-dir) - include $(CLEAR_VARS) LOCAL_SRC_FILES := fuse_sideload.c - +LOCAL_CLANG := true LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE @@ -54,6 +53,7 @@ RECOVERY_API_VERSION := 3 RECOVERY_FSTAB_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) LOCAL_CFLAGS += -Wno-unused-parameter +LOCAL_CLANG := true LOCAL_C_INCLUDES += \ system/vold \ @@ -97,6 +97,7 @@ include $(BUILD_EXECUTABLE) # All the APIs for testing include $(CLEAR_VARS) +LOCAL_CLANG := true LOCAL_MODULE := libverifier LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := \ @@ -104,6 +105,7 @@ LOCAL_SRC_FILES := \ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) +LOCAL_CLANG := true LOCAL_MODULE := verifier_test LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_MODULE_TAGS := tests -- cgit v1.2.3 From 71dc365f25676cfb3f62dbb7163697a8c3c5243d Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sun, 19 Jul 2015 08:40:37 -0700 Subject: recovery: Switch fuse_* to C++. Change-Id: I68770ad1a9e99caee292f8010cfd37dfea3acc64 --- Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index cfe303082..74e7b1da5 100644 --- a/Android.mk +++ b/Android.mk @@ -16,7 +16,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_SRC_FILES := fuse_sideload.c +LOCAL_SRC_FILES := fuse_sideload.cpp LOCAL_CLANG := true LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE @@ -33,7 +33,7 @@ LOCAL_SRC_FILES := \ asn1_decoder.cpp \ bootloader.cpp \ device.cpp \ - fuse_sdcard_provider.c \ + fuse_sdcard_provider.cpp \ install.cpp \ recovery.cpp \ roots.cpp \ -- cgit v1.2.3 From 0d4e002670064157aa34ba8c391184151b7d402a Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sun, 19 Jul 2015 08:40:37 -0700 Subject: recovery: Switch fuse_* to C++. Change-Id: Id50c3e6febd0ab61f10a654b9b265cf21a2d1701 (cherry picked from commit 71dc365f25676cfb3f62dbb7163697a8c3c5243d) --- Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index cfe303082..74e7b1da5 100644 --- a/Android.mk +++ b/Android.mk @@ -16,7 +16,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_SRC_FILES := fuse_sideload.c +LOCAL_SRC_FILES := fuse_sideload.cpp LOCAL_CLANG := true LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE @@ -33,7 +33,7 @@ LOCAL_SRC_FILES := \ asn1_decoder.cpp \ bootloader.cpp \ device.cpp \ - fuse_sdcard_provider.c \ + fuse_sdcard_provider.cpp \ install.cpp \ recovery.cpp \ roots.cpp \ -- cgit v1.2.3 From 337db14f274fc73dd540aa71d2c21c431fe686ec Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 20 Aug 2015 14:52:57 -0700 Subject: recovery: Factor out wear_ui.{cpp,h} into bootable/recovery. Every watch has a (mostly identical) copy of the wear_ui. Factor them out into a single copy for easier maintenance. Device-specific settings should be defined in recovery_ui.cpp that inherits WearRecoveryUI class. Bug: 22451422 Change-Id: Id07efca37d1b1d330e6327506c7b73ccf6ae9241 --- Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 0484065a1..b31f73017 100644 --- a/Android.mk +++ b/Android.mk @@ -41,6 +41,7 @@ LOCAL_SRC_FILES := \ screen_ui.cpp \ ui.cpp \ verifier.cpp \ + wear_ui.cpp \ LOCAL_MODULE := recovery -- cgit v1.2.3 From f68351209f25ac92d12deb827e6efb5400052ac2 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 27 Oct 2015 21:53:18 -0700 Subject: recovery: Depend on mkfs.f2fs only if needed. Don't build mkfs.f2fs unless device defines TARGET_USERIMAGES_USE_F2FS. Change-Id: Ifac592c30315bbe7590c8fbf3a0844e6a7a31a1a --- Android.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 74e7b1da5..4ffa5c9de 100644 --- a/Android.mk +++ b/Android.mk @@ -45,9 +45,11 @@ LOCAL_MODULE := recovery LOCAL_FORCE_STATIC_EXECUTABLE := true +ifeq ($(TARGET_USERIMAGES_USE_F2FS),true) ifeq ($(HOST_OS),linux) LOCAL_REQUIRED_MODULES := mkfs.f2fs endif +endif RECOVERY_API_VERSION := 3 RECOVERY_FSTAB_VERSION := 2 -- cgit v1.2.3 From 7101b2e2854985727b7ef65e5b5057e0ecf2d034 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 3 Jun 2015 10:49:29 -0700 Subject: recovery: Switch to clang And a few trival fixes to suppress warnings. Change-Id: Id28e3581aaca4bda59826afa80c0c1cdfb0442fc (cherry picked from commit 80e46e08de5f65702fa7f7cd3ef83f905d919bbc) --- Android.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index b31f73017..ac1ef83d8 100644 --- a/Android.mk +++ b/Android.mk @@ -14,11 +14,10 @@ LOCAL_PATH := $(call my-dir) - include $(CLEAR_VARS) LOCAL_SRC_FILES := fuse_sideload.c - +LOCAL_CLANG := true LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE @@ -55,6 +54,7 @@ RECOVERY_API_VERSION := 3 RECOVERY_FSTAB_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) LOCAL_CFLAGS += -Wno-unused-parameter +LOCAL_CLANG := true LOCAL_C_INCLUDES += \ system/vold \ @@ -99,6 +99,7 @@ include $(BUILD_EXECUTABLE) # All the APIs for testing include $(CLEAR_VARS) +LOCAL_CLANG := true LOCAL_MODULE := libverifier LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := \ @@ -106,6 +107,7 @@ LOCAL_SRC_FILES := \ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) +LOCAL_CLANG := true LOCAL_MODULE := verifier_test LOCAL_FORCE_STATIC_EXECUTABLE := true LOCAL_MODULE_TAGS := tests -- cgit v1.2.3 From 56deefba73fb318ba0498da49adc64de960a6e29 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 19 May 2015 11:33:18 -0700 Subject: Stop using libstdc++. These are already getting libc++, so it isn't necessary. If any of the other static libraries (such as adb) use new or delete from libc++, there will be symbol collisions. Change-Id: I55e43ec60006d3c2403122fa1174bde06f18e09f (cherry picked from commit e49a9e527a51f43db792263bb60bfc91293848da) --- Android.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index ac1ef83d8..e43d55f66 100644 --- a/Android.mk +++ b/Android.mk @@ -77,7 +77,6 @@ LOCAL_STATIC_LIBRARIES := \ libcutils \ liblog \ libselinux \ - libstdc++ \ libm \ libc @@ -122,7 +121,6 @@ LOCAL_STATIC_LIBRARIES := \ libminui \ libminzip \ libcutils \ - libstdc++ \ libc include $(BUILD_EXECUTABLE) -- cgit v1.2.3 From 1171d3a12b13ca3f1d4301985cf068076e55ae26 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 5 Dec 2015 21:21:27 -0800 Subject: Add update_verifier for A/B OTA update. update_verifier checks the integrity of the updated system and vendor partitions on the first boot post an A/B OTA update. It marks the current slot as having booted successfully if it passes the verification. This CL doesn't perform any actual verification work which will be addressed in follow-up CLs. Bug: 26039641 Change-Id: Ia5504ed25b799b48b5886c2fc68073a360127f42 --- Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index e43d55f66..c2896f3fc 100644 --- a/Android.mk +++ b/Android.mk @@ -134,4 +134,5 @@ include $(LOCAL_PATH)/minui/Android.mk \ $(LOCAL_PATH)/edify/Android.mk \ $(LOCAL_PATH)/uncrypt/Android.mk \ $(LOCAL_PATH)/updater/Android.mk \ + $(LOCAL_PATH)/update_verifier/Android.mk \ $(LOCAL_PATH)/applypatch/Android.mk -- cgit v1.2.3 From 7197ee0e39bebea3a1bbe5d980f4dbf1cfe58136 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 5 Dec 2015 21:21:27 -0800 Subject: Add update_verifier for A/B OTA update. update_verifier checks the integrity of the updated system and vendor partitions on the first boot post an A/B OTA update. It marks the current slot as having booted successfully if it passes the verification. This CL doesn't perform any actual verification work which will be addressed in follow-up CLs. Bug: 26039641 Change-Id: Ia5504ed25b799b48b5886c2fc68073a360127f42 (cherry picked from commit 1171d3a12b13ca3f1d4301985cf068076e55ae26) --- Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 22e78027e..602a85673 100644 --- a/Android.mk +++ b/Android.mk @@ -136,4 +136,5 @@ include $(LOCAL_PATH)/minui/Android.mk \ $(LOCAL_PATH)/edify/Android.mk \ $(LOCAL_PATH)/uncrypt/Android.mk \ $(LOCAL_PATH)/updater/Android.mk \ + $(LOCAL_PATH)/update_verifier/Android.mk \ $(LOCAL_PATH)/applypatch/Android.mk -- cgit v1.2.3 From f1fc48c6e62cfee42d25ad12f443e22d50c15d0b Mon Sep 17 00:00:00 2001 From: Jed Estep Date: Tue, 15 Dec 2015 16:04:53 -0800 Subject: IO fault injection for OTA packages Bug: 25951086 Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c --- Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 602a85673..13fc04bcc 100644 --- a/Android.mk +++ b/Android.mk @@ -135,6 +135,7 @@ include $(LOCAL_PATH)/minui/Android.mk \ $(LOCAL_PATH)/tools/Android.mk \ $(LOCAL_PATH)/edify/Android.mk \ $(LOCAL_PATH)/uncrypt/Android.mk \ + $(LOCAL_PATH)/otafault/Android.mk \ $(LOCAL_PATH)/updater/Android.mk \ $(LOCAL_PATH)/update_verifier/Android.mk \ $(LOCAL_PATH)/applypatch/Android.mk -- cgit v1.2.3 From 432918603f57de5a3acc6da9ff613d21c857d9fd Mon Sep 17 00:00:00 2001 From: Jed Estep Date: Wed, 3 Feb 2016 17:02:09 -0800 Subject: Refactor existing tests to use gtest Bug: 26962907 Change-Id: I5f80636af1740badeff7d08193f08e23f4e4fee1 --- Android.mk | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 602a85673..a48980fe8 100644 --- a/Android.mk +++ b/Android.mk @@ -104,28 +104,10 @@ LOCAL_CLANG := true LOCAL_MODULE := libverifier LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := \ - asn1_decoder.cpp -include $(BUILD_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_CLANG := true -LOCAL_MODULE := verifier_test -LOCAL_FORCE_STATIC_EXECUTABLE := true -LOCAL_MODULE_TAGS := tests -LOCAL_CFLAGS += -Wno-unused-parameter -LOCAL_SRC_FILES := \ - verifier_test.cpp \ asn1_decoder.cpp \ verifier.cpp \ ui.cpp -LOCAL_STATIC_LIBRARIES := \ - libmincrypt \ - libminui \ - libminzip \ - libcutils \ - libc -include $(BUILD_EXECUTABLE) - +include $(BUILD_STATIC_LIBRARY) include $(LOCAL_PATH)/minui/Android.mk \ $(LOCAL_PATH)/minzip/Android.mk \ -- cgit v1.2.3 From 99281df8e2eb6a302ccbcfd790a6889392541264 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 17 Feb 2016 12:21:52 -0800 Subject: recovery: check battery level before installing package. Bug: 26879394 Change-Id: I63dce5bc50c2e104129f1bcab7d3cad5682bf45d (cherry picked from commit 53e7a0628f4acc95481f556ba51800df4a1de37d) --- Android.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 4da34eef5..4477fefe3 100644 --- a/Android.mk +++ b/Android.mk @@ -64,6 +64,7 @@ LOCAL_C_INCLUDES += \ system/core/adb \ LOCAL_STATIC_LIBRARIES := \ + libbatterymonitor \ libext4_utils_static \ libsparse_static \ libminzip \ @@ -77,11 +78,14 @@ LOCAL_STATIC_LIBRARIES := \ libfs_mgr \ libbase \ libcutils \ + libutils \ liblog \ libselinux \ libm \ libc +LOCAL_HAL_STATIC_LIBRARIES := libhealthd + ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) LOCAL_CFLAGS += -DUSE_EXT4 LOCAL_C_INCLUDES += system/extras/ext4_utils -- cgit v1.2.3 From 9020e0f141d1c26dcf8b6fa4212ee94b7891d53f Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Fri, 11 Mar 2016 11:57:10 -0800 Subject: recovery: Move SwipeDetector into common location The SwipeDetector class is used almost unchanged in all locations. This patch moves it into the recovery module, from which devices can reference it if required. The class is now renamed to WearSwipeDetector. Bug: 27407422 Change-Id: Ifd3c7069a287548b89b14ab5d6d2b90a298e0145 --- Android.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 4477fefe3..5b488ca6d 100644 --- a/Android.mk +++ b/Android.mk @@ -41,6 +41,7 @@ LOCAL_SRC_FILES := \ ui.cpp \ verifier.cpp \ wear_ui.cpp \ + wear_touch.cpp \ LOCAL_MODULE := recovery -- cgit v1.2.3 From 13aca598f8e93548fef36d87136e85ce8c9d18de Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 9 Mar 2016 14:58:16 -0800 Subject: recovery: use __android_log_pmsg_file_write for log files (cherry-pick from commit a4f701af93a5a739f34823cde0c493dfbc63537a) - Add call to __android_log_pmsg_file_write for recovery logging. - Add call to refresh pmsg if we reboot back into recovery and then allow overwrite of those logs. - Add a new one-time executable recovery-refresh that refreshes pmsg in post-fs phase of init. We rely on pmsg eventually scrolling off to age the content after recovery-persist has done its job. - Add a new one-time executable recovery-persist that transfers from pmsg to /data/misc/recovery/ directory if /cache is not mounted in post-fs-data phase of init. - Build and appropriately trigger the above two as required if BOARD_CACHEIMAGE_PARTITION_SIZE is undefined. - Add some simple unit tests NB: Test failure is expected on systems that do not deliver either the recovery-persist or recovery-refresh executables, e.g. systems with /cache. Tests also require a timely reboot sequence of test to truly verify, tests provide guidance on stderr to direct. Bug: 27176738 Change-Id: I17bb95980234984f6b2087fd5941b0a3126b706b --- Android.mk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 5b488ca6d..6c3ce5642 100644 --- a/Android.mk +++ b/Android.mk @@ -101,6 +101,30 @@ else LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB) endif +ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) +LOCAL_REQUIRED_MODULES := recovery-persist recovery-refresh +endif + +include $(BUILD_EXECUTABLE) + +# recovery-persist (system partition dynamic executable run after /data mounts) +# =============================== +include $(CLEAR_VARS) +LOCAL_SRC_FILES := recovery-persist.cpp +LOCAL_MODULE := recovery-persist +LOCAL_SHARED_LIBRARIES := liblog libbase +LOCAL_CFLAGS := -Werror +LOCAL_INIT_RC := recovery-persist.rc +include $(BUILD_EXECUTABLE) + +# recovery-refresh (system partition dynamic executable run at init) +# =============================== +include $(CLEAR_VARS) +LOCAL_SRC_FILES := recovery-refresh.cpp +LOCAL_MODULE := recovery-refresh +LOCAL_SHARED_LIBRARIES := liblog +LOCAL_CFLAGS := -Werror +LOCAL_INIT_RC := recovery-refresh.rc include $(BUILD_EXECUTABLE) # All the APIs for testing -- cgit v1.2.3 From 8febafa67e93b2159804b1130a41f15b009de1cd Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 13 Apr 2016 16:39:56 -0700 Subject: Use BoringSSL instead of mincrypt to speed up package verification. This changes the verification code in bootable/recovery to use BoringSSL instead of mincrypt. Cherry-pick of 452df6d99c81c4eeee3d2c7b2171901e8b7bc54a, with merge conflict resolution, extra logging in verifier.cpp, and an increase in the hash chunk size from 4KiB to 1MiB. Bug: http://b/28135231 Change-Id: I1ed7efd52223dd6f6a4629cad187cbc383d5aa84 --- Android.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 6c3ce5642..65d123a86 100644 --- a/Android.mk +++ b/Android.mk @@ -23,7 +23,7 @@ LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE LOCAL_MODULE := libfusesideload -LOCAL_STATIC_LIBRARIES := libcutils libc libmincrypt +LOCAL_STATIC_LIBRARIES := libcutils libc libcrypto_static include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) @@ -71,12 +71,12 @@ LOCAL_STATIC_LIBRARIES := \ libminzip \ libz \ libmtdutils \ - libmincrypt \ libminadbd \ libfusesideload \ libminui \ libpng \ libfs_mgr \ + libcrypto_static \ libbase \ libcutils \ libutils \ @@ -136,6 +136,7 @@ LOCAL_SRC_FILES := \ asn1_decoder.cpp \ verifier.cpp \ ui.cpp +LOCAL_STATIC_LIBRARIES := libcrypto_static include $(BUILD_STATIC_LIBRARY) include $(LOCAL_PATH)/minui/Android.mk \ -- cgit v1.2.3