Fix root on Android 7.0 and lower

This commit is contained in:
topjohnwu 2021-01-26 02:16:11 -08:00
parent dc61dfbde6
commit f1295cb7d6

View File

@ -96,6 +96,8 @@ void restore_tmpcon() {
for (dirent *entry; (entry = xreaddir(dir.get()));) for (dirent *entry; (entry = xreaddir(dir.get()));)
setfilecon_at(dfd, entry->d_name, SYSTEM_CON); setfilecon_at(dfd, entry->d_name, SYSTEM_CON);
if (SDK_INT >= 26) {
string magisk = MAGISKTMP + "/magisk"; string magisk = MAGISKTMP + "/magisk";
setfilecon(magisk.data(), EXEC_CON); setfilecon(magisk.data(), EXEC_CON);
} }
}