From edee8361d75715b9bc020d76fa8f38b005a6e912 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 16 May 2018 13:43:22 -0700 Subject: recovery: add --fsck_unshare_blocks option for adb remount Allow "adb remount" on deduplicated filesystems to reboot into recovery and run e2fsck to undo deduplication. The e2fsck binary is copied from the system partition into tmpfs, and the system partition is unmounted so e2fsck can run safely. Bug: 64109868 Test: recovery with --fsck_unshare_blocks; adb remount Change-Id: I7558749b018b58f3c4339e51a95831dbd5be1ae3 --- Android.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 6aa91ea21..24da8b28a 100644 --- a/Android.mk +++ b/Android.mk @@ -132,6 +132,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := \ adb_install.cpp \ + fsck_unshare_blocks.cpp \ fuse_sdcard_provider.cpp \ install.cpp \ recovery.cpp \ @@ -192,6 +193,13 @@ LOCAL_REQUIRED_MODULES += \ endif endif +# e2fsck is needed for adb remount -R. +ifeq ($(BOARD_EXT4_SHARE_DUP_BLOCKS),true) +ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) +LOCAL_REQUIRED_MODULES += e2fsck_static +endif +endif + ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) LOCAL_REQUIRED_MODULES += \ recovery-persist \ -- cgit v1.2.3