Fix server debugger for Android >= 9

Add a compilation flag to select the debugger method to use:
 - old: Android < 9
 - new: Android >= 9

See <https://github.com/Genymobile/scrcpy/issues/1187#issuecomment-599075661>
This commit is contained in:
Romain Vimont
2020-03-19 19:15:43 +01:00
parent cd69eb4a4f
commit 902b99174d
4 changed files with 19 additions and 0 deletions

View File

@@ -244,7 +244,13 @@ execute_server(struct server *server, const struct server_params *params) {
"app_process",
#ifdef SERVER_DEBUGGER
# define SERVER_DEBUGGER_PORT "5005"
# ifdef SERVER_DEBUGGER_METHOD_NEW
/* Android 9 and above */
"-XjdwpProvider:internal -XjdwpOptions:transport=dt_socket,suspend=y,server=y,address="
# else
/* Android 8 and below */
"-agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address="
# endif
SERVER_DEBUGGER_PORT,
#endif
"/", // unused