Genymobile / scrcpy

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

Scrcpy cannot connect to my Shield table #545

Closed juasjuasie closed 4 years ago

juasjuasie commented 5 years ago

the only error my computer gives is this:

scrcpy-server.jar: 1 file pushed. 2.1 MB/s (19734 bytes in 0.009s)
ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xfffffff4
        at android.media.MediaCodec.native_configure(Native Method)
        at android.media.MediaCodec.configure(MediaCodec.java:1943)
        at android.media.MediaCodec.configure(MediaCodec.java:1872)
        at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:157)
        at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:68)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:28)
        at com.genymobile.scrcpy.Server.main(Server.java:110)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:287)
ERROR: Could not open video stream
INFO: Initial texture: 1200x1920
Press any key to continue...

I did try to change my resolution, but it doesn't work

rom1v commented 5 years ago

Something in adb logcat?

juasjuasie commented 5 years ago

not something from the timeframe i executed scrcpy recently

juasjuasie commented 5 years ago

Something in adb logcat?

wait i just needed to specify to make the table share docs. Here is the log:

05-20 16:16:40.586   254   254 D Raydium_ts_main: ## Report rate in 10 seconds =1290
05-20 16:16:40.596   440   556 E LightsService: Light requested not available on this device. 2
05-20 16:16:44.972   440  1957 W AlarmManager: Window length 1152921504606846975ms suspiciously long; limiting to 1 hour
05-20 16:16:49.981   440   477 E LightsService: Light requested not available on this device. 2
05-20 16:17:33.182  1057  1071 I zygote  : Background concurrent copying GC freed 154540(7MB) AllocSpace objects, 2(104KB) LOS objects, 49% free, 7MB/15MB, paused 1.125ms total 149.451ms
05-20 16:18:20.112   254   254 D Raydium_ts_main: ## Report rate in 10 seconds =1163
05-20 16:18:20.140   440   556 E LightsService: Light requested not available on this device. 2
05-20 16:18:22.431  1514  1550 I Finsky  : [127] ifx.run(3): Stats for Executor: BlockingExecutor ihh@c6818a8[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 18]
05-20 16:18:22.432  1514  1550 I Finsky  : [127] ifx.run(3): Stats for Executor: LightweightExecutor ihh@9c5dfc1[Running, pool size = 3, active threads = 0, queued tasks = 0, completed tasks = 61]
05-20 16:18:22.435  1514  1550 I Finsky  : [127] ifx.run(3): Stats for Executor: bgExecutor ihh@3b34366[Running, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 75]
05-20 16:18:29.587   254   254 D Raydium_ts_main: ## Report rate in 10 seconds =2404
05-20 16:18:39.587   254   254 D Raydium_ts_main: ## Report rate in 10 seconds =2361
05-20 16:18:43.294   440   477 E LightsService: Light requested not available on this device. 2
05-20 16:20:11.520   254   254 D Raydium_ts_main: ## Report rate in 10 seconds =652
05-20 16:20:11.529   440   556 E LightsService: Light requested not available on this device. 2
05-20 16:20:11.534   643   643 D StatusBar: disable<e i a s b h r c s q >
05-20 16:20:15.177   440   736 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10008000 cmp=com.android.settings/.deviceinfo.UsbModeChooserActivity} from uid 1000
05-20 16:20:15.202   440   719 E ActivityManager: applyOptionsLocked: Unknown animationType=0
05-20 16:20:15.273   245   245 D SurfaceFlinger: duplicate layer name: changing com.android.settings/com.android.settings.deviceinfo.UsbModeChooserActivity to com.android.settings/com.android.settings.deviceinfo.UsbModeChooserActivity#1
05-20 16:20:15.330   440   475 I ActivityManager: Displayed com.android.settings/.deviceinfo.UsbModeChooserActivity: +109ms
05-20 16:20:15.343  3547  3558 I zygote  : Background concurrent copying GC freed 54321(2MB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6MB/13MB, paused 71us total 117.476ms
05-20 16:20:15.536   643   643 D StatusBar: disable<e i a s b h r c s q >
05-20 16:20:16.354   440   473 I UsbDeviceManager: Setting USB config to mtp,adb
05-20 16:20:16.387   440   737 W ActivityManager: Finishing task with all activities already finished
05-20 16:20:16.387   440   737 W ActivityManager: Duplicate finish request for ActivityRecord{219a39 u0 com.android.settings/.deviceinfo.UsbModeChooserActivity t115 f}
05-20 16:20:16.446  3547  3547 W Settings: Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
05-20 16:20:16.457   440  5188 I WifiService: getVerboseLoggingLevel uid=1000
05-20 16:20:16.458  3547  6002 W TileUtils: Found com.android.settings.backup.BackupSettingsActivity for intent Intent { act=com.android.settings.action.SETTINGS pkg=com.android.settings } missing metadata com.android.settings.category
05-20 16:20:16.458   440   737 I WifiService: getAggressiveHandover uid=1000
05-20 16:20:16.458   440  1957 I WifiService: getAllowScansWithTraffic uid=1000
05-20 16:20:16.460  6001  6003 I adbd    : initializing functionfs
05-20 16:20:16.460  6001  6003 I adbd    : opening control endpoint /dev/usb-ffs/adb/ep0
05-20 16:20:16.462  3547  3547 D BluetoothA2dp: getCodecStatus
05-20 16:20:16.473  3547  6004 D SharedPreferencesLogger: Tried to log string preference development.DevelopmentSettings/select_usb_configuration = mtp
05-20 16:20:16.481  3547  6002 D Settings: No enabled state changed, skipping updateCategory call
05-20 16:20:16.481  3547  6005 D SharedPreferencesLogger: Tried to log string preference development.DevelopmentSettings/select_usb_configuration = mtp
05-20 16:20:16.663   440   473 D UsbDeviceManager: Clear notification
05-20 16:20:16.666   440   473 D UsbDeviceManager: push notification:USB pour le transfert de fichiers
05-20 16:20:16.739  1256  1256 D MtpService: Adding MTP storage 0x10001 at /storage/emulated/0
05-20 16:20:16.740  1256  1256 D MtpService: starting MTP server in MTP mode with storage /storage/emulated/0
05-20 16:20:16.743  1256  1256 D MtpService: Adding MTP storage 0x10001 at /storage/emulated/0
05-20 16:20:16.773  6001  6003 I adbd    : functionfs successfully initialized
05-20 16:20:16.773  6001  6003 I adbd    : registering usb transport
05-20 16:20:17.391  6001  6001 I adbd    : Calling send_auth_request...
05-20 16:20:17.448  6001  6001 I adbd    : Loading keys from /data/misc/adb/adb_keys
05-20 16:20:17.454  6001  6001 I adbd    : adb client authorized
05-20 16:20:20.587   254   254 D Raydium_ts_main: ## Report rate in 10 seconds =2138
05-20 16:20:24.566   440   477 E LightsService: Light requested not available on this device. 2
05-20 16:20:33.022  6016  6016 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
05-20 16:20:33.027  6016  6016 W app_process: Could not reserve sentinel fault page
05-20 16:20:33.115  6016  6016 I app_process: The ClassLoaderContext is a special shared library.
05-20 16:20:33.148  6016  6016 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
05-20 16:20:33.155  6016  6016 I app_process: Thread[1,tid=6016,Native,Thread*=0xafc5a000,peer=0x12c01d00,"main"] recursive attempt to load library "/system/lib/libmedia_jni.so"
05-20 16:20:33.155  6016  6016 D MtpDeviceJNI: register_android_mtp_MtpDevice
05-20 16:20:33.156  6016  6016 I app_process: Thread[1,tid=6016,Native,Thread*=0xafc5a000,peer=0x12c01d00,"main"] recursive attempt to load library "/system/lib/libmedia_jni.so"
05-20 16:20:33.156  6016  6016 I app_process: Thread[1,tid=6016,Native,Thread*=0xafc5a000,peer=0x12c01d00,"main"] recursive attempt to load library "/system/lib/libmedia_jni.so"
05-20 16:20:33.159   266   266 I OMXMaster: makeComponentInstance(OMX.Nvidia.h264.encoder) in android.hardwar process
05-20 16:20:33.160   266   278 E OMXNodeInstance: setParameter(0xb34a3680:Nvidia.h264.encoder, OMX.google.android.index.enableAndroidNativeBuffers(0x7fc00004): Output:1 en=0) ERROR: BadParameter(0x80001005)
05-20 16:20:33.160   266   278 E OMXNodeInstance: setParameter(0xb34a3680:Nvidia.h264.encoder, OMX.google.android.index.allocateNativeHandle(0x7fc0001e): Output:1 en=0) ERROR: NotImplemented(0x80001006)
05-20 16:20:33.161  6016  6027 W OMXUtils: do not know color format 0x7f000789 = 2130708361
05-20 16:20:33.161   266   278 D NvOsDebugPrintf: Framerate set to : 60 at NvxVideoEncoderSetParameter
05-20 16:20:33.162   266   266 E OMXNodeInstance: getParameter(0xb34a3680:Nvidia.h264.encoder, ParamVideoAvc(0x600000d)) ERROR: InsufficientResources(0x80001000)
05-20 16:20:33.162  6016  6027 E ACodec  : [OMX.Nvidia.h264.encoder] configureCodec returning error -12
05-20 16:20:33.162  6016  6027 E ACodec  : signalError(omxError 0x80001001, internalError -12)
05-20 16:20:33.162  6016  6026 E MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 3
05-20 16:20:33.162  6016  6016 E MediaCodec: configure failed with err 0xfffffff4, resetting...
05-20 16:20:33.163   266   760 I OMXMaster: makeComponentInstance(OMX.Nvidia.h264.encoder) in android.hardwar process
05-20 16:20:33.164   263   816 E ProcessInfo: pid 6016 invalid OOM adjustments value -10000
05-20 16:20:33.164   263   816 E ResourceManagerService: getLowestPriorityBiggestClient_l: can't get process priority for pid 6016
05-20 16:20:33.164   263   816 E ProcessInfo: pid 6016 invalid OOM adjustments value -10000
05-20 16:20:33.164   263   816 E ResourceManagerService: getLowestPriorityBiggestClient_l: can't get process priority for pid 6016
05-20 16:20:33.164   263   816 E ProcessInfo: pid 6016 invalid OOM adjustments value -10000
05-20 16:20:33.165   263   816 E ResourceManagerService: getLowestPriorityBiggestClient_l: can't get process priority for pid 6016
05-20 16:20:33.165  6016  6016 D AndroidRuntime: Shutting down VM
05-20 16:20:33.166  6016  6016 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
05-20 16:20:33.166  6016  6016 E AndroidRuntime: android.media.MediaCodec$CodecException: Error 0xfffffff4
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at android.media.MediaCodec.native_configure(Native Method)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at android.media.MediaCodec.configure(MediaCodec.java:1943)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at android.media.MediaCodec.configure(MediaCodec.java:1872)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:157)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:68)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at com.genymobile.scrcpy.Server.scrcpy(Server.java:28)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at com.genymobile.scrcpy.Server.main(Server.java:110)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
05-20 16:20:33.166  6016  6016 E AndroidRuntime:        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:287)
05-20 16:20:33.166  6016  6016 E scrcpy  : Exception on thread Thread[main,5,main]
05-20 16:20:33.166  6016  6016 E scrcpy  : android.media.MediaCodec$CodecException: Error 0xfffffff4
05-20 16:20:33.166  6016  6016 E scrcpy  :      at android.media.MediaCodec.native_configure(Native Method)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at android.media.MediaCodec.configure(MediaCodec.java:1943)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at android.media.MediaCodec.configure(MediaCodec.java:1872)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at com.genymobile.scrcpy.ScreenEncoder.configure(ScreenEncoder.java:157)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:68)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at com.genymobile.scrcpy.Server.scrcpy(Server.java:28)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at com.genymobile.scrcpy.Server.main(Server.java:110)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
05-20 16:20:33.166  6016  6016 E scrcpy  :      at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:287)
05-20 16:20:33.389   266   278 E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
rom1v commented 5 years ago
E OMXNodeInstance: getParameter(0xb34a3680:Nvidia.h264.encoder, ParamVideoAvc(0x600000d)) ERROR: InsufficientResources(0x80001000)

I did try to change my resolution, but it doesn't work

For example, did you try:

scrcpy -m800

?

juasjuasie commented 5 years ago

yep

rom1v commented 5 years ago

Does screenrecord work?

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4
juasjuasie commented 5 years ago

i can pull, but i can't screenrecord:

ERROR: unable to configure video/avc codec at 1200x1920 (err=-12)
WARNING: failed at 1200x1920, retrying at 720x1280
ERROR: unable to configure video/avc codec at 720x1280 (err=-12)
rom1v commented 5 years ago

OK, so there is definitely a problem with your hardware encoder.

I guess it's the same with even lower definition:

scrcpy -m400
juasjuasie commented 5 years ago

the same indeed.

rom1v commented 4 years ago

If native screenrecord does not work, there's probably nothing scrcpy can do.