Commit 228351fc authored by topjohnwu's avatar topjohnwu

Prevent bootloop on non system-as-root devices

Close #1058
parent 8a5b6f2b
...@@ -503,7 +503,7 @@ int main(int argc, char *argv[]) { ...@@ -503,7 +503,7 @@ int main(int argc, char *argv[]) {
excl_list = nullptr; excl_list = nullptr;
} else { } else {
// Revert original init binary // Revert original init binary
link("/.backup/init", "/init"); rename("/.backup/init", "/init");
rm_rf("/.backup"); rm_rf("/.backup");
// Do not go further if device is booting into recovery // Do not go further if device is booting into recovery
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment