You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 14/15模拟器中系统应用JDWP调试功能异常

Android 14/15模拟器JDWP连接失败问题

尝试在Android 14和Android 15模拟器中对com.android.phone等系统应用进行交互式调试时,无法通过JDWP建立连接。

主机配置

Ubuntu 22.04.5 LTS
Linux 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Android 14模拟器调试异常

执行adb jdwp会无限挂起,尝试连接时出现以下错误:

$ adb shell getprop | grep ro.build.fingerprint
[ro.build.fingerprint]: [Android/sdk_phone64_x86_64/emu64x:14/UE1A.230829.036.A1/11228894:userdebug/test-keys]

$ adb forward --remove-all

$ adb forward tcp:5005 jdwp:1161

$ adb forward --list
emulator-5554 tcp:5005 jdwp:1161

$ adb jdwp
... hangs forever ...

$ jdb -attach localhost:5005
java.io.IOException: handshake failed - connection prematurally closed
    at com.sun.tools.jdi.SocketTransportService.handshake(SocketTransportService.java:136)
    at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:232)
    at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:116)
    at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:90)
    at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:519)
    at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:328)
    at com.sun.tools.example.debug.tty.Env.init(Env.java:63)
    at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1083)

Fatal error:
Unable to attach to target VM.

Android 13模拟器调试正常

执行相同命令可正常工作:

$ adb shell getprop | grep ro.build.fingerprint
[ro.build.fingerprint]: [Android/sdk_phone64_x86_64/emulator64_x86_64:13/TE1A.220922.034/10940250:userdebug/test-keys]

$ adb forward --remove-all

$ adb forward tcp:5005 jdwp:961

$ adb forward --list
emulator-5554 tcp:5005 jdwp:961

$ adb jdwp
603
... etc ...

$ jdb -attach localhost:5005
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
Initializing jdb ...
>

内容的提问来源于stack exchange,提问作者satur9nine

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 04:42:13