Android Studio 分析物理设备上的 apk
我需要在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论