Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/init/init.cpp b/init/init.cpp
- index 9377f0743..e66ef9e3e 100644
- --- a/init/init.cpp
- +++ b/init/init.cpp
- @@ -795,6 +795,10 @@ int SecondStageMain(int argc, char** argv) {
- if (!SetupMountNamespaces()) {
- PLOG(FATAL) << "SetupMountNamespaces failed";
- }
- +#else
- + if (!SetupFlattenedApexes()) {
- + LOG(INFO) << "SetupFlattenedApexes failed";
- + }
- #endif
- InitializeSubcontext();
- diff --git a/init/mount_namespace.cpp b/init/mount_namespace.cpp
- index 3875adac3..fabf319e3 100644
- --- a/init/mount_namespace.cpp
- +++ b/init/mount_namespace.cpp
- @@ -300,11 +300,16 @@ bool SetupMountNamespaces() {
- return success;
- }
- +bool SetupFlattenedApexes() {
- + return ActivateFlattenedApexesIfPossible();
- +}
- +
- bool SwitchToDefaultMountNamespace() {
- if (IsRecoveryMode()) {
- // we don't have multiple namespaces in recovery mode
- return true;
- }
- +#ifdef DISABLED_FOR_HYBRIS_SUPPORT
- if (default_ns_id != GetMountNamespaceId()) {
- if (setns(default_ns_fd.get(), CLONE_NEWNS) == -1) {
- PLOG(ERROR) << "Failed to switch back to the default mount namespace.";
- @@ -318,6 +323,12 @@ bool SwitchToDefaultMountNamespace() {
- }
- LOG(INFO) << "Switched to default mount namespace";
- +#else
- + if (auto result = MountLinkerConfigForDefaultNamespace(); !result.ok()) {
- + LOG(ERROR) << result.error();
- + return false;
- + }
- +#endif
- return true;
- }
- diff --git a/init/mount_namespace.h b/init/mount_namespace.h
- index c41a449f3..d72736e4d 100644
- --- a/init/mount_namespace.h
- +++ b/init/mount_namespace.h
- @@ -22,6 +22,7 @@ namespace init {
- bool SetupMountNamespaces();
- bool SwitchToDefaultMountNamespace();
- bool SwitchToBootstrapMountNamespaceIfNeeded();
- +bool SetupFlattenedApexes();
- } // namespace init
- } // namespace android
- diff --git a/rootdir/init.rc b/rootdir/init.rc
- index ef388a63d..da44c1b4d 100644
- --- a/rootdir/init.rc
- +++ b/rootdir/init.rc
- @@ -1048,8 +1048,8 @@ service ueventd /system/bin/ueventd
- class core
- critical
- seclabel u:r:ueventd:s0
- - shutdown critical
- #Not used by Mer
- +# shutdown critical
- disabled
- service console /system/bin/sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement