Commit f1295cb7 authored by topjohnwu's avatar topjohnwu

Fix root on Android 7.0 and lower

parent dc61dfbd
...@@ -96,6 +96,8 @@ void restore_tmpcon() { ...@@ -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);
}
} }
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