mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Only try to install APK when no manager is active
This commit is contained in:
parent
1232113772
commit
7ff22c68c7
@ -363,17 +363,18 @@ void boot_complete(int client) {
|
|||||||
if (pfs_done)
|
if (pfs_done)
|
||||||
auto_start_magiskhide();
|
auto_start_magiskhide();
|
||||||
|
|
||||||
if (access(MANAGERAPK, F_OK) == 0) {
|
if (!check_manager()) {
|
||||||
// Install Magisk Manager if exists
|
if (access(MANAGERAPK, F_OK) == 0) {
|
||||||
rename(MANAGERAPK, "/data/magisk.apk");
|
// Only try to install APK when no manager is installed
|
||||||
install_apk("/data/magisk.apk");
|
// Magisk Manager should be upgraded by itself, not through recovery installs
|
||||||
} else {
|
rename(MANAGERAPK, "/data/magisk.apk");
|
||||||
// Check whether we have manager installed
|
install_apk("/data/magisk.apk");
|
||||||
if (!check_manager()) {
|
} else {
|
||||||
// Install stub
|
// Install stub
|
||||||
auto init = MAGISKTMP + "/magiskinit";
|
auto init = MAGISKTMP + "/magiskinit";
|
||||||
exec_command_sync(init.data(), "-x", "manager", "/data/magisk.apk");
|
exec_command_sync(init.data(), "-x", "manager", "/data/magisk.apk");
|
||||||
install_apk("/data/magisk.apk");
|
install_apk("/data/magisk.apk");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unlink(MANAGERAPK);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user