mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-19 20:28:28 +00:00
Avoid hardcode package name
This commit is contained in:
parent
f8395a7dc6
commit
77d8445bfd
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user