mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
Allow AVD hacks on release builds
This commit is contained in:
parent
187f583c95
commit
e774408782
@ -223,10 +223,8 @@ mount_root:
|
|||||||
bool is_two_stage = access("/apex", F_OK) == 0;
|
bool is_two_stage = access("/apex", F_OK) == 0;
|
||||||
LOGD("is_two_stage: [%d]\n", is_two_stage);
|
LOGD("is_two_stage: [%d]\n", is_two_stage);
|
||||||
|
|
||||||
#if MAGISK_DEBUG
|
|
||||||
// For API 28 AVD, it uses legacy SAR setup that requires
|
// For API 28 AVD, it uses legacy SAR setup that requires
|
||||||
// special hacks in magiskinit to work properly. We do not
|
// special hacks in magiskinit to work properly.
|
||||||
// necessarily want this enabled in production builds.
|
|
||||||
if (!is_two_stage && config->emulator) {
|
if (!is_two_stage && config->emulator) {
|
||||||
avd_hack = true;
|
avd_hack = true;
|
||||||
// These values are hardcoded for API 28 AVD
|
// These values are hardcoded for API 28 AVD
|
||||||
@ -236,7 +234,6 @@ mount_root:
|
|||||||
setup_block();
|
setup_block();
|
||||||
xmount(blk_info.block_dev, "/vendor", "ext4", MS_RDONLY, nullptr);
|
xmount(blk_info.block_dev, "/vendor", "ext4", MS_RDONLY, nullptr);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return is_two_stage;
|
return is_two_stage;
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,6 @@ void MagiskInit::patch_ro_root() {
|
|||||||
|
|
||||||
xrename("overlay.d", ROOTOVL);
|
xrename("overlay.d", ROOTOVL);
|
||||||
|
|
||||||
#if MAGISK_DEBUG
|
|
||||||
extern bool avd_hack;
|
extern bool avd_hack;
|
||||||
// Handle avd hack
|
// Handle avd hack
|
||||||
if (avd_hack) {
|
if (avd_hack) {
|
||||||
@ -252,7 +251,6 @@ void MagiskInit::patch_ro_root() {
|
|||||||
close(src);
|
close(src);
|
||||||
close(dest);
|
close(dest);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
load_overlay_rc(ROOTOVL);
|
load_overlay_rc(ROOTOVL);
|
||||||
if (access(ROOTOVL "/sbin", F_OK) == 0) {
|
if (access(ROOTOVL "/sbin", F_OK) == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user