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",