1
mirror of https://github.com/topjohnwu/Magisk synced 2024-11-13 20:54:12 +01:00

Restore init from backup rather than symlink

Because of course Samsung don't follow AOSP norms.
I mean, why would they?
This commit is contained in:
topjohnwu 2021-02-13 16:43:06 -08:00
parent f88e812b63
commit 501bc9f438

View File

@ -26,9 +26,10 @@ void FirstStageInit::prepare() {
xmkdirs(FSR "/system/bin", 0755);
rename("/init" /* magiskinit */, FSR "/system/bin/init");
symlink("/system/bin/init", FSR "/init");
rename("/.backup/init", "/init");
rename("/.backup", FSR "/.backup");
rename("/overlay.d", FSR "/overlay.d");
xsymlink("/system/bin/init", "/init");
chdir(FSR);
} else {