run service.sh by busybox sh with `ASH_STANDALONE=1` (#1633)

This commit is contained in:
LoveSy 2022-02-05 18:20:34 +08:00 committed by GitHub
parent 9f20d8609f
commit dea13db843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -328,7 +328,7 @@ val pushDaemonNative = task<Exec>("pushDaemonNative") {
val reRunDaemon = task<Exec>("reRunDaemon") {
dependsOn(pushDaemon, pushDaemonNative, killLspd)
// tricky to pass a minus number to avoid the injection warning
commandLine(adb, "shell", "su", "-c", "sh `su -c magisk --path`/.magisk/modules/*_lsposed/service.sh --system-server-max-retry=-1&")
commandLine(adb, "shell", "ASH_STANDALONE=1", "su", "-pc", "/data/adb/magisk/busybox sh /data/adb/modules/*_lsposed/service.sh --system-server-max-retry=-1&")
isIgnoreExitValue = true
}
val tmpApk = "/data/local/tmp/lsp.apk"

View File

@ -810,7 +810,6 @@ public class ConfigManager {
public boolean disableModule(String packageName) {
if (packageName.equals("lspd")) return false;
Log.e(TAG, "disable " + packageName);
boolean changed = executeInTransaction(() -> {
ContentValues values = new ContentValues();
values.put("enabled", 0);