Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
112.11k stars 10.72k forks source link

Audio not functional on Pixel 7 Pro running Android 14 Developer Preview 2 #3784

Closed Namelesswonder closed 1 year ago

Namelesswonder commented 1 year ago

Environment

Bug

Audio stream doesn't get initialized. This happens with all of the supported codecs

Logs

scrcpy --list-encoders

scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 420.6 MB/s (52867 bytes in 0.000s)
[server] INFO: List of video encoders:
--video-codec=h264 --video-encoder='c2.exynos.h264.encoder'
--video-codec=h264 --video-encoder='c2.android.avc.encoder'
--video-codec=h264 --video-encoder='OMX.google.h264.encoder'
--video-codec=h265 --video-encoder='c2.exynos.hevc.encoder'
--video-codec=h265 --video-encoder='c2.android.hevc.encoder'
--video-codec=av1 --video-encoder='c2.android.av1.encoder'
[server] INFO: List of audio encoders:
--audio-codec=opus --audio-encoder='c2.android.opus.encoder'
--audio-codec=aac --audio-encoder='c2.android.aac.encoder'
--audio-codec=aac --audio-encoder='OMX.google.aac.encoder'

scrcpy console log

$ scrcpy
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
WARN: Could not disable minimize on focus loss
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 412.7 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: Google Pixel 7 Pro (Android 13)
[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener[interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
at java.lang.Class.getMethod(Class.java:2771)
at java.lang.Class.getMethod(Class.java:2351)
at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:129)
at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:139)
at com.genymobile.scrcpy.Device.<init>(Device.java:100)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:385)
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.getDeviceId()' on a null object reference
at android.content.ContextWrapper.getDeviceId(ContextWrapper.java:1226)
at android.media.AudioRecord.resolveSessionId(AudioRecord.java:1093)
at android.media.AudioRecord.<init>(AudioRecord.java:472)
at android.media.AudioRecord.<init>(Unknown Source:0)
at android.media.AudioRecord$Builder.build(AudioRecord.java:1054)
at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58)
at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:1012)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6.0 NVIDIA 530.30.02
INFO: Trilinear filtering enabled
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Initial texture: 1440x3120

adb logcat

03-11 22:12:31.821 13484 13484 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
03-11 22:12:31.826 13484 13484 I AndroidRuntime: Using default boot image
03-11 22:12:31.826 13484 13484 I AndroidRuntime: Leaving lock profiling enabled
03-11 22:12:31.829 13484 13484 I app_process: Using CollectorTypeCC GC.
03-11 22:12:31.892 13484 13484 D nativeloader: InitDefaultPublicLibraries for_preload=1: libandroid.so:libaaudio.so:libamidi.so:libbinder_ndk.so:libc.so:libcamera2ndk.so:libdl.so:libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libicu.so:libicui18n.so:libicuuc.so:libjnigraphics.so:liblog.so:libmediandk.so:libm.so:libnativehelper.so:libnativewindow.so:libOpenMAXAL.so:libOpenSLES.so:libRS.so:libstdc++.so:libsync.so:libvulkan.so:libwebviewchromium_plat_support.so:libz.so
03-11 22:12:31.899 13484 13484 D app_process: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
03-11 22:12:31.899 13484 13484 D app_process: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt72l.dat
03-11 22:12:31.903 13484 13484 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
03-11 22:12:31.919 13484 13484 W libc    : Access denied finding property "ro.product.name_for_attestation"
03-11 22:12:31.919 13484 13484 W libc    : Access denied finding property "ro.product.brand_for_attestation"
03-11 22:12:31.919 13484 13484 W libc    : Access denied finding property "ro.product.model_for_attestation"
03-11 22:12:31.915 13484 13484 W main    : type=1400 audit(0.0:449965): avc: denied { read } for name="u:object_r:build_attestation_prop:s0" dev="tmpfs" ino=118 scontext=u:r:shell:s0 tcontext=u:object_r:build_attestation_prop:s0 tclass=file permissive=0
03-11 22:12:31.915 13484 13484 W main    : type=1400 audit(0.0:449966): avc: denied { read } for name="u:object_r:build_attestation_prop:s0" dev="tmpfs" ino=118 scontext=u:r:shell:s0 tcontext=u:object_r:build_attestation_prop:s0 tclass=file permissive=0
03-11 22:12:31.915 13484 13484 W main    : type=1400 audit(0.0:449967): avc: denied { read } for name="u:object_r:build_attestation_prop:s0" dev="tmpfs" ino=118 scontext=u:r:shell:s0 tcontext=u:object_r:build_attestation_prop:s0 tclass=file permissive=0
03-11 22:12:31.921 13484 13484 W System  : No Compatibility callbacks set! Querying change 242716250
03-11 22:12:31.921 13484 13484 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
03-11 22:12:31.922 13484 13484 I scrcpy  : Device: Google Pixel 7 Pro (Android 13)
03-11 22:12:31.931 13484 13484 E scrcpy  : Could not invoke method
03-11 22:12:31.931 13484 13484 E scrcpy  : java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
03-11 22:12:31.931 13484 13484 E scrcpy  :      at java.lang.Class.getMethod(Class.java:2771)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at java.lang.Class.getMethod(Class.java:2351)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:129)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:139)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.genymobile.scrcpy.Device.<init>(Device.java:100)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.genymobile.scrcpy.Server.main(Server.java:381)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
03-11 22:12:31.931 13484 13484 E scrcpy  :      at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:385)
03-11 22:12:31.943 13484 13484 D MtpDeviceJNI: register_android_mtp_MtpDevice
03-11 22:12:31.945 13484 13484 D MediaCodecList: codecHandlesFormat: no format, so no extra checks
03-11 22:12:31.945 13484 13484 D MediaCodecList: codecHandlesFormat: no format, so no extra checks
03-11 22:12:31.945 13484 13505 D MediaCodecList: codecHandlesFormat: no format, so no extra checks
03-11 22:12:31.946 13484 13509 D CCodec  : allocate(c2.exynos.h264.encoder)
03-11 22:12:31.947 13484 13508 D CCodec  : allocate(c2.android.opus.encoder)
03-11 22:12:31.948 13484 13509 I Codec2Client: Available Codec2 services: "default" "default1" "default2" "software"
03-11 22:12:31.950 13484 13509 I CCodec  : setting up 'default' as default (vendor) store
03-11 22:12:31.950 13484 13508 I CCodec  : setting up 'default' as default (vendor) store
03-11 22:12:31.953  1004  1071 W ColorUtils: expected specified color aspects (0:0:0:0)
03-11 22:12:31.953  1004  1071 I samsung.hardware.media.c2@1.0-service: missing struct descriptor #Param::CoreIndex(--004) for field values of struct #Param::CoreIndex(F-12004)
03-11 22:12:31.953  1004  1071 I samsung.hardware.media.c2@1.0-service: missing struct descriptor #Param::CoreIndex(--1812) for field values of struct #Param::CoreIndex(F-11812)
03-11 22:12:31.954 13484 13509 I CCodec  : Created component [c2.exynos.h264.encoder]
03-11 22:12:31.954 13484 13509 D CCodecConfig: read media type: video/avc
03-11 22:12:31.956 13484 13509 D ReflectedParamUpdater: extent() != 1 for single value type: output.subscribed-indices.values
03-11 22:12:31.956 13484 13509 D ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
03-11 22:12:31.956 13484 13509 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values
03-11 22:12:31.956 13484 13509 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
03-11 22:12:31.957  1191  2232 V C2Store : in init
03-11 22:12:31.957  1191  2232 V C2Store : loading dll
03-11 22:12:31.958 13484 13509 D ReflectedParamUpdater: ignored struct field coding.qp.values
03-11 22:12:31.959 13484 13509 D ReflectedParamUpdater: ignored struct field coding.gop.values
03-11 22:12:31.959 13484 13508 I CCodec  : Created component [c2.android.opus.encoder]
03-11 22:12:31.959 13484 13508 D CCodecConfig: read media type: audio/opus
03-11 22:12:31.960 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values
03-11 22:12:31.961 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: output.subscribed-indices.values
03-11 22:12:31.961 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
03-11 22:12:31.961 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values
03-11 22:12:31.961 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.allocator-ids.values
03-11 22:12:31.961 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
03-11 22:12:31.961 13484 13508 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.pool-ids.values
03-11 22:12:31.962 13484 13508 I CCodecConfig: query failed after returning 9 values (BAD_INDEX)
03-11 22:12:31.962 13484 13508 D CCodecConfig: c2 config diff is Dict {
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 algo.bitrate-mode.value = 3
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 algo.complexity.value = 10
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 coded.bitrate.value = 128000
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 input.buffers.max-size.value = 3840
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 input.delay.value = 0
03-11 22:12:31.962 13484 13508 D CCodecConfig:   string input.media-type.value = "audio/raw"
03-11 22:12:31.962 13484 13508 D CCodecConfig:   string output.media-type.value = "audio/opus"
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 raw.channel-count.value = 1
03-11 22:12:31.962 13484 13508 D CCodecConfig:   c2::u32 raw.sample-rate.value = 48000
03-11 22:12:31.962 13484 13508 D CCodecConfig: }
03-11 22:12:31.962 13484 13508 I MediaCodec: MediaCodec will operate in async mode
03-11 22:12:31.963 13484 13509 D CCodecConfig: ignoring local param raw.color (0xc2001809) as it is already supported
03-11 22:12:31.963 13484 13509 I CCodecConfig: query failed after returning 21 values (BAD_INDEX)
03-11 22:12:31.963 13484 13509 D CCodecConfig: c2 config diff is Dict {
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 algo.bitrate-mode.value = 3
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 algo.encoding-quality-level.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::i32 algo.priority.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::float algo.rate.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::i32 coded.average-qp.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coded.bitrate-mode.value = 1
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coded.bitrate.value = 64000
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::float coded.frame-rate.value = 15
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coded.hdr-format.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coded.picture-type.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coded.pl.level = 20480
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coded.pl.profile = 20484
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coding.intra-refresh.mode = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::float coding.intra-refresh.period = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 coding.request-sync-frame.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::i64 coding.sync-frame-interval.value = 1000000
03-11 22:12:31.963 13484 13509 D CCodecConfig:   Buffer coding.temporal-layering = {
03-11 22:12:31.963 13484 13509 D CCodecConfig:     00000000:  10 00 00 00 07 20 01 52  00 00 00 00 00 00 00 00  ..... .R........
03-11 22:12:31.963 13484 13509 D CCodecConfig:   }
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 input.delay.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   string input.media-type.value = "video/raw"
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 output.buffers.prepend-header.value = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   string output.media-type.value = "video/avc"
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 raw.color.matrix = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:   c2::u32 raw.color.primaries = 0
03-11 22:12:31.963 13484 13509 D CCodecConfig:
03-11 22:12:31.965 13484 13505 D CodecSeeding: Seed: codec c2.android.opus.encoder, mediatype audio/opus, overrideable 1
03-11 22:12:31.965 13484 13505 D CodecProperties: setFeatureValue(_vq_eligible.device,1)
03-11 22:12:31.965 13484 13505 D CodecProperties: setFeatureValue(_quality.target,1)
03-11 22:12:31.965 13484 13505 D CodecSeeding: Seed: codec c2.android.opus.encoder, mediatype audio/opus, overrideable 0
03-11 22:12:31.965 13484 13505 D MediaCodec: shapeMediaFormat: deltas(0): AMessage(what = 0x00000000) = {
03-11 22:12:31.965 13484 13505 D MediaCodec:   }
03-11 22:12:31.965 13484 13508 D MediaCodec: flushMediametrics
03-11 22:12:31.965 13484 13508 D CCodec  : [c2.android.opus.encoder] buffers are bound to CCodec forthis session
03-11 22:12:31.965 13484 13508 D CCodecConfig: no c2 equivalents for flags
03-11 22:12:31.965 13484 13508 D CCodecConfig: no c2 equivalents for encoder
03-11 22:12:31.966 13484 13508 D CCodecConfig: c2 config diff is   c2::u32 raw.channel-count.value =2
03-11 22:12:31.966 13484 13508 W Codec2Client: query -- param skipped: index = 1107298332.
03-11 22:12:31.967 13484 13508 D CCodec  : encoding statistics level = 0
03-11 22:12:31.967 13484 13508 D CCodec  : setup formats input: AMessage(what = 0x00000000) = {
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t channel-count = 2
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t flac-compression-level = 10
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t max-input-size = 3840
03-11 22:12:31.967 13484 13508 D CCodec  :   string mime = "audio/raw"
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t sample-rate = 48000
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t android._config-pcm-encoding = 2
03-11 22:12:31.967 13484 13508 D CCodec  : }
03-11 22:12:31.967 13484 13508 D CCodec  : setup formats output: AMessage(what = 0x00000000) = {
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t bitrate = 128000
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t bitrate-mode = 1
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t channel-count = 2
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t flac-compression-level = 10
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t max-bitrate = 128000
03-11 22:12:31.967 13484 13508 D CCodec  :   string mime = "audio/opus"
03-11 22:12:31.967 13484 13508 D CCodec  :   int32_t sample-rate = 48000
03-11 22:12:31.967 13484 13508 D CCodec  : }
03-11 22:12:31.967 13484 13508 I CCodecConfig: query failed after returning 9 values (BAD_INDEX)
03-11 22:12:31.971  1559  9669 I DisplayDeviceRepository: Display device added: DisplayDeviceInfo{"scrcpy": uniqueId="virtual:com.android.shell,2000,scrcpy,0", 1 x 1, modeId 35, renderFrameRate 60.0, defaultModeId 35, supportedModes [{id=35, width=1, height=1, fps=60.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], colorMode 0, supportedColorModes [0], hdrCapabilities null, allmSupported false, gameContentTypeSupported false, density 1, 1.0 x 1.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, deviceProductInfo null, state OFF, committedState UNKNOWN, owner com.android.shell (uid 2000), frameRateOverride , brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, hdrSdrRatio NaN, FLAG_PRIVATE, installOrientation 0, displayShape DisplayShape{ spec=-1569981477 displayWidth=1 displayHeight=1 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}}
03-11 22:12:31.971 13484 13505 E AndroidRuntime: FATAL EXCEPTION: Thread-4
03-11 22:12:31.971 13484 13505 E AndroidRuntime: PID: 13484
03-11 22:12:31.971 13484 13505 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.getDeviceId()' on a null object reference
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at android.content.ContextWrapper.getDeviceId(ContextWrapper.java:1226)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at android.media.AudioRecord.resolveSessionId(AudioRecord.java:1093)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at android.media.AudioRecord.<init>(AudioRecord.java:472)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at android.media.AudioRecord.<init>(Unknown Source:0)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at android.media.AudioRecord$Builder.build(AudioRecord.java:1054)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
03-11 22:12:31.971 13484 13505 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:1012)
03-11 22:12:31.971 13484 13505 E scrcpy  : Exception on thread Thread[Thread-4,5,main]
03-11 22:12:31.971 13484 13505 E scrcpy  : java.lang.NullPointerException: Attempt to invoke virtualmethod 'int android.content.Context.getDeviceId()' on a null object reference
03-11 22:12:31.971 13484 13505 E scrcpy  :      at android.content.ContextWrapper.getDeviceId(ContextWrapper.java:1226)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at android.media.AudioRecord.resolveSessionId(AudioRecord.java:1093)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at android.media.AudioRecord.<init>(AudioRecord.java:472)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at android.media.AudioRecord.<init>(Unknown Source:0)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at android.media.AudioRecord$Builder.build(AudioRecord.java:1054)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
03-11 22:12:31.971 13484 13505 E scrcpy  :      at java.lang.Thread.run(Thread.java:1012)
03-11 22:12:31.971 13484 13508 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
03-11 22:12:31.972  1191  2232 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
03-11 22:12:31.972  1559  9669 I LogicalDisplayMapper: Applying layout: [{dispId: 0(ON), displayGroupName: , addr: {port=0, model=0x401ceccbbbeef1}, brightnessThrottlingMapId: null, mRefreshRateZoneId: null, mLeadDisplayId: -1}], Previous layout: [{dispId: 0(ON), displayGroupName: , addr: {port=0, model=0x401ceccbbbeef1}, brightnessThrottlingMapId: null, mRefreshRateZoneId: null, mLeadDisplayId: -1}]
03-11 22:12:31.972  1559  9669 I LogicalDisplayMapper: Adding new display: 17: DisplayInfo{"scrcpy",displayId 17, displayGroupId -1, FLAG_PRIVATE, real 1 x 1, largest app 1 x 1, smallest app 1 x 1, appVsyncOff 0, presDeadline 16666666, mode 3560.0, defaultMode 35, modes [{id=35, width=1, height=1, fps=60.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], hdrCapabilities null, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state OFF, committedState UNKNOWN, type VIRTUAL, uniqueId "virtual:com.android.shell,2000,scrcpy,0", app 1 x 1, density 1 (1.0 x 1.0) dpi, layerStack 17, colorMode 0, supportedColorModes [0], deviceProductInfo null, owner com.android.shell (uid 2000), removeMode 1, refreshRateOverride 0.0, brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, installOrientation ROTATION_0, layoutLimitedRefreshRate null, hdrSdrRatio not_available}
03-11 22:12:31.972 13484 13508 D MediaCodec: flushMediametrics
03-11 22:12:31.972  1559  9669 I LogicalDisplayMapper: Setting new display group 0 for display 17, from previous group: null
03-11 22:12:31.973  1191  2232 V C2Store : in ~ComponentModule
03-11 22:12:31.973  1191  2232 V C2Store : unloading dll
03-11 22:12:31.973 13484 13508 D MediaCodec: flushMediametrics
03-11 22:12:31.974  1559  9669 W BrightnessThrottler: DeviceConfig BrightnessThrottlingData is null
03-11 22:12:31.974  1559  9669 W DisplayPowerController[17]: Screen brightness nits configuration isunavailable; falling back
03-11 22:12:31.971 13484 13484 W main    : type=1400 audit(0.0:449968): avc: denied { read } for name="u:object_r:qemu_sf_lcd_density_prop:s0" dev="tmpfs" ino=291 scontext=u:r:shell:s0 tcontext=u:object_r:qemu_sf_lcd_density_prop:s0 tclass=file permissive=0
03-11 22:12:31.971 13484 13484 W main    : type=1400 audit(0.0:449969): avc: denied { read } for name="u:object_r:qemu_sf_lcd_density_prop:s0" dev="tmpfs" ino=291 scontext=u:r:shell:s0 tcontext=u:object_r:qemu_sf_lcd_density_prop:s0 tclass=file permissive=0
03-11 22:12:31.975 13484 13484 W libc    : Access denied finding property "qemu.sf.lcd_density"
03-11 22:12:31.975 13484 13484 W libc    : Access denied finding property "qemu.sf.lcd_density"
03-11 22:12:31.978  1559  1847 V DisplayPowerController[17]: Brightness [0.0] reason changing to: 'manual', previous reason: '0'.
03-11 22:12:31.978  1559  1847 I DisplayPowerController[17]: BrightnessEvent: disp=17, physDisp=virtual:com.android.shell,2000,scrcpy,0, brt=0.0, initBrt=NaN, rcmdBrt=NaN, preBrt=NaN, lux=0.0, preLux=0.0, hbmMax=1.0, hbmMode=off, rbcStrength=-1, thrmMax=1.0, powerFactor=1.0, wasShortTermModelActive=false, flags=, reason=manual, autoBrightness=false, strategy=
03-11 22:12:31.978  1559  1847 V DisplayPowerController[17]: Brightness [0.0] reason changing to: 'manual', previous reason: '0'.
03-11 22:12:31.978  1559  1847 I DisplayPowerController[17]: BrightnessEvent: disp=17, physDisp=virtual:com.android.shell,2000,scrcpy,0, brt=0.0, initBrt=0.0, rcmdBrt=NaN, preBrt=NaN, lux=0.0, preLux=0.0, hbmMax=1.0, hbmMode=off, rbcStrength=-1, thrmMax=1.0, powerFactor=1.0, wasShortTermModelActive=false, flags=, reason=manual, autoBrightness=true, strategy=
03-11 22:12:31.978 13484 13484 D CodecSeeding: Seed: codec c2.exynos.h264.encoder, mediatype video/avc, overrideable 1
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-bpp,0)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-bpp-1080p,1.90)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-bpp-720p,2.25)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-bpp-540p,2.65)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-bpp-480p,3.00)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-bpp-320x240,0)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-qpmax,-1)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-qpmax-1080p,45)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-qpmax-720p,43)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-qpmax-540p,42)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-target-qpmax-480p,38)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-bitrate-phaseout,1.75)
03-11 22:12:31.978 13484 13484 D CodecProperties: setTuningValue(vq-boost-missing-qp,0.20)
03-11 22:12:31.979 13484 13484 D CodecProperties: setFeatureValue(can-swap-width-height,1)
03-11 22:12:31.979 13484 13484 D CodecProperties: setFeatureValue(encoding-statistics,0)
03-11 22:12:31.979 13484 13484 D CodecProperties: setFeatureValue(qp-bounds,0)
03-11 22:12:31.979 13484 13484 D CodecProperties: setFeatureValue(vq-minimum-quality,0)
03-11 22:12:31.979 13484 13484 D CodecProperties: setFeatureValue(_vq_eligible.device,1)
03-11 22:12:31.979 13484 13484 D CodecProperties: setFeatureValue(_quality.target,1)
03-11 22:12:31.979 13484 13484 D CodecSeeding: Seed: codec c2.exynos.h264.encoder, mediatype video/avc, overrideable 0
03-11 22:12:31.979  1559  1847 V DisplayPowerController[17]: Brightness [0.0] reason changing to: 'manual', previous reason: '0'.
03-11 22:12:31.979 13484 13484 D VQApply : minquality: 1440x3120 outside of shaping range
03-11 22:12:31.979  1559  1847 I DisplayPowerController[17]: BrightnessEvent: disp=17, physDisp=virtual:com.android.shell,2000,scrcpy,0, brt=0.0, initBrt=0.0, rcmdBrt=NaN, preBrt=NaN, lux=0.0, preLux=0.0, hbmMax=1.0, hbmMode=off, rbcStrength=-1, thrmMax=1.0, powerFactor=1.0, wasShortTermModelActive=false, flags=, reason=manual, autoBrightness=true, strategy=
03-11 22:12:31.979 13484 13484 D MediaCodec: shapeMediaFormat: deltas(1): AMessage(what = 0x00000000) = {
03-11 22:12:31.979 13484 13484 D MediaCodec:     int32_t android._encoding-quality-level = 0
03-11 22:12:31.979 13484 13484 D MediaCodec:   }
03-11 22:12:31.979 13484 13507 D MediaCodec: flushMediametrics
03-11 22:12:31.979 13484 13509 D CCodec  : [c2.exynos.h264.encoder] buffers are bound to CCodec for this session
03-11 22:12:31.979 13484 13509 D CCodecConfig: no c2 equivalents for color-format
03-11 22:12:31.979 13484 13509 D CCodecConfig: no c2 equivalents for repeat-previous-frame-after
03-11 22:12:31.979 13484 13509 D CCodecConfig: no c2 equivalents for flags
03-11 22:12:31.979 13484 13509 D CCodecConfig: no c2 equivalents for encoder
03-11 22:12:31.980 13484 13509 D CCodecConfig: c2 config diff is   c2::u32 coded.bitrate.value = 8000000
03-11 22:12:31.980 13484 13509 D CCodecConfig:   c2::float coded.frame-rate.value = 60
03-11 22:12:31.980 13484 13509 D CCodecConfig:   c2::i64 coding.sync-frame-interval.value = 10000000
03-11 22:12:31.980 13484 13509 D CCodecConfig:   c2::u32 raw.size.height = 3120
03-11 22:12:31.980 13484 13509 D CCodecConfig:   c2::u32 raw.size.width = 1440
03-11 22:12:31.980 13484 13509 W Codec2Client: query -- param skipped: index = 3254781982.
03-11 22:12:31.980 13484 13509 D CCodec  : encoding statistics level = 0
03-11 22:12:31.980 13484 13509 D CCodec  : setup formats input: AMessage(what = 0x00000000) = {
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t android._color-format = 2130708361
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t android._dataspace = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t bitrate-mode = 1
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t frame-rate = 60
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t height = 3120
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t intra-refresh-period = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   string mime = "video/raw"
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t prepend-sps-pps-to-idr-frames = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t priority = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t video-qp-average = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t width = 1440
03-11 22:12:31.980 13484 13509 D CCodec  :   Rect crop(0, 0, 1439, 3119)
03-11 22:12:31.980 13484 13509 D CCodec  :   int64_t android._C2MemoryUsage = 1125899906908160
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t color-format = 2130708361
03-11 22:12:31.980 13484 13509 D CCodec  : }
03-11 22:12:31.980 13484 13509 D CCodec  : setup formats output: AMessage(what = 0x00000000) = {
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t bitrate = 8000000
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t bitrate-mode = 1
03-11 22:12:31.980 13484 13509 D CCodec  :   Rect crop(0, 0, 1439, 3119)
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t width = 1440
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t color-standard = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t color-range = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t color-transfer = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t frame-rate = 60
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t height = 3120
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t intra-refresh-period = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t level = 1
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t max-bitrate = 8000000
03-11 22:12:31.980 13484 13509 D CCodec  :   string mime = "video/avc"
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t prepend-sps-pps-to-idr-frames = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t priority = 0
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t profile = 8
03-11 22:12:31.980 13484 13509 D CCodec  :   int32_t video-qp-average = 0
03-11 22:12:31.980 13484 13509 D CCodec  : }
03-11 22:12:31.980 13484 13509 I CCodecConfig: query failed after returning 22 values (BAD_INDEX)
03-11 22:12:31.981 13484 13509 D CCodecConfig: c2 config diff is   c2::u32 coded.pl.level = 20496
03-11 22:12:31.981 13484 13509 D CCodec  : input format changed to AMessage(what = 0x00000000) = {
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t android._color-format = 2130708361
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t android._dataspace = 260
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t bitrate-mode = 1
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t frame-rate = 60
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t height = 3120
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t intra-refresh-period = 0
03-11 22:12:31.981 13484 13509 D CCodec  :   string mime = "video/raw"
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t prepend-sps-pps-to-idr-frames = 0
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t priority = 0
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t video-qp-average = 0
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t width = 1440
03-11 22:12:31.981 13484 13509 D CCodec  :   Rect crop(0, 0, 1439, 3119)
03-11 22:12:31.981 13484 13509 D CCodec  :   int64_t android._C2MemoryUsage = 1125899906908160
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t color-format = 2130708361
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t color-range = 2
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t color-standard = 1
03-11 22:12:31.981 13484 13509 D CCodec  :   int32_t color-transfer = 3
03-11 22:12:31.981 13484 13509 D CCodec  : }
03-11 22:12:31.981 13484 13509 D GraphicBufferSource: setting dataspace: 0x104, acquired=0
03-11 22:12:31.981 13484 13509 D CCodec  : ISConfig minFps=10 => repeatDelayUs=100000
03-11 22:12:31.985  1004 13516 I ExynosC2H264EncComponent: [onStart] resource is obtained (2)
03-11 22:12:31.985  1004 13516 I ExynosC2H264EncComponent: Creating ECOServiceStatsProvider c2.exynos.h264.encoder video/avc
03-11 22:12:31.985  1004 13516 I ECOServiceStatsProvider: Connected to ecoservice
03-11 22:12:31.985  1004 13516 I ECOService: ECOService::obtainSession w: 1440, h: 3120, isCameraRecording: 1
03-11 22:12:31.986  1004 13516 E ECOSession: Failed to create ECOSession with w: 1440, h: 3120, isCameraRecording: 1
03-11 22:12:31.986  1004 13516 E ECOService: ECOService failed to create ECOSession w: 1440, h: 3120, isCameraRecording: 1
03-11 22:12:31.986  1004 13516 E ECOServiceStatsProvider: Failed to obtain an ECO session
03-11 22:12:31.986  1004 13516 E ExynosC2H264EncComponent: Failed to create stats provider
03-11 22:12:31.986  1004 13518 D libexynosv4l2: try node: /dev/video6
03-11 22:12:31.986  1004 13518 D libexynosv4l2: try node: /dev/video7
03-11 22:12:31.986  1004 13518 I libexynosv4l2: node found for device s5p-mfc-enc: /dev/video7
03-11 22:12:31.993  1004 13518 I libexynosv4l2: open video device /dev/video7
03-11 22:12:31.994 13484 13509 W Codec2Client: query -- param skipped: index = 1342179345.
03-11 22:12:31.994 13484 13509 W Codec2Client: query -- param skipped: index = 2415921170.
03-11 22:12:31.994 13484 13509 W Codec2Client: query -- param skipped: index = 2684356609.
03-11 22:12:31.995 13484 13509 D CCodecBufferChannel: [c2.exynos.h264.encoder#2] Created input blockpool with allocatorID 17 => poolID 17 - OK (0)
03-11 22:12:31.995 13484 13509 D C2Store : debug.c2.use_dmabufheaps set, forcing DMABUF Heaps
03-11 22:12:31.995 13484 13509 D C2Store : Using DMABUF Heaps
03-11 22:12:31.995 13484 13509 I CCodecBufferChannel: [c2.exynos.h264.encoder#2] Created output block pool with allocatorID 16 => poolID 66 - OK
03-11 22:12:31.995 13484 13509 D CCodecBufferChannel: [c2.exynos.h264.encoder#2] Configured output block pool ids 66 => OK
03-11 22:12:31.996  1158  1210 W ResourceManagerService: Ignoring request to add new resource entry with value <= 0
03-11 22:12:31.997  1559  1787 I WindowManager: Override config changes=20005df8 {0.0 ?mcc0mnc ?localeList ?layoutDir sw160dp w160dp h160dp 1dpi smll port ?uimode ?night -touch -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 1, 1) mAppBounds=Rect(0, 0 - 1, 1) mMaxBounds=Rect(0, 0 - 1, 1) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefinedmAlwaysOnTop=undefined mRotation=ROTATION_0} ?fontWeightAdjustment} for displayId=17
03-11 22:12:31.997 17394 17427 W DisplayController: Skipping Display Configuration change on non-added display.
03-11 22:12:32.002  1559  1789 I DisplayDeviceRepository: Display device changed: DisplayDeviceInfo{"scrcpy": uniqueId="virtual:com.android.shell,2000,scrcpy,0", 1440 x 3120, modeId 36, renderFrameRate 60.0, defaultModeId 36, supportedModes [{id=36, width=1440, height=3120, fps=60.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], colorMode 0, supportedColorModes [0], hdrCapabilities null, allmSupported false, gameContentTypeSupported false, density 1, 1.0 x 1.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, deviceProductInfo null, state ON, committedStateUNKNOWN, owner com.android.shell (uid 2000), frameRateOverride , brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, hdrSdrRatio NaN, FLAG_PRIVATE, installOrientation 0, displayShapeDisplayShape{ spec=2091232517 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}}
03-11 22:12:32.003  1559  1789 I DisplayDeviceRepository: Display device changed: DisplayDeviceInfo{"scrcpy": uniqueId="virtual:com.android.shell,2000,scrcpy,0", 1440 x 3120, modeId 36, renderFrameRate 60.0, defaultModeId 36, supportedModes [{id=36, width=1440, height=3120, fps=60.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], colorMode 0, supportedColorModes [0], hdrCapabilities null, allmSupported false, gameContentTypeSupported false, density 1, 1.0 x 1.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, deviceProductInfo null, state ON, committedStateUNKNOWN, owner com.android.shell (uid 2000), frameRateOverride , brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, hdrSdrRatio NaN, FLAG_PRIVATE, installOrientation 0, displayShapeDisplayShape{ spec=2091232517 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}}
03-11 22:12:32.003  1559  1789 I DisplayDeviceRepository: Display device changed: DisplayDeviceInfo{"scrcpy": uniqueId="virtual:com.android.shell,2000,scrcpy,0", 1440 x 3120, modeId 36, renderFrameRate 60.0, defaultModeId 36, supportedModes [{id=36, width=1440, height=3120, fps=60.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], colorMode 0, supportedColorModes [0], hdrCapabilities null, allmSupported false, gameContentTypeSupported false, density 1, 1.0 x 1.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, deviceProductInfo null, state ON, committedStateUNKNOWN, owner com.android.shell (uid 2000), frameRateOverride , brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, hdrSdrRatio NaN, FLAG_PRIVATE, installOrientation 0, displayShapeDisplayShape{ spec=2091232517 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}}
03-11 22:12:32.004  1559  1789 I DisplayDeviceRepository: Display device changed: DisplayDeviceInfo{"scrcpy": uniqueId="virtual:com.android.shell,2000,scrcpy,0", 1440 x 3120, modeId 36, renderFrameRate 60.0, defaultModeId 36, supportedModes [{id=36, width=1440, height=3120, fps=60.0, alternativeRefreshRates=[], supportedHdrTypes=[]}], colorMode 0, supportedColorModes [0], hdrCapabilities null, allmSupported false, gameContentTypeSupported false, density 1, 1.0 x 1.0 dpi, appVsyncOff 0, presDeadline 16666666, touch NONE, rotation 0, type VIRTUAL, deviceProductInfo null, state ON, committedStateUNKNOWN, owner com.android.shell (uid 2000), frameRateOverride , brightnessMinimum 0.0, brightnessMaximum 0.0, brightnessDefault 0.0, hdrSdrRatio NaN, FLAG_PRIVATE, installOrientation 0, displayShapeDisplayShape{ spec=2091232517 displayWidth=1440 displayHeight=3120 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}}
03-11 22:12:32.006  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10110/5499
03-11 22:12:32.006  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10168/5728
03-11 22:12:32.006  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10258/23646
03-11 22:12:32.010  1559  1787 I WindowManager: Override config changes=20000d00 {0.0 ?mcc0mnc ?localeList ?layoutDir sw230400dp w230400dp h499200dp 1dpi xlrg long port ?uimode ?night -touch -keyb/v/h-nav/h winConfig={ mBounds=Rect(0, 0 - 1440, 3120) mAppBounds=Rect(0, 0 - 1440, 3120) mMaxBounds=Rect(0, 0 - 1440, 3120) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} ?fontWeightAdjustment}for displayId=17
03-11 22:12:32.011 17394 17427 W DisplayController: Skipping Display Configuration change on non-added display.
03-11 22:12:32.015  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10110/5499
03-11 22:12:32.015  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10168/5728
03-11 22:12:32.015  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10258/23646
03-11 22:12:32.017  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10110/5499
03-11 22:12:32.017  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10168/5728
03-11 22:12:32.017  1559  1789 D DisplayManagerService: Ignore redundant display event 17/2 to 10258/23646
03-11 22:12:32.025   507   507 I hwservicemanager: getTransport: Cannot find entry android.hardware.graphics.allocator@4.0::IAllocator/default in either framework or device VINTF manifest.
03-11 22:12:32.027 13502 13502 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
03-11 22:12:32.028 13484 13500 D GraphicBufferSource: got buffer with new dataSpace #104
03-11 22:12:32.028 13484 13500 D C2OMXNode: dataspace changed to 0x104 pixel format: 0x1
03-11 22:12:32.030 13502 13502 I AndroidRuntime: Using default boot image
03-11 22:12:32.030 13502 13502 I AndroidRuntime: Leaving lock profiling enabled
03-11 22:12:32.032 13502 13502 I app_process: Using CollectorTypeCC GC.
03-11 22:12:32.033  1004 13518 V ExynosVideoOSAL: Codec_OSAL_SetControls: QP[0] range (5 / 50)
03-11 22:12:32.033  1004 13518 V ExynosVideoOSAL: Codec_OSAL_SetControls: QP[1] range (5 / 50)
03-11 22:12:32.033  1004 13518 V ExynosVideoOSAL: Codec_OSAL_SetControls: QP[2] range (5 / 50)
03-11 22:12:32.033  1004 13529 V ExynosVideoOSAL: Codec_OSAL_SetControls: QP[0] range (5 / 50)
03-11 22:12:32.034  1004 13529 V ExynosVideoOSAL: Codec_OSAL_SetControls: QP[1] range (5 / 50)
03-11 22:12:32.034  1004 13529 V ExynosVideoOSAL: Codec_OSAL_SetControls: QP[2] range (5 / 50)
03-11 22:12:32.043  1004 13516 I ExynosC2H264EncComponent: [onUpdateC2Work] set CSD to configurationon output.
03-11 22:12:32.043  1004 13516 I ExynosC2H264EncComponent: [onUpdateC2Work] got SYNC FRAME
03-11 22:12:32.048 13484 13509 D CCodecConfig: c2 config diff is   Buffer coded.init-data.value = {
03-11 22:12:32.048 13484 13509 D CCodecConfig:     00000000:  00 00 00 01 67 64 00 34  ac b4 02 d0 0c 3d 35 01  ....gd.4.....=5.
03-11 22:12:32.048 13484 13509 D CCodecConfig:     00000010:  01 01 07 8a 15 50 00 00  00 01 68 ee 0d 8b        .....P....h...
03-11 22:12:32.103 13502 13502 D nativeloader: InitDefaultPublicLibraries for_preload=1: libandroid.so:libaaudio.so:libamidi.so:libbinder_ndk.so:libc.so:libcamera2ndk.so:libdl.so:libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libicu.so:libicui18n.so:libicuuc.so:libjnigraphics.so:liblog.so:libmediandk.so:libm.so:libnativehelper.so:libnativewindow.so:libOpenMAXAL.so:libOpenSLES.so:libRS.so:libstdc++.so:libsync.so:libvulkan.so:libwebviewchromium_plat_support.so:libz.so
03-11 22:12:32.118 13502 13502 D app_process: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
03-11 22:12:32.118 13502 13502 D app_process: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt72l.dat
03-11 22:12:32.123 13502 13502 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
03-11 22:12:32.140 13502 13502 W libc    : Access denied finding property "ro.product.name_for_attestation"
03-11 22:12:32.140 13502 13502 W libc    : Access denied finding property "ro.product.brand_for_attestation"
03-11 22:12:32.140 13502 13502 W libc    : Access denied finding property "ro.product.model_for_attestation"
03-11 22:12:32.142 13502 13502 W System  : No Compatibility callbacks set! Querying change 242716250
03-11 22:12:32.142 13502 13502 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
rom1v commented 1 year ago

Thank you for your report.

Unfortunately, AOSP sources for this version are not available yet.

So it seems that there are two issues:

invoke method java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener[interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]

(unrelated to audio)

and

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.getDeviceId()' on a null object reference

What is the value of Build.VERSION.SDK_INT on your device?

https://github.com/Genymobile/scrcpy/blob/02586cf21f18d52160a982e9b55e19d8b0b9993f/server/src/main/java/com/genymobile/scrcpy/AudioCapture.java#L49-L52

Does it work with the following patch?

diff --git a/server/src/main/java/com/genymobile/scrcpy/Server.java b/server/src/main/java/com/genymobile/scrcpy/Server.java
index 5800487da..cb9a1e4ab 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Server.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Server.java
@@ -86,7 +86,7 @@ public final class Server {
         // Before Android 11, audio is not supported.
         // Since Android 12, we can properly set a context on the AudioRecord.
         // Only on Android 11 we must fill app info for the AudioRecord to work.
-        mustFillAppInfo |= audio && Build.VERSION.SDK_INT == Build.VERSION_CODES.R;
+        mustFillAppInfo |= audio;

         if (mustFillAppInfo) {
             Workarounds.fillAppInfo();
yume-chan commented 1 year ago

What is the value of Build.VERSION.SDK_INT on your device?

It's still 33 (Build.VERSION_CODES.TIRAMISU)

at android.media.AudioRecord.resolveSessionId(AudioRecord.java:1093)

Decompiled source:

    private static int resolveSessionId(Context context, int requestedSessionId) {
        int deviceId;
        VirtualDeviceManager vdm;
        if (requestedSessionId != 0) {
            return requestedSessionId;
        }
        if (context == null || (deviceId = context.getDeviceId()) == 0 || (vdm = (VirtualDeviceManager) context.getSystemService(VirtualDeviceManager.class)) == null || vdm.getDevicePolicy(deviceId, 1) == 0) {
            return 0;
        }
        return vdm.getAudioRecordingSessionId(deviceId);
    }

Returning 0 looks fine.

diff --git a/server/src/main/java/com/genymobile/scrcpy/FakeContext.java b/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
index 844d6bd8..d611c642 100644
--- a/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
+++ b/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
@@ -31,6 +31,10 @@ public final class FakeContext extends ContextWrapper {
         return PACKAGE_NAME;
     }

+    public int getDeviceId(){
+        return 0;
+    }
+
     @TargetApi(Build.VERSION_CODES.S)
     @Override
     public AttributionSource getAttributionSource() {

This works on Android 14 RC2 emulator. It's a new method in Context class, so no @Override until SDK upgrade.

yume-chan commented 1 year ago

java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener[interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]

public static class Default implements IClipboard {
    public ClipData getPrimaryClip(String pkg, String attributionTag, int userId, int deviceId) {}
    public void setPrimaryClip(ClipData clip, String callingPackage, String attributionTag, int userId, int deviceId) {}
    public void addPrimaryClipChangedListener(IOnPrimaryClipChangedListener listener, String callingPackage, String attributionTag, int userId, int deviceId) {}
}
Namelesswonder commented 1 year ago

What is the value of Build.VERSION.SDK_INT on your device?

It's still 33 (Build.VERSION_CODES.TIRAMISU)

at android.media.AudioRecord.resolveSessionId(AudioRecord.java:1093)

Decompiled source:

    private static int resolveSessionId(Context context, int requestedSessionId) {
        int deviceId;
        VirtualDeviceManager vdm;
        if (requestedSessionId != 0) {
            return requestedSessionId;
        }
        if (context == null || (deviceId = context.getDeviceId()) == 0 || (vdm = (VirtualDeviceManager) context.getSystemService(VirtualDeviceManager.class)) == null || vdm.getDevicePolicy(deviceId, 1) == 0) {
            return 0;
        }
        return vdm.getAudioRecordingSessionId(deviceId);
    }

Returning 0 looks fine.

diff --git a/server/src/main/java/com/genymobile/scrcpy/FakeContext.java b/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
index 844d6bd8..d611c642 100644
--- a/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
+++ b/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
@@ -31,6 +31,10 @@ public final class FakeContext extends ContextWrapper {
         return PACKAGE_NAME;
     }

+    public int getDeviceId(){
+        return 0;
+    }
+
     @TargetApi(Build.VERSION_CODES.S)
     @Override
     public AttributionSource getAttributionSource() {

This works on Android 14 RC2 emulator. It's a new method in Context class, so no @Override until SDK upgrade.

Yep, just that patch is making audio work on the Pixel 7 Pro running Android 14 Developer Preview 2. Also no side effects as I tested with a Pixel XL running Android 11 and it's still fine after the patch.

rom1v commented 1 year ago
diff --git a/server/src/main/java/com/genymobile/scrcpy/FakeContext.java b/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
index 844d6bd8..d611c642 100644
--- a/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
+++ b/server/src/main/java/com/genymobile/scrcpy/FakeContext.java
@@ -31,6 +31,10 @@ public final class FakeContext extends ContextWrapper {
         return PACKAGE_NAME;
     }

+    public int getDeviceId(){
+        return 0;
+    }
+
     @TargetApi(Build.VERSION_CODES.S)
     @Override
     public AttributionSource getAttributionSource() {

This works on Android 14 RC2 emulator. It's a new method in Context class, so no @Override until SDK upgrade.

Thank you :+1:

However, I'm surprised, because the error message suggests that the context is null, not that the getDeviceId() method is not found :confused:

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.getDeviceId()' on a null object reference
at android.content.ContextWrapper.getDeviceId(ContextWrapper.java:1226)
rom1v commented 1 year ago

However, I'm surprised, because the error message suggests that the context is null, not that the getDeviceId() method is not found :confused:

Oh, probably because the default implementation delegates to the inner context, which is null :ok_hand:

rom1v commented 1 year ago

Please test/review branch android14, and confirm that it fixes both audio and clipboard errors.

Namelesswonder commented 1 year ago

Please test/review branch android14, and confirm that it fixes both audio and clipboard errors.

Audio issues are resolved, however the clipboard errors are only semi-resolved.

Device to computer clipboard works, computer clipboard to device text entry works, however computer to device clipboard sync errors and causes the controller to crash leading to the controller crashing and input no longer working.

adb logcat

03-18 15:51:27.448 24914 24933 D scrcpy  : Controller stopped
03-18 15:51:27.449 24914 24933 E AndroidRuntime: FATAL EXCEPTION: Thread-2
03-18 15:51:27.449 24914 24933 E AndroidRuntime: PID: 24914
03-18 15:51:27.449 24914 24933 E AndroidRuntime: java.lang.IllegalArgumentException: Wrong number ofarguments; expected 5, got 3
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.wrappers.ClipboardManager.setPrimaryClip(ClipboardManager.java:97)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.wrappers.ClipboardManager.setText(ClipboardManager.java:126)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.Device.setClipboardText(Device.java:271)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.Controller.setClipboard(Controller.java:394)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:160)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.Controller.control(Controller.java:83)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:90)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda0.run(Unknown Source:2)
03-18 15:51:27.449 24914 24933 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:1012)
03-18 15:51:27.449 24914 24933 E scrcpy  : Exception on thread Thread[Thread-2,5,main]
03-18 15:51:27.449 24914 24933 E scrcpy  : java.lang.IllegalArgumentException: Wrong number of arguments; expected 5, got 3
03-18 15:51:27.449 24914 24933 E scrcpy  :      at java.lang.reflect.Method.invoke(Native Method)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.wrappers.ClipboardManager.setPrimaryClip(ClipboardManager.java:97)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.wrappers.ClipboardManager.setText(ClipboardManager.java:126)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.Device.setClipboardText(Device.java:271)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.Controller.setClipboard(Controller.java:394)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:160)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.Controller.control(Controller.java:83)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:90)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda0.run(Unknown Source:2)
03-18 15:51:27.449 24914 24933 E scrcpy  :      at java.lang.Thread.run(Thread.java:1012)

I've also done some more testing on the shortcuts and all work except for trying to turn the display off while mirroring.

adb logcat

03-18 16:44:22.446   873   897 E scrcpy  : Could not invoke method
03-18 16:44:22.446   873   897 E scrcpy  : java.lang.NoSuchMethodException: android.view.SurfaceControl.getPhysicalDisplayIds []
03-18 16:44:22.446   873   897 E scrcpy  :      at java.lang.Class.getMethod(Class.java:2771)
03-18 16:44:22.446   873   897 E scrcpy  :      at java.lang.Class.getMethod(Class.java:2351)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.wrappers.SurfaceControl.getGetPhysicalDisplayIdsMethod(SurfaceControl.java:137)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.wrappers.SurfaceControl.getPhysicalDisplayIds(SurfaceControl.java:144)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.Device.setScreenPowerMode(Device.java:282)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:165)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.Controller.control(Controller.java:83)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:90)
03-18 16:44:22.446   873   897 E scrcpy  :      at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda0.run(Unknown Source:2)
03-18 16:44:22.446   873   897 E scrcpy  :      at java.lang.Thread.run(Thread.java:1012)
03-18 16:44:22.452   873   897 E scrcpy  : Could not get physical display ids
rom1v commented 1 year ago

however computer to device clipboard sync errors and causes the controller to crash leading to the controller crashing and input no longer working.

Oops, stupid mistake in my code. I just force-pushed android14. Could you retry, please?

I've also done some more testing on the shortcuts and all work except for trying to turn the display off while mirroring.

Thank you for your tests :+1:

java.lang.NoSuchMethodException: android.view.SurfaceControl.getPhysicalDisplayIds []

Could you please post your framework.jar?

adb pull /system/framework/framework.jar
Namelesswonder commented 1 year ago

Oops, stupid mistake in my code. I just force-pushed android14. Could you retry, please?

That fixes the issue. Also tested on Android 11 and no regressions.

Could you please post your framework.jar?

framework.zip

rom1v commented 1 year ago

Hmm, SurfaceControl.getPhysicalDisplayIds() does not exist anymore, and I don't know how it was replaced.

What if you just bypass the multi-display code:

diff --git a/server/src/main/java/com/genymobile/scrcpy/Device.java b/server/src/main/java/com/genymobile/scrcpy/Device.java
index 3d83f73eb..0f181d8f6 100644
--- a/server/src/main/java/com/genymobile/scrcpy/Device.java
+++ b/server/src/main/java/com/genymobile/scrcpy/Device.java
@@ -277,7 +277,7 @@ public final class Device {
      * @param mode one of the {@code POWER_MODE_*} constants
      */
     public static boolean setScreenPowerMode(int mode) {
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+        if (false && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
             // Change the power mode for all physical displays
             long[] physicalDisplayIds = SurfaceControl.getPhysicalDisplayIds();
             if (physicalDisplayIds == null) {
Namelesswonder commented 1 year ago

Still a no go.

03-19 12:15:16.425 25899 25920 E scrcpy  : Could not invoke method
03-19 12:15:16.425 25899 25920 E scrcpy  : java.lang.NoSuchMethodException: android.view.SurfaceControl.getInternalDisplayToken []
03-19 12:15:16.425 25899 25920 E scrcpy  :      at java.lang.Class.getMethod(Class.java:2771)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at java.lang.Class.getMethod(Class.java:2351)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.wrappers.SurfaceControl.getGetBuiltInDisplayMethod(SurfaceControl.java:96)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.wrappers.SurfaceControl.getBuiltInDisplay(SurfaceControl.java:104)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.Device.setScreenPowerMode(Device.java:297)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:165)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.Controller.control(Controller.java:83)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:90)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda0.run(Unknown Source:2)
03-19 12:15:16.425 25899 25920 E scrcpy  :      at java.lang.Thread.run(Thread.java:1012)
03-19 12:15:16.428 25899 25920 E scrcpy  : Could not get built-in display
rom1v commented 1 year ago

Hmm… ok, so I don't know :confused:

As a side note, there is a new class android.view.ScreenCapture that may be relevant in Android 14, but I don't know how to get a valid displayToken to call setDisplayPowerMode().

rom1v commented 1 year ago

I merged 57f879d68a72c0d84f17d71ddf49c3b564bc614c (clipboard) and 2fff9b9edf749dd7a8ccf36fe2df3c3587f535ab (context/audio) to make scrcpy work on Android 14 preview 2. It remains the "turn screen off" feature, but I don't know how to fix it.

rom1v commented 1 year ago

(now that the source code of Android 14 is released)

java.lang.NoSuchMethodException: android.view.SurfaceControl.getPhysicalDisplayIds []

It seems that the methods getPhysicalDisplayIds() and getPhysicalDisplayToken() have just been moved from SurfaceControl to DisplayControl in Android 14: https://github.com/aosp-mirror/platform_frameworks_base/blob/android-14.0.0_r2/services/core/java/com/android/server/display/DisplayControl.java#L94-L106

I don't have any device with Android 14 to test though.

rom1v commented 1 year ago

Oh, I hadn't noticed, this class is in services/ (so it is not accessible from the running process, it is used by a server server in another process), so we can't access it from scrcpy :/

This is caused by this commit: https://github.com/aosp-mirror/platform_frameworks_base/commit/e2f333728788ad88a65208a6119aed90e13e7040

AndroidDeveloperLB commented 1 year ago

Is there any workaround for this? root? Brightness?

AndroidDeveloperLB commented 1 year ago

Is there perhaps an issue-tracker post about this, so we can star it, and maybe Google will allow it again?

rom1v commented 1 year ago

I opened an issue: https://issuetracker.google.com/issues/303565669

Please do not comment on that issue just to say that you are impacted, this would just add noise.

perettigiuliano commented 1 year ago

(now that the source code of Android 14 is released)

java.lang.NoSuchMethodException: android.view.SurfaceControl.getPhysicalDisplayIds []

It seems that the methods getPhysicalDisplayIds() and getPhysicalDisplayToken() have just been moved from SurfaceControl to DisplayControl in Android 14: https://github.com/aosp-mirror/platform_frameworks_base/blob/android-14.0.0_r2/services/core/java/com/android/server/display/DisplayControl.java#L94-L106

I don't have any device with Android 14 to test though.

I can test for you on my pixel 6a

rom1v commented 1 year ago

It remains 3 scrcpy features broken in Android 14: