update_engine: Use only backuptool_postinstall on Weekly build
Change-Id: Ib8eb87fe58fbb6310c5f3e20b2136885f07df65c
diff --git a/Android.bp b/Android.bp
index be9f44c..92c993b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -291,6 +291,7 @@
"ue_defaults",
"libpayload_consumer_exports",
"libpayload_consumer_defaults",
+ "omni_weekly_build_defaults",
],
}
@@ -300,6 +301,7 @@
"ue_defaults",
"libpayload_consumer_exports_proto-full",
"libpayload_consumer_defaults",
+ "omni_weekly_build_defaults",
],
}
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index 1ada63b..e7804ea 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -181,6 +181,7 @@
EnsureUnmounted();
#ifdef __ANDROID__
+#ifdef USE_WEEKLY_BUILD
// Check the currently installed /system partition to see if it's ever
// been mounted R/W. If it has, we'll run backuptool scripts for it
// since we can safely assume something on the partition has been
@@ -247,6 +248,7 @@
}
utils::UnmountFilesystem(fs_mount_dir_);
+#endif // USE_WEEKLY_BUILD
// In Chromium OS, the postinstall step is allowed to write to the block
// device on the target image, so we don't mark it as read-only and should