Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package scrcpy for openSUSE:Factory checked in at 2025-12-18 18:32:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/scrcpy (Old) and /work/SRC/openSUSE:Factory/.scrcpy.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "scrcpy" Thu Dec 18 18:32:31 2025 rev:3 rq:1323411 version:3.3.4 Changes: -------- --- /work/SRC/openSUSE:Factory/scrcpy/scrcpy.changes 2025-09-30 17:41:25.354817591 +0200 +++ /work/SRC/openSUSE:Factory/.scrcpy.new.1928/scrcpy.changes 2025-12-18 18:34:57.446448403 +0100 @@ -1,0 +2,12 @@ +Wed Dec 17 19:45:02 UTC 2025 - [email protected] + +- Update to version 3.3.4: + * Fix permission denial error after Android upgrade (#6523) + * Fix state restoration on certain devices (#6405, #6540) + * Fix UHID_OUTPUT message parsing (#6415) + * Fix failure when the uniqueId field is missing on certain devices (#6461) + * Fix error log interleaving (#6487) + * Fix startup issue on certain Meizu devices (#6480) + * Fix handling of non-integer ANDROID_PLATFORM in build script (#6408) + +------------------------------------------------------------------- Old: ---- scrcpy-3.3.3.tar.gz New: ---- _service scrcpy-3.3.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scrcpy.spec ++++++ --- /var/tmp/diff_new_pack.zvn1U3/_old 2025-12-18 18:34:57.986471087 +0100 +++ /var/tmp/diff_new_pack.zvn1U3/_new 2025-12-18 18:34:57.990471255 +0100 @@ -21,7 +21,7 @@ the required pre-build %{_datadir}/%{name}/%{name}-server binary. Name: scrcpy -Version: 3.3.3 +Version: 3.3.4 Release: 0 Summary: Display and control your Android device License: Apache-2.0 @@ -36,15 +36,17 @@ Source4: %{name}-update-server BuildRequires: desktop-file-utils BuildRequires: hicolor-icon-theme -BuildRequires: meson >= 0.48 +BuildRequires: meson >= 0.49 BuildRequires: pkgconfig -BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavcodec) >= 57.37 BuildRequires: pkgconfig(libavdevice) -BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavformat) >= 57.33 +BuildRequires: pkgconfig(libavutil) +BuildRequires: pkgconfig(libswresample) BuildRequires: pkgconfig(libusb-1.0) -BuildRequires: pkgconfig(sdl2) -Requires: (curl or wget) +BuildRequires: pkgconfig(sdl2) >= 2.0.5 Requires: android-tools +Requires: (curl or wget) Provides: %{name}-bash-completion = %{version} Obsoletes: %{name}-bash-completion < %{version} Provides: %{name}-zsh-completion = %{version} ++++++ SHA256SUMS.txt ++++++ --- /var/tmp/diff_new_pack.zvn1U3/_old 2025-12-18 18:34:58.034473104 +0100 +++ /var/tmp/diff_new_pack.zvn1U3/_new 2025-12-18 18:34:58.038473272 +0100 @@ -1,7 +1,7 @@ -7e70323ba7f259649dd4acce97ac4fefbae8102b2c6d91e2e7be613fd5354be0 scrcpy-server-v3.3.3 -9b30e813e8191329ba8025dc80cb0f198fb0a318960a3b5c15395cf675c9c638 scrcpy-linux-x86_64-v3.3.3.tar.gz -e3d43e21c0bd6e070381c390c1e4cccd48a1e71ae73a8c217e6e6b8506598c79 scrcpy-win32-v3.3.3.zip -4b458d33d0436688c69875cd267cae6fa8be08aa3c17772edf3a940a3dc4b17e scrcpy-win64-v3.3.3.zip -b93299468f19ae89ac70f7c1453914c41f1f2bcd31f6ab530038da885c19581f scrcpy-macos-aarch64-v3.3.3.tar.gz -c767fc1d41e4ae26e40558656570962f474739924fd22ee023d8754889ee4366 scrcpy-macos-x86_64-v3.3.3.tar.gz +8588238c9a5a00aa542906b6ec7e6d5541d9ffb9b5d0f6e1bc0e365e2303079e scrcpy-server-v3.3.4 +0305d98c06178c67e12427bbf340c436d0d58c9e2a39bf9ffbbf8f54d7ef95a5 scrcpy-linux-x86_64-v3.3.4.tar.gz +393f7d5379dabd8aacc41184755c3d0df975cd2861353cb7a8d50e0835e2eb72 scrcpy-win32-v3.3.4.zip +d8a155b7c180b7ca4cdadd40712b8750b63f3aab48cb5b8a2a39ac2d0d4c5d38 scrcpy-win64-v3.3.4.zip +8fef43520405dd523c74e1530ac68febcc5a405ea89712c874936675da8513dd scrcpy-macos-aarch64-v3.3.4.tar.gz +cf9b3453a33279b6009dfb256b1a84c374bd4c30a71edd74bacab28d72a5d929 scrcpy-macos-x86_64-v3.3.4.tar.gz ++++++ SHA256SUMS.txt.asc ++++++ --- /var/tmp/diff_new_pack.zvn1U3/_old 2025-12-18 18:34:58.058474112 +0100 +++ /var/tmp/diff_new_pack.zvn1U3/_new 2025-12-18 18:34:58.062474279 +0100 @@ -1,17 +1,17 @@ -----BEGIN PGP SIGNATURE----- -iQIzBAABCAAdFiEE454t5qVfWqbY77eaygH0bxhoOz0FAmjX76gACgkQygH0bxho -Oz2Cow//XF6v8gM2X+kjZRyhLUGmLiiM4b74g9wiPvE3jUvAvQZKsEEL2PpkSo4z -azbn4yS3tPExBDRRFzgaiARPuV1H9mwfQFVL5I9ijTlea821LHfCUvnIKsl1deTC -q1H3jiQxV2oEYKHiyqR6bgjqqPABhnb1wg+yejgJ9JJADWvQ6O1BbUTQmIrEYL+T -yQxcFYGa0rKf/n/WhZHzFFizkUhDsO9+mWstENXKeZ1j1ncMWnYX0lkWG09NT8ah -ehfy3Oc4NPIn9E4URjIjcSkxKxHa89tcpRbnofCFA/OAIZcWFKRFfw6RuJmWp/rf -icdcQEh1F+xfRiUQUqN2YbRHjLKKDw3LNPDt+VeRLU/aSA89NBUVsjiWfG1KMOfG -GDGFGNTOV1sX5aNaVIQ+6zKXDfx0BdxLwOcXeRHH8ShQfcjVHGET7QD+7ZRBVaY6 -K6Kuw2sS+ViIOQ+Wv2nutKirpa3vg7DDChdHJhqwDDOY/kxuGz7J9JSlfvfJOyLl -z9EKY5GNUFBVnqUL7tpmwn4vkoncotV//KpZ8QZs8n8ybGJUPhT8k1gfS8EXftga -9xkC8qUA3PwglswPh0YFUED53m67Zi5tw4trfrnPNOGpODAaeTpygBKICdFSa7R8 -NMW0cmhs2jVo+ci9P7KFJjcwOGf4d1BIOs/ZChcBc6u7tfWcFHY= -=Nkur +iQIzBAABCAAdFiEE454t5qVfWqbY77eaygH0bxhoOz0FAmlDAY4ACgkQygH0bxho +Oz1mkRAA3jaAN6Lz+qbceLPX+UkLGAOQAcPthiJg/21JY6ezkkpuhGGI1OFJtsa+ +wXzieadAIoc8bXncp8RIGgKucAIhj8mWKAzZ+HOmHBG40blm2apQ1etzD/t1+yUU +85kDHo96lt9+oetLtcEAl47p444Ujf/XINjnMKP/iIzFSw2nScSlr1wtVhTL/Vi/ +lXnj1765naicms0Hl7CQsVe67YVz+VKk6yZWTZ3wLe0Gt5y+a/TaOulqCYW7BdtE +1MwOMniSVf6ZDjiD9HtwudRrlOUg3s6+pye1LEyO0hAWflRXKog8OB9ZjwrMREBA +ww04dibrbJOAU3+1fgGSvyP32B2mACrFBEaI1uHiI+lJXZ1YFofOqBJRHIsrLRHw +XECxLQ1M7eniEU/osfartmyFWaEO1yFlFO6AHD8vWpl2pB3MjmdhNGFrzPP/nMXG +g5JCxjck4lQC9795ossxW06ma6mi3tj+626ZcrssM97dUhDPOpqY8rMUyAIQLpQx +I6flzSN4ABB5uWvBULpUrA7++qe1ZlDzvaBOaUauuET95EP0GLZjK4ocHmcI+3fY +aduddVmkYtgT9Oubeawxks3UQ0A9LT0+4djJN02vNFEYoVPtpuj6F8mYt5zyWzbD +Daq72pseI5AcmPUZwNWgEqaTShbBmOcBX5m2fLUdxpGa2KXJ7TE= +=PjQt -----END PGP SIGNATURE----- ++++++ _service ++++++ <services> <service name="download_files" mode="manual"/> </services> ++++++ scrcpy-3.3.3.tar.gz -> scrcpy-3.3.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/.github/workflows/release.yml new/scrcpy-3.3.4/.github/workflows/release.yml --- old/scrcpy-3.3.3/.github/workflows/release.yml 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/.github/workflows/release.yml 2025-12-17 20:21:05.000000000 +0100 @@ -229,7 +229,7 @@ path: release/work/build-macos-aarch64/dist-tar/ build-macos-x86_64: - runs-on: macos-13 + runs-on: macos-15-intel steps: - name: Check architecture run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/README.md new/scrcpy-3.3.4/README.md --- old/scrcpy-3.3.3/README.md 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/README.md 2025-12-17 20:21:05.000000000 +0100 @@ -2,7 +2,7 @@ source for the project. Do not download releases from random websites, even if their name contains `scrcpy`.** -# scrcpy (v3.3.3) +# scrcpy (v3.3.4) <img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" /> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/_init new/scrcpy-3.3.4/app/deps/_init --- old/scrcpy-3.3.3/app/deps/_init 1970-01-01 01:00:00.000000000 +0100 +++ new/scrcpy-3.3.4/app/deps/_init 2025-12-17 20:21:05.000000000 +0100 @@ -0,0 +1,76 @@ +# This file is intended to be sourced by other scripts, not executed + +process_args() { + if [[ $# != 3 ]] + then + # <host>: linux, macos, win32 or win64 + # <build_type>: native or cross + # <link_type>: static or shared + echo "Syntax: $0 <host> <build_type> <link_type>" >&2 + exit 1 + fi + + HOST="$1" + BUILD_TYPE="$2" + LINK_TYPE="$3" + DIRNAME="$HOST-$BUILD_TYPE-$LINK_TYPE" + + if [[ "$BUILD_TYPE" != native && "$BUILD_TYPE" != cross ]] + then + echo "Unsupported build type (expected native or cross): $BUILD_TYPE" >&2 + exit 1 + fi + + if [[ "$LINK_TYPE" != static && "$LINK_TYPE" != shared ]] + then + echo "Unsupported link type (expected static or shared): $LINK_TYPE" >&2 + exit 1 + fi + + if [[ "$BUILD_TYPE" == cross ]] + then + if [[ "$HOST" = win32 ]] + then + HOST_TRIPLET=i686-w64-mingw32 + elif [[ "$HOST" = win64 ]] + then + HOST_TRIPLET=x86_64-w64-mingw32 + else + echo "Unsupported cross-build to host: $HOST" >&2 + exit 1 + fi + fi +} + +DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) +cd "$DEPS_DIR" + +PATCHES_DIR="$PWD/patches" + +WORK_DIR="$PWD/work" +SOURCES_DIR="$WORK_DIR/sources" +BUILD_DIR="$WORK_DIR/build" +INSTALL_DIR="$WORK_DIR/install" + +mkdir -p "$INSTALL_DIR" "$SOURCES_DIR" "$WORK_DIR" + +checksum() { + local file="$1" + local sum="$2" + echo "$file: verifying checksum..." + echo "$sum $file" | shasum -a256 -c +} + +get_file() { + local url="$1" + local file="$2" + local sum="$3" + if [[ -f "$file" ]] + then + echo "$file: found" + else + echo "$file: not found, downloading..." + wget "$url" -O "$file" + fi + checksum "$file" "$sum" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/adb_linux.sh new/scrcpy-3.3.4/app/deps/adb_linux.sh --- old/scrcpy-3.3.3/app/deps/adb_linux.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/adb_linux.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,21 +1,21 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init "$@" VERSION=36.0.0 -FILENAME=platform-tools_r$VERSION-linux.zip -PROJECT_DIR=platform-tools-$VERSION-linux +URL="https://dl.google.com/android/repository/platform-tools_r$VERSION-linux.zip" SHA256SUM=0ead642c943ffe79701fccca8f5f1c69c4ce4f43df2eefee553f6ccb27cbfbe8 +PROJECT_DIR="platform-tools-$VERSION-linux" +FILENAME="$PROJECT_DIR.zip" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://dl.google.com/android/repository/$FILENAME" "$FILENAME" "$SHA256SUM" + get_file "$URL" "$FILENAME" "$SHA256SUM" mkdir -p "$PROJECT_DIR" cd "$PROJECT_DIR" ZIP_PREFIX=platform-tools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/adb_macos.sh new/scrcpy-3.3.4/app/deps/adb_macos.sh --- old/scrcpy-3.3.3/app/deps/adb_macos.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/adb_macos.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,21 +1,21 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init "$@" VERSION=36.0.0 -FILENAME=platform-tools_r$VERSION-darwin.zip -PROJECT_DIR=platform-tools-$VERSION-darwin +URL="https://dl.google.com/android/repository/platform-tools_r$VERSION-darwin.zip" SHA256SUM=d3e9fa1df3345cf728586908426615a60863d2632f73f1ce14f0f1349ef000fd +PROJECT_DIR="platform-tools-$VERSION-darwin" +FILENAME="$PROJECT_DIR.zip" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://dl.google.com/android/repository/$FILENAME" "$FILENAME" "$SHA256SUM" + get_file "$URL" "$FILENAME" "$SHA256SUM" mkdir -p "$PROJECT_DIR" cd "$PROJECT_DIR" ZIP_PREFIX=platform-tools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/adb_windows.sh new/scrcpy-3.3.4/app/deps/adb_windows.sh --- old/scrcpy-3.3.3/app/deps/adb_windows.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/adb_windows.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,21 +1,21 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init "$@" VERSION=36.0.0 -FILENAME=platform-tools_r$VERSION-win.zip -PROJECT_DIR=platform-tools-$VERSION-windows +URL="https://dl.google.com/android/repository/platform-tools_r$VERSION-win.zip" SHA256SUM=12c2841f354e92a0eb2fd7bf6f0f9bf8538abce7bd6b060ac8349d6f6a61107c +PROJECT_DIR="platform-tools-$VERSION-windows" +FILENAME="$PROJECT_DIR.zip" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://dl.google.com/android/repository/$FILENAME" "$FILENAME" "$SHA256SUM" + get_file "$URL" "$FILENAME" "$SHA256SUM" mkdir -p "$PROJECT_DIR" cd "$PROJECT_DIR" ZIP_PREFIX=platform-tools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/common new/scrcpy-3.3.4/app/deps/common --- old/scrcpy-3.3.3/app/deps/common 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/common 1970-01-01 01:00:00.000000000 +0100 @@ -1,77 +0,0 @@ -#!/usr/bin/env bash -# This file is intended to be sourced by other scripts, not executed - -process_args() { - if [[ $# != 3 ]] - then - # <host>: win32 or win64 - # <build_type>: native or cross - # <link_type>: static or shared - echo "Syntax: $0 <host> <build_type> <link_type>" >&2 - exit 1 - fi - - HOST="$1" - BUILD_TYPE="$2" # native or cross - LINK_TYPE="$3" # static or shared - DIRNAME="$HOST-$BUILD_TYPE-$LINK_TYPE" - - if [[ "$BUILD_TYPE" != native && "$BUILD_TYPE" != cross ]] - then - echo "Unsupported build type (expected native or cross): $BUILD_TYPE" >&2 - exit 1 - fi - - if [[ "$LINK_TYPE" != static && "$LINK_TYPE" != shared ]] - then - echo "Unsupported link type (expected static or shared): $LINK_TYPE" >&2 - exit 1 - fi - - if [[ "$BUILD_TYPE" == cross ]] - then - if [[ "$HOST" = win32 ]] - then - HOST_TRIPLET=i686-w64-mingw32 - elif [[ "$HOST" = win64 ]] - then - HOST_TRIPLET=x86_64-w64-mingw32 - else - echo "Unsupported cross-build to host: $HOST" >&2 - exit 1 - fi - fi -} - -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" - -PATCHES_DIR="$PWD/patches" - -WORK_DIR="$PWD/work" -SOURCES_DIR="$WORK_DIR/sources" -BUILD_DIR="$WORK_DIR/build" -INSTALL_DIR="$WORK_DIR/install" - -mkdir -p "$INSTALL_DIR" "$SOURCES_DIR" "$WORK_DIR" - -checksum() { - local file="$1" - local sum="$2" - echo "$file: verifying checksum..." - echo "$sum $file" | shasum -a256 -c -} - -get_file() { - local url="$1" - local file="$2" - local sum="$3" - if [[ -f "$file" ]] - then - echo "$file: found" - else - echo "$file: not found, downloading..." - wget "$url" -O "$file" - fi - checksum "$file" "$sum" -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/dav1d.sh new/scrcpy-3.3.4/app/deps/dav1d.sh --- old/scrcpy-3.3.3/app/deps/dav1d.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/dav1d.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,22 +1,22 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init process_args "$@" VERSION=1.5.0 -FILENAME=dav1d-$VERSION.tar.gz -PROJECT_DIR=dav1d-$VERSION +URL="https://code.videolan.org/videolan/dav1d/-/archive/$VERSION/dav1d-$VERSION.tar.gz" SHA256SUM=78b15d9954b513ea92d27f39362535ded2243e1b0924fde39f37a31ebed5f76b +PROJECT_DIR="dav1d-$VERSION" +FILENAME="$PROJECT_DIR.tar.gz" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://code.videolan.org/videolan/dav1d/-/archive/$VERSION/$FILENAME" "$FILENAME" "$SHA256SUM" + get_file "$URL" "$FILENAME" "$SHA256SUM" tar xf "$FILENAME" # First level directory is "$PROJECT_DIR" fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/ffmpeg.sh new/scrcpy-3.3.4/app/deps/ffmpeg.sh --- old/scrcpy-3.3.3/app/deps/ffmpeg.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/ffmpeg.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,22 +1,22 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init process_args "$@" VERSION=7.1.1 -FILENAME=ffmpeg-$VERSION.tar.xz -PROJECT_DIR=ffmpeg-$VERSION +URL="https://ffmpeg.org/releases/ffmpeg-$VERSION.tar.xz" SHA256SUM=733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1 +PROJECT_DIR="ffmpeg-$VERSION" +FILENAME="$PROJECT_DIR.tar.xz" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://ffmpeg.org/releases/$FILENAME" "$FILENAME" "$SHA256SUM" + get_file "$URL" "$FILENAME" "$SHA256SUM" tar xf "$FILENAME" # First level directory is "$PROJECT_DIR" fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/libusb.sh new/scrcpy-3.3.4/app/deps/libusb.sh --- old/scrcpy-3.3.3/app/deps/libusb.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/libusb.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,22 +1,22 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init process_args "$@" VERSION=1.0.29 -FILENAME=libusb-$VERSION.tar.gz -PROJECT_DIR=libusb-$VERSION +URL="https://github.com/libusb/libusb/archive/refs/tags/v$VERSION.tar.gz" SHA256SUM=7c2dd39c0b2589236e48c93247c986ae272e27570942b4163cb00a060fcf1b74 +PROJECT_DIR="libusb-$VERSION" +FILENAME="$PROJECT_DIR.tar.gz" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://github.com/libusb/libusb/archive/refs/tags/v$VERSION.tar.gz" "$FILENAME" "$SHA256SUM" + get_file "$URL" "$FILENAME" "$SHA256SUM" tar xf "$FILENAME" # First level directory is "$PROJECT_DIR" fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/deps/sdl.sh new/scrcpy-3.3.4/app/deps/sdl.sh --- old/scrcpy-3.3.3/app/deps/sdl.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/deps/sdl.sh 2025-12-17 20:21:05.000000000 +0100 @@ -1,23 +1,24 @@ #!/usr/bin/env bash set -ex -DEPS_DIR=$(dirname ${BASH_SOURCE[0]}) -cd "$DEPS_DIR" -. common +. $(dirname ${BASH_SOURCE[0]})/_init process_args "$@" VERSION=2.32.8 -FILENAME=SDL-$VERSION.tar.gz -PROJECT_DIR=SDL-release-$VERSION +URL="https://github.com/libsdl-org/SDL/archive/refs/tags/release-$VERSION.tar.gz" SHA256SUM=dd35e05644ae527848d02433bec24dd0ea65db59faecf1a0e5d1880c533dac2c +PROJECT_DIR="sdl-$VERSION" +FILENAME="$PROJECT_DIR.tar.gz" + cd "$SOURCES_DIR" if [[ -d "$PROJECT_DIR" ]] then echo "$PWD/$PROJECT_DIR" found else - get_file "https://github.com/libsdl-org/SDL/archive/refs/tags/release-$VERSION.tar.gz" "$FILENAME" "$SHA256SUM" - tar xf "$FILENAME" # First level directory is "$PROJECT_DIR" + get_file "$URL" "$FILENAME" "$SHA256SUM" + tar xf "$FILENAME" # First level directory is "SDL-release-$VERSION" + mv "SDL-release-$VERSION" "$PROJECT_DIR" fi mkdir -p "$BUILD_DIR/$PROJECT_DIR" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/scrcpy-windows.rc new/scrcpy-3.3.4/app/scrcpy-windows.rc --- old/scrcpy-3.3.3/app/scrcpy-windows.rc 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/scrcpy-windows.rc 2025-12-17 20:21:05.000000000 +0100 @@ -13,7 +13,7 @@ VALUE "LegalCopyright", "Romain Vimont, Genymobile" VALUE "OriginalFilename", "scrcpy.exe" VALUE "ProductName", "scrcpy" - VALUE "ProductVersion", "3.3.3" + VALUE "ProductVersion", "3.3.4" END END BLOCK "VarFileInfo" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/src/device_msg.c new/scrcpy-3.3.4/app/src/device_msg.c --- old/scrcpy-3.3.3/app/src/device_msg.c 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/src/device_msg.c 2025-12-17 20:21:05.000000000 +0100 @@ -53,7 +53,7 @@ } uint16_t id = sc_read16be(&buf[1]); size_t size = sc_read16be(&buf[3]); - if (size < len - 5) { + if (size > len - 5) { return 0; // not available } uint8_t *data = malloc(size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/app/tests/test_control_msg_serialize.c new/scrcpy-3.3.4/app/tests/test_control_msg_serialize.c --- old/scrcpy-3.3.3/app/tests/test_control_msg_serialize.c 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/app/tests/test_control_msg_serialize.c 2025-12-17 20:21:05.000000000 +0100 @@ -411,6 +411,26 @@ assert(!memcmp(buf, expected, sizeof(expected))); } +static void test_serialize_start_app(void) { + struct sc_control_msg msg = { + .type = SC_CONTROL_MSG_TYPE_START_APP, + .start_app = { + .name = "firefox", + }, + }; + + uint8_t buf[SC_CONTROL_MSG_MAX_SIZE]; + size_t size = sc_control_msg_serialize(&msg, buf); + assert(size == 9); + + const uint8_t expected[] = { + SC_CONTROL_MSG_TYPE_START_APP, + 7, // length + 'f', 'i', 'r', 'e', 'f', 'o', 'x', // app name + }; + assert(!memcmp(buf, expected, sizeof(expected))); +} + static void test_serialize_reset_video(void) { struct sc_control_msg msg = { .type = SC_CONTROL_MSG_TYPE_RESET_VIDEO, @@ -448,6 +468,7 @@ test_serialize_uhid_input(); test_serialize_uhid_destroy(); test_serialize_open_hard_keyboard(); + test_serialize_start_app(); test_serialize_reset_video(); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/build.gradle new/scrcpy-3.3.4/build.gradle --- old/scrcpy-3.3.3/build.gradle 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/build.gradle 2025-12-17 20:21:05.000000000 +0100 @@ -7,7 +7,7 @@ mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.7.1' + classpath 'com.android.tools.build:gradle:8.13.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/doc/build.md new/scrcpy-3.3.4/doc/build.md --- old/scrcpy-3.3.3/doc/build.md 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/doc/build.md 2025-12-17 20:21:05.000000000 +0100 @@ -233,10 +233,10 @@ #### Option 2: Use prebuilt server - - [`scrcpy-server-v3.3.3`][direct-scrcpy-server] - <sub>SHA-256: `7e70323ba7f259649dd4acce97ac4fefbae8102b2c6d91e2e7be613fd5354be0`</sub> + - [`scrcpy-server-v3.3.4`][direct-scrcpy-server] + <sub>SHA-256: `8588238c9a5a00aa542906b6ec7e6d5541d9ffb9b5d0f6e1bc0e365e2303079e`</sub> -[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-server-v3.3.3 +[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-server-v3.3.4 Download the prebuilt server somewhere, and specify its path during the Meson configuration: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/doc/linux.md new/scrcpy-3.3.4/doc/linux.md --- old/scrcpy-3.3.3/doc/linux.md 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/doc/linux.md 2025-12-17 20:21:05.000000000 +0100 @@ -6,11 +6,11 @@ Download a static build of the [latest release]: - - [`scrcpy-linux-x86_64-v3.3.3.tar.gz`][direct-linux-x86_64] (x86_64) - <sub>SHA-256: `9b30e813e8191329ba8025dc80cb0f198fb0a318960a3b5c15395cf675c9c638`</sub> + - [`scrcpy-linux-x86_64-v3.3.4.tar.gz`][direct-linux-x86_64] (x86_64) + <sub>SHA-256: `0305d98c06178c67e12427bbf340c436d0d58c9e2a39bf9ffbbf8f54d7ef95a5`</sub> [latest release]: https://github.com/Genymobile/scrcpy/releases/latest -[direct-linux-x86_64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-linux-x86_64-v3.3.3.tar.gz +[direct-linux-x86_64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-linux-x86_64-v3.3.4.tar.gz and extract it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/doc/macos.md new/scrcpy-3.3.4/doc/macos.md --- old/scrcpy-3.3.3/doc/macos.md 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/doc/macos.md 2025-12-17 20:21:05.000000000 +0100 @@ -6,15 +6,14 @@ Download a static build of the [latest release]: - - [`scrcpy-macos-aarch64-v3.3.3.tar.gz`][direct-macos-aarch64] (aarch64) - <sub>SHA-256: `b93299468f19ae89ac70f7c1453914c41f1f2bcd31f6ab530038da885c19581f`</sub> - - - [`scrcpy-macos-x86_64-v3.3.3.tar.gz`][direct-macos-x86_64] (x86_64) - <sub>SHA-256: `c767fc1d41e4ae26e40558656570962f474739924fd22ee023d8754889ee4366`</sub> + - [`scrcpy-macos-aarch64-v3.3.4.tar.gz`][direct-macos-aarch64] (aarch64) + <sub>SHA-256: `8fef43520405dd523c74e1530ac68febcc5a405ea89712c874936675da8513dd`</sub> + - [`scrcpy-macos-x86_64-v3.3.4.tar.gz`][direct-macos-x86_64] (x86_64) + <sub>SHA-256: `cf9b3453a33279b6009dfb256b1a84c374bd4c30a71edd74bacab28d72a5d929`</sub> [latest release]: https://github.com/Genymobile/scrcpy/releases/latest -[direct-macos-aarch64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-macos-aarch64-v3.3.3.tar.gz -[direct-macos-x86_64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-macos-x86_64-v3.3.3.tar.gz +[direct-macos-aarch64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-macos-aarch64-v3.3.4.tar.gz +[direct-macos-x86_64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-macos-x86_64-v3.3.4.tar.gz and extract it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/doc/windows.md new/scrcpy-3.3.4/doc/windows.md --- old/scrcpy-3.3.3/doc/windows.md 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/doc/windows.md 2025-12-17 20:21:05.000000000 +0100 @@ -6,14 +6,14 @@ Download the [latest release]: - - [`scrcpy-win64-v3.3.3.zip`][direct-win64] (64-bit) - <sub>SHA-256: `4b458d33d0436688c69875cd267cae6fa8be08aa3c17772edf3a940a3dc4b17e`</sub> - - [`scrcpy-win32-v3.3.3.zip`][direct-win32] (32-bit) - <sub>SHA-256: `e3d43e21c0bd6e070381c390c1e4cccd48a1e71ae73a8c217e6e6b8506598c79`</sub> + - [`scrcpy-win64-v3.3.4.zip`][direct-win64] (64-bit) + <sub>SHA-256: `d8a155b7c180b7ca4cdadd40712b8750b63f3aab48cb5b8a2a39ac2d0d4c5d38`</sub> + - [`scrcpy-win32-v3.3.4.zip`][direct-win32] (32-bit) + <sub>SHA-256: `393f7d5379dabd8aacc41184755c3d0df975cd2861353cb7a8d50e0835e2eb72`</sub> [latest release]: https://github.com/Genymobile/scrcpy/releases/latest -[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-win64-v3.3.3.zip -[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-win32-v3.3.3.zip +[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-win64-v3.3.4.zip +[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-win32-v3.3.4.zip and extract it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/gradle/wrapper/gradle-wrapper.properties new/scrcpy-3.3.4/gradle/wrapper/gradle-wrapper.properties --- old/scrcpy-3.3.3/gradle/wrapper/gradle-wrapper.properties 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/gradle/wrapper/gradle-wrapper.properties 2025-12-17 20:21:05.000000000 +0100 @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip # https://gradle.org/release-checksums/ -distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab +distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/install_release.sh new/scrcpy-3.3.4/install_release.sh --- old/scrcpy-3.3.3/install_release.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/install_release.sh 2025-12-17 20:21:05.000000000 +0100 @@ -2,8 +2,8 @@ set -e BUILDDIR=build-auto -PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v3.3.3/scrcpy-server-v3.3.3 -PREBUILT_SERVER_SHA256=7e70323ba7f259649dd4acce97ac4fefbae8102b2c6d91e2e7be613fd5354be0 +PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v3.3.4/scrcpy-server-v3.3.4 +PREBUILT_SERVER_SHA256=8588238c9a5a00aa542906b6ec7e6d5541d9ffb9b5d0f6e1bc0e365e2303079e echo "[scrcpy] Downloading prebuilt server..." wget "$PREBUILT_SERVER_URL" -O scrcpy-server diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/meson.build new/scrcpy-3.3.4/meson.build --- old/scrcpy-3.3.3/meson.build 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/meson.build 2025-12-17 20:21:05.000000000 +0100 @@ -1,5 +1,5 @@ project('scrcpy', 'c', - version: '3.3.3', + version: '3.3.4', meson_version: '>= 0.49', default_options: [ 'c_std=c11', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/build.gradle new/scrcpy-3.3.4/server/build.gradle --- old/scrcpy-3.3.3/server/build.gradle 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/build.gradle 2025-12-17 20:21:05.000000000 +0100 @@ -1,15 +1,15 @@ apply plugin: 'com.android.application' android { - namespace 'com.genymobile.scrcpy' - compileSdk 35 + namespace = 'com.genymobile.scrcpy' + compileSdk 36 defaultConfig { - applicationId "com.genymobile.scrcpy" + applicationId = "com.genymobile.scrcpy" minSdkVersion 21 - targetSdkVersion 35 - versionCode 30303 - versionName "3.3.3" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + targetSdkVersion 36 + versionCode 30304 + versionName "3.3.4" + testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -18,8 +18,11 @@ } } buildFeatures { - buildConfig true - aidl true + buildConfig = true + aidl = true + } + lint { + disable 'UseRequiresApi' } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/build_without_gradle.sh new/scrcpy-3.3.4/server/build_without_gradle.sh --- old/scrcpy-3.3.3/server/build_without_gradle.sh 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/build_without_gradle.sh 2025-12-17 20:21:05.000000000 +0100 @@ -12,10 +12,10 @@ set -e SCRCPY_DEBUG=false -SCRCPY_VERSION_NAME=3.3.3 +SCRCPY_VERSION_NAME=3.3.4 -PLATFORM=${ANDROID_PLATFORM:-35} -BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-35.0.0} +PLATFORM=${ANDROID_PLATFORM:-36} +BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-36.0.0} PLATFORM_TOOLS="$ANDROID_HOME/platforms/android-$PLATFORM" BUILD_TOOLS_DIR="$ANDROID_HOME/build-tools/$BUILD_TOOLS" @@ -86,7 +86,7 @@ echo "Dexing..." cd "$CLASSES_DIR" -if [[ $PLATFORM -lt 31 ]] +if [[ "${PLATFORM%%.*}" -lt 31 ]] then # use dx "$BUILD_TOOLS_DIR/dx" --dex --output "$BUILD_DIR/classes.dex" \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/CleanUp.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/CleanUp.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/CleanUp.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/CleanUp.java 2025-12-17 20:21:05.000000000 +0100 @@ -196,6 +196,7 @@ // Needed for workarounds prepareMainLooper(); + Workarounds.apply(); int displayId = Integer.parseInt(args[0]); int restoreStayOn = Integer.parseInt(args[1]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/FakeContext.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/FakeContext.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/FakeContext.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/FakeContext.java 2025-12-17 20:21:05.000000000 +0100 @@ -109,8 +109,10 @@ } // "semclipboard" is a Samsung-internal service - // See <https://github.com/Genymobile/scrcpy/issues/6224> - if (Context.CLIPBOARD_SERVICE.equals(name) || "semclipboard".equals(name)) { + // See: + // - <https://github.com/Genymobile/scrcpy/issues/6224> + // - <https://github.com/Genymobile/scrcpy/issues/6523> + if (Context.CLIPBOARD_SERVICE.equals(name) || "semclipboard".equals(name) || Context.ACTIVITY_SERVICE.equals(name)) { try { Field field = service.getClass().getDeclaredField("mContext"); field.setAccessible(true); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/Server.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/Server.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/Server.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/Server.java 2025-12-17 20:21:05.000000000 +0100 @@ -225,8 +225,12 @@ } private static void internalMain(String... args) throws Exception { + Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); Thread.setDefaultUncaughtExceptionHandler((t, e) -> { Ln.e("Exception on thread " + t, e); + if (defaultHandler != null) { + defaultHandler.uncaughtException(t, e); + } }); prepareMainLooper(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/Workarounds.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/Workarounds.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/Workarounds.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/Workarounds.java 2025-12-17 20:21:05.000000000 +0100 @@ -6,9 +6,9 @@ import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.Application; +import android.app.Instrumentation; import android.content.AttributionSource; import android.content.Context; -import android.content.ContextWrapper; import android.content.pm.ApplicationInfo; import android.media.AudioAttributes; import android.media.AudioManager; @@ -103,10 +103,7 @@ private static void fillAppContext() { try { - Application app = new Application(); - Field baseField = ContextWrapper.class.getDeclaredField("mBase"); - baseField.setAccessible(true); - baseField.set(app, FakeContext.get()); + Application app = Instrumentation.newApplication(Application.class, FakeContext.get()); // activityThread.mInitialApplication = app; Field mInitialApplicationField = ACTIVITY_THREAD_CLASS.getDeclaredField("mInitialApplication"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/opengl/OpenGLRunner.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/opengl/OpenGLRunner.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/opengl/OpenGLRunner.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/opengl/OpenGLRunner.java 2025-12-17 20:21:05.000000000 +0100 @@ -1,6 +1,7 @@ package com.genymobile.scrcpy.opengl; import com.genymobile.scrcpy.device.Size; +import com.genymobile.scrcpy.util.Threads; import android.graphics.SurfaceTexture; import android.opengl.EGL14; @@ -15,6 +16,7 @@ import android.os.HandlerThread; import android.view.Surface; +import java.util.concurrent.Callable; import java.util.concurrent.Semaphore; public final class OpenGLRunner { @@ -80,31 +82,17 @@ public Surface start(Size inputSize, Size outputSize, Surface outputSurface) throws OpenGLException { initOnce(); - // Simulate CompletableFuture, but working for all Android versions - final Semaphore sem = new Semaphore(0); - Throwable[] throwableRef = new Throwable[1]; - // The whole OpenGL execution must be performed on a Handler, so that SurfaceTexture.setOnFrameAvailableListener() works correctly. // See <https://github.com/Genymobile/scrcpy/issues/5444> - handler.post(() -> { - try { - run(inputSize, outputSize, outputSurface); - } catch (Throwable throwable) { - throwableRef[0] = throwable; - } finally { - sem.release(); - } - }); - try { - sem.acquire(); - } catch (InterruptedException e) { - // Behave as if this method call was synchronous - Thread.currentThread().interrupt(); - } - - Throwable throwable = throwableRef[0]; - if (throwable != null) { + Threads.executeSynchronouslyOn(handler, new Callable<Void>() { + @Override + public Void call() throws Exception { + run(inputSize, outputSize, outputSurface); + return null; + } + }); + } catch (Throwable throwable) { if (throwable instanceof OpenGLException) { throw (OpenGLException) throwable; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/util/Ln.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/util/Ln.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/util/Ln.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/util/Ln.java 2025-12-17 20:21:05.000000000 +0100 @@ -74,9 +74,11 @@ public static void w(String message, Throwable throwable) { if (isEnabled(Level.WARN)) { Log.w(TAG, message, throwable); - CONSOLE_ERR.print(PREFIX + "WARN: " + message + '\n'); - if (throwable != null) { - throwable.printStackTrace(CONSOLE_ERR); + synchronized (CONSOLE_ERR) { + CONSOLE_ERR.print(PREFIX + "WARN: " + message + '\n'); + if (throwable != null) { + throwable.printStackTrace(CONSOLE_ERR); + } } } } @@ -88,9 +90,11 @@ public static void e(String message, Throwable throwable) { if (isEnabled(Level.ERROR)) { Log.e(TAG, message, throwable); - CONSOLE_ERR.print(PREFIX + "ERROR: " + message + '\n'); - if (throwable != null) { - throwable.printStackTrace(CONSOLE_ERR); + synchronized (CONSOLE_ERR) { + CONSOLE_ERR.print(PREFIX + "ERROR: " + message + '\n'); + if (throwable != null) { + throwable.printStackTrace(CONSOLE_ERR); + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/util/Threads.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/util/Threads.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/util/Threads.java 1970-01-01 01:00:00.000000000 +0100 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/util/Threads.java 2025-12-17 20:21:05.000000000 +0100 @@ -0,0 +1,43 @@ +package com.genymobile.scrcpy.util; + +import android.os.Handler; + +import java.util.concurrent.Callable; +import java.util.concurrent.Semaphore; + +public final class Threads { + private Threads() { + // not instantiable + } + + public static <T> T executeSynchronouslyOn(Handler handler, Callable<T> callable) throws Throwable { + // Simulate CompletableFuture, but working for all Android versions + final Semaphore sem = new Semaphore(0); + @SuppressWarnings("unchecked") + T[] resultRef = (T[]) new Object[1]; + Throwable[] throwableRef = new Throwable[1]; + + handler.post(() -> { + try { + resultRef[0] = callable.call(); + } catch (Throwable throwable) { + throwableRef[0] = throwable; + } finally { + sem.release(); + } + }); + + try { + sem.acquire(); + } catch (InterruptedException e) { + // Behave as if this method call was synchronous + Thread.currentThread().interrupt(); + } + + if (throwableRef[0] != null) { + throw throwableRef[0]; + } + + return resultRef[0]; + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayManager.java new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayManager.java --- old/scrcpy-3.3.3/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayManager.java 2025-09-27 16:10:10.000000000 +0200 +++ new/scrcpy-3.3.4/server/src/main/java/com/genymobile/scrcpy/wrappers/DisplayManager.java 2025-12-17 20:21:05.000000000 +0100 @@ -139,7 +139,13 @@ int layerStack = cls.getDeclaredField("layerStack").getInt(displayInfo); int flags = cls.getDeclaredField("flags").getInt(displayInfo); int dpi = cls.getDeclaredField("logicalDensityDpi").getInt(displayInfo); - String uniqueId = (String) cls.getDeclaredField("uniqueId").get(displayInfo); + String uniqueId; + try { + uniqueId = (String) cls.getDeclaredField("uniqueId").get(displayInfo); + } catch (NoSuchFieldException e) { + // This field might not exist: <https://github.com/Genymobile/scrcpy/issues/6461> + uniqueId = null; + } return new DisplayInfo(displayId, new Size(width, height), rotation, layerStack, flags, dpi, uniqueId); } catch (ReflectiveOperationException e) { throw new AssertionError(e);
