Make the server unlink itself

To clean up the device, the client executed "adb shell rm" once the
server was guaranteed to be started (after the connection succeeded).

This implied to track whether the installation state, and failed if an
additional tunnel was used in "forward" mode:
<https://github.com/Genymobile/scrcpy/issues/386#issuecomment-453936034>

Instead, make the server unlink itself on start.
This commit is contained in:
Romain Vimont
2019-01-14 21:12:23 +01:00
parent fefb9816a9
commit 39c5e71605
5 changed files with 12 additions and 23 deletions

View File

@@ -135,11 +135,6 @@ process_t adb_install(const char *serial, const char *local) {
return proc;
}
process_t adb_remove_path(const char *serial, const char *path) {
const char *const adb_cmd[] = {"shell", "rm", path};
return adb_execute(serial, adb_cmd, ARRAY_LEN(adb_cmd));
}
SDL_bool process_check_success(process_t proc, const char *name) {
if (proc == PROCESS_NONE) {
LOGE("Could not execute \"%s\"", name);