Commit a8478ace authored by topjohnwu's avatar topjohnwu

Use macros

parent 72cf5f3f
......@@ -567,7 +567,7 @@ void startup() {
xmount(NULL, "/", NULL, MS_REMOUNT, NULL);
// Remove some traits of Magisk
unlink("/init.magisk.rc");
unlink(MAGISKRC);
// GSIs will have to override /sbin/adbd with /system/bin/adbd
if (access("/sbin/adbd", F_OK) == 0 && access("/system/bin/adbd", F_OK) == 0) {
......
......@@ -452,7 +452,7 @@ int main(int argc, char *argv[]) {
patch_sepolicy();
// Dump binaries
dump_magiskrc("/init.magisk.rc", 0750);
dump_magiskrc(MAGISKRC, 0750);
dump_magisk("/sbin/magisk", 0755);
patch_socket_name("/sbin/magisk");
rename("/init.bak", "/sbin/magiskinit");
......
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