Skip to content

Commit cfe3dc3

Browse files
committed
Add debugging support for APatch
`APatchD` is the log tag of APatch
1 parent 7b62462 commit cfe3dc3

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Diff for: daemon/src/main/jni/logcat.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ void Logcat::ProcessBuffer(struct log_msg *buf) {
226226
shortcut = true;
227227
}
228228
if (verbose_ && (shortcut || buf->id() == log_id::LOG_ID_CRASH || entry.pid == my_pid_ ||
229-
tag == "Dobby"sv || tag == "Magisk"sv || tag == "LSPlant"sv ||
230-
tag == "LSPlt"sv || tag.starts_with("LSPosed"sv) || tag == "SELinux"sv ||
231-
tag.starts_with("zygisk"sv))) [[unlikely]] {
229+
tag == "APatchD"sv || tag == "Dobby"sv || tag == "Magisk"sv ||
230+
tag == "LSPlant"sv || tag == "LSPlt"sv || tag.starts_with("LSPosed"sv) ||
231+
tag == "SELinux"sv || tag.starts_with("zygisk"sv))) [[unlikely]] {
232232
verbose_print_count_ += PrintLogLine(entry, verbose_file_.get());
233233
}
234234
if (entry.pid == my_pid_ && tag == "LSPosedLogcat"sv) [[unlikely]] {

Diff for: magisk-loader/build.gradle.kts

+13
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,19 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
296296
dependsOn(flashKsuTask)
297297
commandLine(adb, "shell", "su", "-c", "/system/bin/svc", "power", "reboot")
298298
}
299+
val flashAPatchTask = task<Exec>("flashAPatch${variantCapped}") {
300+
group = "LSPosed"
301+
dependsOn(pushTask)
302+
commandLine(
303+
adb, "shell", "su", "-c",
304+
"apd module install /data/local/tmp/${zipFileName}"
305+
)
306+
}
307+
task<Exec>("flashAPatchAndReboot${variantCapped}") {
308+
group = "LSPosed"
309+
dependsOn(flashAPatchTask)
310+
commandLine(adb, "shell", "su", "-c", "/system/bin/svc", "power", "reboot")
311+
}
299312
}
300313

301314
afterEvaluate {

0 commit comments

Comments
 (0)