mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-09-11 12:05:42 +00:00
Add debugging method for Android >= 11
Fixes #5346 <https://github.com/Genymobile/scrcpy/issues/5346> PR #5466 <https://github.com/Genymobile/scrcpy/pull/5466> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
9f39a5f2d6
commit
dc82425769
2 changed files with 32 additions and 10 deletions
|
@ -461,17 +461,30 @@ meson setup x -Dserver_debugger=true
|
|||
meson configure x -Dserver_debugger=true
|
||||
```
|
||||
|
||||
Then recompile.
|
||||
Then recompile, and run scrcpy.
|
||||
|
||||
When you start scrcpy, it will start a debugger on port 5005 on the device.
|
||||
For Android < 11, it will start a debugger on port 5005 on the device and wait:
|
||||
Redirect that port to the computer:
|
||||
|
||||
```bash
|
||||
adb forward tcp:5005 tcp:5005
|
||||
```
|
||||
|
||||
In Android Studio, _Run_ > _Debug_ > _Edit configurations..._ On the left, click on
|
||||
`+`, _Remote_, and fill the form:
|
||||
For Android >= 11, first find the listening port:
|
||||
|
||||
```bash
|
||||
adb jdwp
|
||||
# press Ctrl+C to interrupt
|
||||
```
|
||||
|
||||
Then redirect the resulting PID:
|
||||
|
||||
```bash
|
||||
adb forward tcp:5005 jdwp:XXXX # replace XXXX
|
||||
```
|
||||
|
||||
In Android Studio, _Run_ > _Debug_ > _Edit configurations..._ On the left, click
|
||||
on `+`, _Remote_, and fill the form:
|
||||
|
||||
- Host: `localhost`
|
||||
- Port: `5005`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue