Skip to content

Commit

Permalink
Add debugging support for APatch
Browse files Browse the repository at this point in the history
`APatchD` is the log tag of APatch
  • Loading branch information
JingMatrix committed Dec 30, 2024
1 parent 7b62462 commit cfe3dc3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/src/main/jni/logcat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ void Logcat::ProcessBuffer(struct log_msg *buf) {
shortcut = true;
}
if (verbose_ && (shortcut || buf->id() == log_id::LOG_ID_CRASH || entry.pid == my_pid_ ||
tag == "Dobby"sv || tag == "Magisk"sv || tag == "LSPlant"sv ||
tag == "LSPlt"sv || tag.starts_with("LSPosed"sv) || tag == "SELinux"sv ||
tag.starts_with("zygisk"sv))) [[unlikely]] {
tag == "APatchD"sv || tag == "Dobby"sv || tag == "Magisk"sv ||
tag == "LSPlant"sv || tag == "LSPlt"sv || tag.starts_with("LSPosed"sv) ||
tag == "SELinux"sv || tag.starts_with("zygisk"sv))) [[unlikely]] {
verbose_print_count_ += PrintLogLine(entry, verbose_file_.get());
}
if (entry.pid == my_pid_ && tag == "LSPosedLogcat"sv) [[unlikely]] {
Expand Down
13 changes: 13 additions & 0 deletions magisk-loader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,19 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
dependsOn(flashKsuTask)
commandLine(adb, "shell", "su", "-c", "/system/bin/svc", "power", "reboot")
}
val flashAPatchTask = task<Exec>("flashAPatch${variantCapped}") {
group = "LSPosed"
dependsOn(pushTask)
commandLine(
adb, "shell", "su", "-c",
"apd module install /data/local/tmp/${zipFileName}"
)
}
task<Exec>("flashAPatchAndReboot${variantCapped}") {
group = "LSPosed"
dependsOn(flashAPatchTask)
commandLine(adb, "shell", "su", "-c", "/system/bin/svc", "power", "reboot")
}
}

afterEvaluate {
Expand Down

0 comments on commit cfe3dc3

Please sign in to comment.