mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-28 11:49:10 +00:00
Use flags for adb commands
Explicitly indicate, for each adb call, if stdout and stderr must be inherited. PR #2827 <https://github.com/Genymobile/scrcpy/pull/2827>
This commit is contained in:
parent
f801d8b312
commit
e3d4aa8c5d
5 changed files with 60 additions and 36 deletions
|
@ -112,7 +112,7 @@ push_server(struct sc_intr *intr, const char *serial) {
|
|||
free(server_path);
|
||||
return false;
|
||||
}
|
||||
bool ok = adb_push(intr, serial, server_path, SC_DEVICE_SERVER_PATH);
|
||||
bool ok = adb_push(intr, serial, server_path, SC_DEVICE_SERVER_PATH, 0);
|
||||
free(server_path);
|
||||
return ok;
|
||||
}
|
||||
|
@ -234,7 +234,8 @@ execute_server(struct sc_server *server,
|
|||
// Port: 5005
|
||||
// Then click on "Debug"
|
||||
#endif
|
||||
pid = adb_execute(params->serial, cmd, count);
|
||||
// Inherit both stdout and stderr (all server logs are printed to stdout)
|
||||
pid = adb_execute(params->serial, cmd, count, 0);
|
||||
|
||||
end:
|
||||
for (unsigned i = dyn_idx; i < count; ++i) {
|
||||
|
@ -482,7 +483,7 @@ sc_server_fill_serial(struct sc_server *server) {
|
|||
// device/emulator" error)
|
||||
if (!server->params.serial) {
|
||||
// The serial is owned by sc_server_params, and will be freed on destroy
|
||||
server->params.serial = adb_get_serialno(&server->intr);
|
||||
server->params.serial = adb_get_serialno(&server->intr, 0);
|
||||
if (!server->params.serial) {
|
||||
LOGE("Could not get device serial");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue