From 1faf6cfd9d7d51f4f15796c06370d14d818b9ce5 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 2 Feb 2018 09:31:44 +0100 Subject: [PATCH] Rename the server scrcpy-server.jar The server is built as an APK to simplify the build, but in fact this is a simple jar (it is not even signed). In order to avoid confusion, rename it to .jar, so that users do not try to "adb install" it. Also rename it from "scrcpy" to "scrcpy-server" to distinguish from the client-side. --- Makefile | 4 ++-- app/src/server.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 97e3c5d4..b7639e4b 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,8 @@ build-server: dist: build-server build-app mkdir -p "$(DIST)/$(TARGET_DIR)" - # no need to sign the APK, we dont "install" it - cp server/build/outputs/apk/release/server-release-unsigned.apk "$(DIST)/$(TARGET_DIR)/scrcpy.apk" + # no need to sign the APK, we dont "install" it, this is in fact a simple jar + cp server/build/outputs/apk/release/server-release-unsigned.apk "$(DIST)/$(TARGET_DIR)/scrcpy-server.jar" cp $(APP_BUILD_DIR)/scrcpy "$(DIST)/$(TARGET_DIR)/" dist-zip: dist diff --git a/app/src/server.c b/app/src/server.c index 5660fef9..2c00c45e 100644 --- a/app/src/server.c +++ b/app/src/server.c @@ -7,11 +7,11 @@ #define SOCKET_NAME "scrcpy" process_t push_server(const char *serial) { - const char *apk_path = getenv("SCRCPY_APK"); - if (!apk_path) { - apk_path = "scrcpy.apk"; + const char *server_path = getenv("SCRCPY_SERVER_JAR"); + if (!server_path) { + server_path = "scrcpy-server.jar"; } - return adb_push(serial, apk_path, "/data/local/tmp/scrcpy.apk"); + return adb_push(serial, server_path, "/data/local/tmp/scrcpy-server.jar"); } process_t enable_tunnel(const char *serial, Uint16 local_port) { @@ -29,7 +29,7 @@ process_t start_server(const char *serial, Uint16 max_size, Uint32 bit_rate) { sprintf(bit_rate_string, "%"PRIu32, bit_rate); const char *const cmd[] = { "shell", - "CLASSPATH=/data/local/tmp/scrcpy.apk", + "CLASSPATH=/data/local/tmp/scrcpy-server.jar", "app_process", "/", // unused "com.genymobile.scrcpy.ScrCpyServer",