Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
110.25k stars 10.57k forks source link

Ubuntu 20.04.6 LTS runs scrcpy,The mobile adb connected to Pixel4 automatically disconnects! #4177

Closed MIkeeJY closed 1 year ago

MIkeeJY commented 1 year ago

Environment

Describe the bug scrcpy 2.1.1 https://github.com/Genymobile/scrcpy INFO: ADB device found: INFO: --> (usb) 99161FFAZ007M6 device AOSP_on_flame /usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 14.7 MB/s (56995 bytes in 0.004s) [server] INFO: Device: [Google] Android AOSP on flame (Android 13) INFO: Renderer: opengl INFO: OpenGL version: 3.1 Mesa 21.2.6 INFO: Trilinear filtering enabled INFO: Texture: 1080x2280 ERROR: Demuxer 'audio': stream disabled due to connection error ERROR: Demuxer error

On errors, please provide the output of the console (and adb logcat if relevant).

2023-07-18 17:19:13.985 0-0/? E/: c2   4535 power_supply main: driver failed to report `flash_trigger' property: -1
2023-07-18 17:19:22.984 1082-4738/? E/QC2V4l2Driver: [avcE_20] failed to set buffer size limit to 4
2023-07-18 17:19:22.991 1082-4738/? E/QC2V4l2Codec: [avcE_20]  OPAQUE is not a supported pixel format!
2023-07-18 17:19:22.991 1082-4738/? E/QC2Comp: [avcE_20] configureCodec: Failed to set updated param Input::PixelFormat
2023-07-18 17:19:22.992 1082-1482/? E/QC2Interface: Few parameters failed to configure
2023-07-18 17:19:23.008 1082-4738/? E/QC2C2DEngine: calcYSize: unsupported color format, RGBA8888(1)
2023-07-18 17:19:23.019 1082-4738/? E/ECOSession: Failed to create ECOSession with w: 1080, h: 2280, isCameraRecording: 1
2023-07-18 17:19:23.019 1082-4738/? E/ECOService: ECOService failed to create ECOSession w: 1080, h: 2280, isCameraRecording: 1
2023-07-18 17:19:25.983 1731-2926/? E/AppOps: Attribution not found: uid=2000 pkg=com.android.shell(null) op=RECORD_AUDIO
2023-07-18 17:19:25.984 1310-2556/? E/mediaserver: unlinkToDeath: removed reference to death recipient but unlink failed.
2023-07-18 17:19:25.984 1310-2556/? E/IPCThreadState: attemptIncStrongHandle(37): Not supported
2023-07-18 17:19:25.991 1731-4771/? E/AppOps: Operation not started: uid=2000 pkg=com.android.shell(null) op=RECORD_AUDIO_OUTPUT
2023-07-18 17:19:26.878 0-0/? E/: c1   1065 iaxxx-spi spi5.0: Timeout for wakeup event rc :0 wake flag :0
2023-07-18 17:19:27.410 0-0/? E/: c3   4533 power_supply main: driver failed to report `flash_trigger' property: -1
2023-07-18 17:19:27.618 1038-3256/? E/audio_hw_utils: send_app_type_cfg_for_device: Could not get ctl for mixer cmd - Audio Stream Capture 42 App Type Cfg
2023-07-18 17:19:27.631 0-0/? E/: c0   3256 send_afe_cal_type cal_block not found!!

E/StrictMode: Tried to access the API:ViewConfiguration which needs to have proper configuration from a non-UI Context:com.android.quickstep.inputconsumers.OtherActivityInputConsumer@c609bbb The API:ViewConfiguration needs a proper configuration. Use UI contexts such as an activity or a context created via createWindowContext(Display, int, Bundle) or  createConfigurationContext(Configuration) with a proper configuration.
    java.lang.IllegalAccessException: Tried to access the API:ViewConfiguration which needs to have proper configuration from a non-UI Context:com.android.quickstep.inputconsumers.OtherActivityInputConsumer@c609bbb
        at android.os.StrictMode.assertConfigurationContext(StrictMode.java:2295)
        at android.view.ViewConfiguration.get(ViewConfiguration.java:526)
        at com.android.quickstep.inputconsumers.OtherActivityInputConsumer.<init>(OtherActivityInputConsumer.java:169)
        at com.android.quickstep.TouchInteractionService.createOtherActivityInputConsumer(TouchInteractionService.java:821)
        at com.android.quickstep.TouchInteractionService.newBaseConsumer(TouchInteractionService.java:805)
        at com.android.quickstep.TouchInteractionService.newConsumer(TouchInteractionService.java:710)
        at com.android.quickstep.TouchInteractionService.onInputEvent(TouchInteractionService.java:605)
        at com.android.quickstep.TouchInteractionService.$r8$lambda$QnySfMPM3HQvC_OREg1W70p37mY(Unknown Source:0)
        at com.android.quickstep.TouchInteractionService$$ExternalSyntheticLambda8.onInputEvent(Unknown Source:2)
        at com.android.systemui.shared.system.InputChannelCompat$InputEventReceiver$1.onInputEvent(InputChannelCompat.java:74)
        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:267)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:335)
        at android.os.Looper.loopOnce(Looper.java:161)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
image

But everything is good at the same environment on Mac!I don't know why?

MIkeeJY commented 1 year ago

But when I used XiaoMi device,it won't happen! XiaoMi can show screen on Ubuntu System~

rom1v commented 1 year ago

It's specific to your device system (and "quickstep", whatever it is).

MIkeeJY commented 1 year ago

@rom1v at last,I found that pixel4 need a special USB data line!!!