From 7a9e6d2ad2d9f533e675928723762cb7c93859e1 Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Wed, 25 Jan 2023 17:54:13 +0800 Subject: [PATCH] Remove unexpected /sbin/overlay.d --- native/src/init/rootdir.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/native/src/init/rootdir.cpp b/native/src/init/rootdir.cpp index bb495777c..9cf64b749 100644 --- a/native/src/init/rootdir.cpp +++ b/native/src/init/rootdir.cpp @@ -277,11 +277,9 @@ void MagiskInit::patch_rw_root() { link_path("/sbin", "/root"); // Handle overlays - if (access("/overlay.d", F_OK) == 0) { - LOGD("Merge overlay.d\n"); - load_overlay_rc("/overlay.d"); - mv_path("/overlay.d", "/"); - } + load_overlay_rc("/overlay.d"); + mv_path("/overlay.d", "/"); + rm_rf("/data/overlay.d"); rm_rf("/.backup"); // Patch init.rc