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
1 changed files with 2 additions and 1 deletions

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 {