From fe1439fbacb5e2d7827e952a781001e71686b016 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 28 Oct 2017 16:20:31 +0800 Subject: [PATCH] Support changing su requester package name --- build.py | 10 ---------- java | 2 +- jni/daemon/magisk.c | 5 +++++ jni/su | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/build.py b/build.py index f9fc6d151..683cbcce1 100755 --- a/build.py +++ b/build.py @@ -89,16 +89,6 @@ def build_apk(args): os.chdir('java') - # Build unhide app and place in assets - proc = subprocess.run('{} unhide:assembleRelease'.format(os.path.join('.', 'gradlew')), shell=True) - if proc.returncode != 0: - error('Build Magisk Manager failed!') - source = os.path.join('unhide', 'build', 'outputs', 'apk', 'release', 'unhide-release-unsigned.apk') - target = os.path.join('app', 'src', 'main', 'assets', 'unhide.apk') - cp(source, target) - - print('') - if args.release: if not os.path.exists(os.path.join('..', 'release_signature.jks')): error('Please generate a java keystore and place it in \'release_signature.jks\'') diff --git a/java b/java index 13bf1b27b..4956d826f 160000 --- a/java +++ b/java @@ -1 +1 @@ -Subproject commit 13bf1b27b42dd2f5c4d4152a0c76528c798fa589 +Subproject commit 4956d826fbdbad35645260aa3edb3b746651cceb diff --git a/jni/daemon/magisk.c b/jni/daemon/magisk.c index f9108ec31..cc78fa218 100644 --- a/jni/daemon/magisk.c +++ b/jni/daemon/magisk.c @@ -53,6 +53,7 @@ static void usage() { " --[init service] start init service\n" " --unlock-blocks set BLKROSET flag to OFF for all block devices\n" " --restorecon fix selinux context on Magisk files and folders\n" + " --clone-attr SRC DEST clone permission, owner, and selinux context\n" "\n" "Supported init services:\n" " daemon post-fs, post-fs-data, service\n" @@ -144,6 +145,10 @@ int main(int argc, char *argv[]) { } else if (strcmp(argv[1], "--restorecon") == 0) { fix_filecon(); return 0; + } else if (strcmp(argv[1], "--clone-attr") == 0) { + if (argc < 4) usage(); + clone_attr(argv[2], argv[3]); + return 0; } else if (strcmp(argv[1], "--daemon") == 0) { // Start daemon, this process won't return start_daemon(); diff --git a/jni/su b/jni/su index 6de95e0d9..4335c588f 160000 --- a/jni/su +++ b/jni/su @@ -1 +1 @@ -Subproject commit 6de95e0d9bb6aa3e657a7e1492eed1b632c9f186 +Subproject commit 4335c588fec05f0abefbd930ae39ea96e3b7e6fe