]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
AOSP: e2fsdroid and mke2fs are dynamic executable in recovery partition
authorJiyong Park <jiyong@google.com>
Wed, 20 Jun 2018 05:21:54 +0000 (14:21 +0900)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Jun 2018 03:51:40 +0000 (23:51 -0400)
The two utilities are now converted to dynamic executables as shared
libraries are supported in recovery mode.

As part of the conversion, shared libraries that are depended from them
are also marked as recovery_available: true.

Bug: 79146551
Test: adb reboot recovery, and select 'Wipe data/factory reset'. The
data partition is formatted and there is no selinux denial.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Change-Id: I22fbc83a4ff0496096efca90721b0db1237c32cd
From AOSP commit: df1f088849ed3336bb4f6f200c29b30682f15948

CleanSpec.mk
contrib/android/Android.bp
contrib/android/Android.mk [deleted file]
lib/blkid/Android.bp
lib/e2p/Android.bp
lib/et/Android.bp
lib/ext2fs/Android.bp
lib/support/Android.bp
misc/Android.bp
misc/Android.mk [deleted file]

index ded4cebf958c6467bc53e10c9c3c28d20f5a9a2e..8331daeb75515a5f2ff66e67c588e5fd7f6b2ddb 100644 (file)
@@ -49,3 +49,4 @@
 # ************************************************
 
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libext2_uuid_intermediates)
+$(call add-clean-step, rm -rf $(TARGET_RECOVERY_OUT)/root/sbin)
index 67844f9864c7c01868662b912b83a27ac1d375f5..b1fd0daa2e1a0df93abd365126e27167775222ed 100644 (file)
@@ -6,6 +6,7 @@
 cc_binary {
     name: "e2fsdroid",
     host_supported: true,
+    recovery_available: true,
     defaults: ["e2fsprogs-defaults"],
 
     srcs: [
diff --git a/contrib/android/Android.mk b/contrib/android/Android.mk
deleted file mode 100644 (file)
index 68d925d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-#########################################################################
-# Build statically linked e2fsdroid for recovery
-e2fsdroid_src_files := \
-        e2fsdroid.c \
-        block_range.c \
-        fsmap.c \
-        block_list.c \
-        base_fs.c \
-        perms.c \
-        basefs_allocator.c \
-
-e2fsdroid_cflags := -W -Wall -Werror -Wno-error=macro-redefined
-
-e2fsdroid_static_libraries := \
-        libext2_com_err \
-        libext2_misc \
-        libcutils \
-        libselinux \
-        libcrypto \
-        libsparse \
-        liblog \
-        libz \
-
-e2fsdroid_whole_static_libraries := \
-        libbase \
-        libext2fs \
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(e2fsdroid_src_files)
-LOCAL_CFLAGS := $(e2fsdroid_cflags)
-LOCAL_WHOLE_STATIC_LIBRARIES := $(e2fsdroid_whole_static_libraries)
-LOCAL_STATIC_LIBRARIES := $(e2fsdroid_static_libraries)
-LOCAL_MODULE := e2fsdroid_static
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-
-include $(BUILD_EXECUTABLE)
-
index 225716cdc81cdc0ead21c4c1bb714e862be61129..5a02736aabe93d623db96c7c26ecbda53d848440 100644 (file)
@@ -3,6 +3,7 @@
 cc_library {
     name: "libext2_blkid",
     host_supported: true,
+    recovery_available: true,
     unique_host_soname: true,
     defaults: ["e2fsprogs-defaults"],
     srcs: [
index 21089d7bf5f168caa2686639d8c7ad43f13cf97a..148a576c4972be47611b6e573cc1b854cf642115 100644 (file)
@@ -3,6 +3,7 @@
 cc_library {
     name: "libext2_e2p",
     host_supported: true,
+    recovery_available: true,
     unique_host_soname: true,
     defaults: ["e2fsprogs-defaults"],
     srcs: [
index 670d8ee44c742f7946270def73ce32bba7742ac5..3414639a74921f3ea5d792253926b839a9c39d7f 100644 (file)
@@ -3,6 +3,7 @@
 cc_library {
     name: "libext2_com_err",
     host_supported: true,
+    recovery_available: true,
     unique_host_soname: true,
     defaults: ["e2fsprogs-defaults"],
     srcs: [
index 06a750eb1243b10b2fdf71705ad56cd2d91d9c5b..5d10d3f73d1d7ebefffd9454152e43917144ce13 100644 (file)
@@ -3,6 +3,7 @@
 cc_library {
     name: "libext2fs",
     host_supported: true,
+    recovery_available: true,
     unique_host_soname: true,
     defaults: ["e2fsprogs-defaults"],
     srcs: [
index 0ddd079352e880b4c4f3886c4f29f298167a0ac9..e986e0eca7a01ca6dadc9094ab8feb33ff4db350 100644 (file)
@@ -3,6 +3,7 @@
 cc_library {
     name: "libext2_quota",
     host_supported: true,
+    recovery_available: true,
     unique_host_soname: true,
     defaults: ["e2fsprogs-defaults"],
     srcs: [
index e73150f807491a975149020864e7ee03515fb647..310c9dc70d3900cb577b2883e8272b76fae509c3 100644 (file)
@@ -5,6 +5,7 @@
 cc_library {
     name: "libext2_misc",
     host_supported: true,
+    recovery_available: true,
     defaults: ["e2fsprogs-defaults"],
 
     target: {
@@ -33,6 +34,7 @@ cc_library {
 cc_binary {
     name: "mke2fs",
     host_supported: true,
+    recovery_available: true,
     defaults: ["e2fsprogs-defaults"],
 
     srcs: [
diff --git a/misc/Android.mk b/misc/Android.mk
deleted file mode 100644 (file)
index c9d0735..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-#########################################################################
-# Build statically linked mke2fs for recovery
-mke2fs_src_files := \
-       mke2fs.c \
-       util.c \
-       mk_hugefiles.c \
-       default_profile.c \
-       create_inode.c \
-
-mke2fs_c_includes := \
-       external/e2fsprogs/e2fsck
-
-mke2fs_cflags := -W -Wall -Werror -Wno-macro-redefined
-
-mke2fs_static_libraries := \
-       libext2_blkid \
-       libext2_uuid \
-       libext2_quota \
-       libext2_com_err \
-       libext2_e2p \
-       libsparse \
-       libz \
-
-mke2fs_whole_static_libraries := \
-       libbase \
-       libext2fs \
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(mke2fs_src_files)
-LOCAL_C_INCLUDES := $(mke2fs_c_includes)
-LOCAL_CFLAGS := $(mke2fs_cflags)
-LOCAL_WHOLE_STATIC_LIBRARIES := $(mke2fs_whole_static_libraries)
-LOCAL_STATIC_LIBRARIES := $(mke2fs_static_libraries)
-LOCAL_MODULE := mke2fs_static
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-
-include $(BUILD_EXECUTABLE)
-