Skip to content

[platform] fix linux findWmpfProcess to select root process - #271

Merged
evi0s merged 2 commits into
evi0s:mainfrom
GuGuMur:main
Sep 11, 2026
Merged

[platform] fix linux findWmpfProcess to select root process#271
evi0s merged 2 commits into
evi0s:mainfrom
GuGuMur:main

Conversation

@GuGuMur

@GuGuMur GuGuMur commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

在 Linux 微信 4.1.1.4 中,WeChatAppEx 的进程树包含 renderer、GPU、utility、zygote、broker 等子进程,其 PPID 指向各种中间 WeChatAppEx 节点。原有的频率启发式方法会选错,而父进程名检查能正确选中 PID → wechat 的根进程,避免frida.attach() 报 "Process not found" 错误。

修复后在 Ubuntu 22.04,微信 4.1.1.4(14910)可用(同时建议尽快合并#264

Copilot AI lite review requested due to automatic review settings September 6, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new loop does repeated linear parent lookups and depends on the parent process being present in the enumerated list, which can be avoided with a PID set-based root check for better reliability and efficiency.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Linux platform process-selection logic to reliably identify the root WeChatAppEx process in newer WeChat (4.1.1.4) process trees, preventing frida.attach() from targeting a non-root subprocess and failing with “Process not found”.

Changes:

  • Replaces the prior PPID-frequency heuristic with a parent-process-based root selection for WeChatAppEx on Linux.
  • Computes the WMPF version from the selected process’ executable path and returns { pid, version }.
File summaries
File Description
src/platform/linux.ts Updates Linux findWmpfProcess() root PID selection logic for multi-process WeChatAppEx trees.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/platform/linux.ts Outdated
@evi0s

evi0s commented Sep 11, 2026

Copy link
Copy Markdown
Owner

感谢指出,看来 Windows 和 Linux 这边不太一样。Linux 这边还有一个 flatpak 的分发途径可能需要处理一下。我先 merge 你这个 PR 然后再让那边 rebase 一下。感谢🙏

@evi0s
evi0s merged commit 87b3e80 into evi0s:main Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants