scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

adb Debugging using the doc does not work for me

Open Gottox opened this issue 1 year ago • 4 comments

Environment

  • OS: linux
  • Scrcpy version: master
  • Installation method: manual / ./run script
  • Device model: Pixel 6a
  • Android version: GrapheneOS 14

Describe the bug

When I try to run scrcpy in debugging mode, I get the following output, without giving me the opportunity attach the debugger:

./run build -s xxxxxxxxxxxxxx
scrcpy 2.7 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  xxxxxxxxxxxxxx                  device  Pixel_6a
DEBUG: Device serial: xxxxxxxxxxxxxx
DEBUG: Using SCRCPY_SERVER_PATH: build/server/scrcpy-server
build/server/scrcpy-server: 1 file pushed, 0 skipped. 139.8 MB/s (170166 bytes in 0.001s)
INFO: Server debugger waiting for a client on device port 5005...
DEBUG: Interrupting socket
DEBUG: Server disconnected
DEBUG: Server terminated
ERROR: Server connection failed

Am I doing something wrong here?

Gottox avatar Oct 07 '24 06:10 Gottox

I think the "API" to debug has changed again on new Android versions. To be fixed:

https://github.com/Genymobile/scrcpy/blob/665ccb32f5306ebd866dc0d99f4d08ed2aeb91c3/app/src/server.c#L253-L265

(but I don't know what needs to be changed)

rom1v avatar Oct 07 '24 06:10 rom1v

maybe related: #2722

Gottox avatar Oct 07 '24 12:10 Gottox

maybe related:

  • https://stackoverflow.com/questions/54550668/cannot-debug-app-when-using-wrapper-script
  • https://developer.android.com/ndk/guides/wrap-script#packaging_wrapsh

Gottox avatar Oct 07 '24 19:10 Gottox

So at least we know that it has been broken since 2020. I have yet no idea on how to fix it... :/ https://android.googlesource.com/platform/art/+/fc58809f7b932d86234130be15487017dc37b0cf%5E!/#F3

Gottox avatar Oct 07 '24 20:10 Gottox