Update Android 11 emulator support

This commit is contained in:
topjohnwu
2020-07-27 03:32:54 -07:00
parent 0ed524f173
commit 7fc9b908d4
2 changed files with 45 additions and 15 deletions

View File

@@ -79,6 +79,13 @@ void restorecon() {
}
void restore_tmpcon() {
if (MAGISKTMP == "/system/bin") {
// Running with emulator.sh
if (SDK_INT >= 26)
lsetfilecon("/system/bin/magisk", EXEC_CON);
return;
}
if (MAGISKTMP == "/sbin")
setfilecon(MAGISKTMP.data(), ROOT_CON);
else