diff --git a/native/src/core/scripting.cpp b/native/src/core/scripting.cpp index 6d8e656b5..15bfcc02e 100644 --- a/native/src/core/scripting.cpp +++ b/native/src/core/scripting.cpp @@ -154,7 +154,7 @@ constexpr char install_script[] = R"EOF( APK=%s log -t Magisk "pm_install: $APK" log -t Magisk "pm_install: $(pm install -g -r $APK 2>&1)" -appops set com.topjohnwu.magisk REQUEST_INSTALL_PACKAGES allow +appops set %s REQUEST_INSTALL_PACKAGES allow rm -f $APK )EOF"; @@ -164,7 +164,7 @@ void install_apk(const char *apk) { .fork = fork_no_orphan }; char cmds[sizeof(install_script) + 4096]; - snprintf(cmds, sizeof(cmds), install_script, apk); + snprintf(cmds, sizeof(cmds), install_script, apk, JAVA_PACKAGE_NAME); exec_command_sync(exec, "/system/bin/sh", "-c", cmds); }