Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小米手机无法获取进程ID问题及解决方案 #22

Open
huhust opened this issue Oct 31, 2018 · 5 comments
Open

小米手机无法获取进程ID问题及解决方案 #22

huhust opened this issue Oct 31, 2018 · 5 comments

Comments

@huhust
Copy link

huhust commented Oct 31, 2018

image

问题在于这个adb命令获取的是MIUI桌面的activity 的PID

试了下 adb shell dumpsys activity top | findstr com.tencent.mm,可以拿到,可以考虑针对这种情况优化一下获取PID的策略

@metoto
Copy link

metoto commented Nov 2, 2018

对,我是在下一步_fetchWeixinToolsProcessPid里再进行一遍处理,原理差不多,都是要再拿进程关键字去找,因为包括小米,华为等手机都有自己的UI线程在激活状态,无法确保该命令的唯一返回。

@Jaggerer
Copy link
Collaborator

能否提供一下手机的型号,以及rom的版本

@huhust
Copy link
Author

huhust commented Nov 15, 2018

小米6 MIUI9.6稳定版本

@Jaggerer
Copy link
Collaborator

小米6 MIUI9.6稳定版本

你说adb shell dumpsys activity top | findstr com.tencent.mm可以拿到,是指adb shell dumpsys activity top 命令既拿到了UI桌面的activity,又拿到了微信webview的activity?能否提供一下adb shell dumpsys activity top的信息呢

@crazymanpj
Copy link

小米6 MIUI9.6稳定版本

你说adb shell dumpsys activity top | findstr com.tencent.mm可以拿到,是指adb shell dumpsys activity top 命令既拿到了UI桌面的activity,又拿到了微信webview的activity?能否提供一下adb shell dumpsys activity top的信息呢

我也遇到这个问题,获取的信息如下,建议兼容处理一下就好
ACTIVITY com.android.systemui/.recents.RecentsActivity cfd8db0 pid=1926
ACTIVITY com.miui.home/.launcher.Launcher a1809cc pid=2835
ACTIVITY com.tencent.mm/.plugin.appbrand.ui.AppBrandUI 1409efd pid=1610

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

No branches or pull requests

4 participants