Loading init/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,6 @@ cc_library_static { ], whole_static_libs: [ "libcap", "libcom.android.sysprop.apex", "libcom.android.sysprop.init", ], header_libs: ["bootimg_headers"], Loading init/mount_namespace.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ #include <string> #include <vector> #include <ApexProperties.sysprop.h> #include <android-base/file.h> #include <android-base/logging.h> #include <android-base/properties.h> Loading @@ -30,16 +29,6 @@ #include "util.h" #ifndef RECOVERY #define ACTIVATE_FLATTENED_APEX 1 #endif #ifdef ACTIVATE_FLATTENED_APEX #include <apex_manifest.pb.h> #include <com_android_apex.h> #include <selinux/android.h> #endif // ACTIVATE_FLATTENED_APEX namespace android { namespace init { namespace { Loading Loading @@ -77,15 +66,9 @@ static std::string GetMountNamespaceId() { return ret; } static bool IsApexUpdatable() { static bool updatable = android::sysprop::ApexProperties::updatable().value_or(false); return updatable; } // In case we have two sets of APEXes (non-updatable, updatable), we need two separate mount // namespaces. static bool NeedsTwoMountNamespaces() { if (!IsApexUpdatable()) return false; if (IsRecoveryMode()) return false; // In microdroid, there's only one set of APEXes in built-in directories include block devices. if (IsMicrodroid()) return false; Loading Loading @@ -193,7 +176,7 @@ bool SetupMountNamespaces() { // Switch the mount namespace of the current process from bootstrap to default OR from default to // bootstrap. If the current mount namespace is neither bootstrap nor default, keep it that way. Result<void> SwitchToMountNamespaceIfNeeded(MountNamespace target_mount_namespace) { if (IsRecoveryMode() || !IsApexUpdatable()) { if (IsRecoveryMode()) { // we don't have multiple namespaces in recovery mode or if apex is not updatable return {}; } Loading init/service.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ #endif #ifdef INIT_FULL_SOURCES #include <ApexProperties.sysprop.h> #include <android/api-level.h> #include "mount_namespace.h" Loading Loading @@ -323,7 +322,7 @@ void Service::Reap(const siginfo_t& siginfo) { } #if INIT_FULL_SOURCES static bool is_apex_updatable = android::sysprop::ApexProperties::updatable().value_or(false); static bool is_apex_updatable = true; #else static bool is_apex_updatable = false; #endif Loading Loading
init/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,6 @@ cc_library_static { ], whole_static_libs: [ "libcap", "libcom.android.sysprop.apex", "libcom.android.sysprop.init", ], header_libs: ["bootimg_headers"], Loading
init/mount_namespace.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ #include <string> #include <vector> #include <ApexProperties.sysprop.h> #include <android-base/file.h> #include <android-base/logging.h> #include <android-base/properties.h> Loading @@ -30,16 +29,6 @@ #include "util.h" #ifndef RECOVERY #define ACTIVATE_FLATTENED_APEX 1 #endif #ifdef ACTIVATE_FLATTENED_APEX #include <apex_manifest.pb.h> #include <com_android_apex.h> #include <selinux/android.h> #endif // ACTIVATE_FLATTENED_APEX namespace android { namespace init { namespace { Loading Loading @@ -77,15 +66,9 @@ static std::string GetMountNamespaceId() { return ret; } static bool IsApexUpdatable() { static bool updatable = android::sysprop::ApexProperties::updatable().value_or(false); return updatable; } // In case we have two sets of APEXes (non-updatable, updatable), we need two separate mount // namespaces. static bool NeedsTwoMountNamespaces() { if (!IsApexUpdatable()) return false; if (IsRecoveryMode()) return false; // In microdroid, there's only one set of APEXes in built-in directories include block devices. if (IsMicrodroid()) return false; Loading Loading @@ -193,7 +176,7 @@ bool SetupMountNamespaces() { // Switch the mount namespace of the current process from bootstrap to default OR from default to // bootstrap. If the current mount namespace is neither bootstrap nor default, keep it that way. Result<void> SwitchToMountNamespaceIfNeeded(MountNamespace target_mount_namespace) { if (IsRecoveryMode() || !IsApexUpdatable()) { if (IsRecoveryMode()) { // we don't have multiple namespaces in recovery mode or if apex is not updatable return {}; } Loading
init/service.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ #endif #ifdef INIT_FULL_SOURCES #include <ApexProperties.sysprop.h> #include <android/api-level.h> #include "mount_namespace.h" Loading Loading @@ -323,7 +322,7 @@ void Service::Reap(const siginfo_t& siginfo) { } #if INIT_FULL_SOURCES static bool is_apex_updatable = android::sysprop::ApexProperties::updatable().value_or(false); static bool is_apex_updatable = true; #else static bool is_apex_updatable = false; #endif Loading