mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-16 23:02:23 -08:00
Move avd_hack boolean out of init class
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <magisk.hpp>
|
||||
#include <base.hpp>
|
||||
#include <selinux.hpp>
|
||||
#include <flags.h>
|
||||
|
||||
#include "init.hpp"
|
||||
|
||||
@@ -244,6 +245,8 @@ void MagiskInit::patch_ro_root() {
|
||||
|
||||
xrename("overlay.d", ROOTOVL);
|
||||
|
||||
#if MAGISK_DEBUG
|
||||
extern bool avd_hack;
|
||||
// Handle avd hack
|
||||
if (avd_hack) {
|
||||
int src = xopen("/init", O_RDONLY | O_CLOEXEC);
|
||||
@@ -256,6 +259,7 @@ void MagiskInit::patch_ro_root() {
|
||||
close(src);
|
||||
close(dest);
|
||||
}
|
||||
#endif
|
||||
|
||||
load_overlay_rc(ROOTOVL);
|
||||
if (access(ROOTOVL "/sbin", F_OK) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user