Use macros

This commit is contained in:
topjohnwu 2018-08-31 03:51:30 -04:00
parent 72cf5f3f9f
commit a8478ace18
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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");