Merge "e2fsdroid and mke2fs are dynamic executable in recovery partition" am: 9b5d4ea20f am: 681ae40d41
am: 4a9c02ed3a
Change-Id: I65837935963edd20fa10d86ed7f3e3545489a1a2
diff --git a/Android.mk b/Android.mk
index 819ad5a..906fcd6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -190,8 +190,8 @@
LOCAL_HAL_STATIC_LIBRARIES := libhealthd
LOCAL_REQUIRED_MODULES := \
- e2fsdroid_static \
- mke2fs_static \
+ e2fsdroid.recovery \
+ mke2fs.recovery \
mke2fs.conf
ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
diff --git a/roots.cpp b/roots.cpp
index 3c811df..06a77c1 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -283,7 +283,7 @@
if (strcmp(v->fs_type, "ext4") == 0) {
static constexpr int kBlockSize = 4096;
std::vector<std::string> mke2fs_args = {
- "/sbin/mke2fs_static", "-F", "-t", "ext4", "-b", std::to_string(kBlockSize),
+ "/system/bin/mke2fs", "-F", "-t", "ext4", "-b", std::to_string(kBlockSize),
};
int raid_stride = v->logical_blk_size / kBlockSize;
@@ -305,13 +305,7 @@
int result = exec_cmd(mke2fs_args);
if (result == 0 && directory != nullptr) {
std::vector<std::string> e2fsdroid_args = {
- "/sbin/e2fsdroid_static",
- "-e",
- "-f",
- directory,
- "-a",
- volume,
- v->blk_device,
+ "/system/bin/e2fsdroid", "-e", "-f", directory, "-a", volume, v->blk_device,
};
result = exec_cmd(e2fsdroid_args);
}
diff --git a/updater/install.cpp b/updater/install.cpp
index dfd2dc3..00a05b8 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -511,8 +511,8 @@
}
if (fs_type == "ext4") {
- const char* mke2fs_argv[] = { "/sbin/mke2fs_static", "-t", "ext4", "-b", "4096",
- location.c_str(), nullptr, nullptr };
+ const char* mke2fs_argv[] = { "/system/bin/mke2fs", "-t", "ext4", "-b", "4096",
+ location.c_str(), nullptr, nullptr };
std::string size_str;
if (size != 0) {
size_str = std::to_string(size / 4096LL);
@@ -525,8 +525,8 @@
return StringValue("");
}
- const char* e2fsdroid_argv[] = { "/sbin/e2fsdroid_static", "-e", "-a", mount_point.c_str(),
- location.c_str(), nullptr };
+ const char* e2fsdroid_argv[] = { "/system/bin/e2fsdroid", "-e", "-a", mount_point.c_str(),
+ location.c_str(), nullptr };
status = exec_cmd(e2fsdroid_argv[0], const_cast<char**>(e2fsdroid_argv));
if (status != 0) {
LOG(ERROR) << name << ": e2fsdroid failed (" << status << ") on " << location;