Android Studio 分析物理设备上的 apk

发布于 2025-01-11 09:53:39 字数 750 浏览 6 评论 0原文

我需要在 Android Studio 中以调试模式分析发布 APK。 当我使用模拟器时,Android Studio 会安装 APK 并成功附加到可调试进程。

在这个特定的场景中,我需要使用物理设备(来调试网络流量),当我尝试在我的 OnePlus GM1900 上运行 APK 时,应用程序会安装、运行(我可以立即使用它),但 android studio 不能t 连接到远程进程。

日志

$ adb shell am start -n "com.xyz.mr/com.xyz.mr.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.xyz.mr | com.xyz.mr
Waiting for application to come online: com.xyz.mr | com.xyz.mr
........
........
........
Could not connect to remote process. Aborting debug session.
Timed out waiting for process (com.xyz.mr) to appear on oneplus-gm1900-1234567.

因为它正在模拟器上运行,所以我有点迷失了...... 是因为一加做了屎吗?或者这是一种常见的行为? 太感谢了 !

I need to profile a release APK in debug mode inside Android Studio.
When I use an emulator, Android Studio installs the APK and succeed to attach to the debuggable process.

In this particular scenario, I need to use a physical device (to debug network traffic) and when I try to run the APK on my OnePlus GM1900, the app installs, run (I can use it right away), but android studio can't connect to the remote process.

Logs

$ adb shell am start -n "com.xyz.mr/com.xyz.mr.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.xyz.mr | com.xyz.mr
Waiting for application to come online: com.xyz.mr | com.xyz.mr
........
........
........
Could not connect to remote process. Aborting debug session.
Timed out waiting for process (com.xyz.mr) to appear on oneplus-gm1900-1234567.

Because it's working on the emulator, I'm kind of lost...
Is it because OnePlus did shit ? Or is it a common behavior ?
Thank you so much !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文