Prevent bootloop on non system-as-root devices

Close #1058
This commit is contained in:
topjohnwu 2019-02-10 13:51:41 -05:00
parent 8a5b6f2b86
commit 228351fc13

View File

@ -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