Scrcpy: android watch (Android 4) not showing up

Created on 26 Mar 2018  路  21Comments  路  Source: Genymobile/scrcpy

I have downloaded windows prebuilt 1.1 and device is listed under adb devices (usb debugging enabled) but scrcpy.exe runs without loading watchable screen. watch is called qw09.

android4 codec

Most helpful comment

The video encoder does not work below 5.0. (#98 (comment))

Ugrmpf. Will change hardware to catch up with requirements.

Anyway, you're my hero, Romain! This is the best invention for Android since sliced bread!

All 21 comments

I have run adb shell screenrecord with success though. How do I get to the codecs screen still ?

I have run adb shell screenrecord with success though.

Ah, interesting. Could you try https://github.com/Genymobile/scrcpy/issues/82#comment-374227944?

@elig0n Just to be sure this is the same problem, could you post the output (cf FAQ for Windows), please?

@elig0n I just created a project to give more infos about video codecs available: CheckVideoCodecs.

Please post its results for your watch.

$ ./scrcpy.exe
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'

It's Android 4.4 so apparently it can't be supported, right?

It's Android 4.4 so apparently it can't be supported, right?

That's probably the problem, yes.

So I just implemented the changes required to support Android 4.4 (API 19), in branch api19.

Could you test this version, please? (you need to recompile the server, do not use the prebuilt)

@elig0n Could you test the branch api19, please?

If it works, I'll be able to merge it into dev.

407 KB/s (19334 bytes in 0.046s)
error: closed
error: closed
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
Aborted

scrcpy v1.1

dependencies:

  • SDL 2.0.4
  • libavcodec 56.60.100
  • libavformat 56.40.101
  • libavutil 54.31.100

OK, so the server crashed (I guess Aborted comes from the server).

Could you check adb logcat just after that, please?

what should I be looking for exactly?
here are some samples from what I received and might be related:

W/ADB_SERVICES( 183): create_local_service_socket() name=localabstract:scrcpy
W/ADB_SERVICES( 183): service_to_fd() name=localabstract:scrcpy
W/ADB_SERVICES( 183): create_local_service_socket fail

W/ADB_SERVICES( 183): create_local_service_socket() name=shell:rm /data/local/tmp/scrcpy-server.jar
W/ADB_SERVICES( 183): service_to_fd() name=shell:rm /data/local/tmp/scrcpy-server.jar
W/ADB_SERVICES( 183): read_meminfo() mem_free=10312
W/ADB_SERVICES( 183): create_subprocess() ret_fd=19 pid=18095
W/ADB_SERVICES( 183): LS(46): bound to 'shell:rm /data/local/tmp/scrcpy-server.jar' via 19
W/ADB_SERVICES(18095): adb: unable to open /proc/18095/oom_adj

D/ActivityThread( 853): SVC-STOP_SERVICE handled : 0 / android.os.BinderProxy@421ebcb8

On an Android 4.4 device, here is the logcat:

D/AndroidRuntime( 5934):
D/AndroidRuntime( 5934): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 5934): CheckJNI is OFF
E/AndroidRuntime( 5934): readIfwiVersion() open dev file error: 13
I/AndroidRuntime( 5934): Kernel Release Version: 3.4.34-3241387
D/AndroidRuntime( 5934): setted country_code = France
D/AndroidRuntime( 5934): setted countryiso_code = FR
D/AndroidRuntime( 5934): setted sales_code = XEF
D/AndroidRuntime( 5934): readGMSProperty: start
D/AndroidRuntime( 5934): readGMSProperty: already setted!!
D/AndroidRuntime( 5934): readGMSProperty: end
D/AndroidRuntime( 5934): addProductProperty: start
I/dalvikvm( 5934): No library specified. The standard exception handler will be used
D/dalvikvm( 5934): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 5934): Added shared lib libjavacore.so 0x0
D/dalvikvm( 5934): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 5934): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 5934): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
E/dalvikvm( 5934): Dex cache directory isn't writable: /data/dalvik-cache
I/dalvikvm( 5934): Unable to open or create cache for /data/local/tmp/scrcpy-server.jar (/data/dalvik-cache/data@local@[email protected]@classes.dex)
D/dalvikvm( 5934): Extra Options: not specified
E/appproc ( 5934): ERROR: could not find class 'com.genymobile.scrcpy.Server'
E/dalvikvm( 5934): JNI posting fatal error: Native registration unable to find class 'android/debug/JNITest'; aborting...
I/dalvikvm( 5934): "main" prio=5 tid=1 NATIVE
I/dalvikvm( 5934):   | group="main" sCount=0 dsCount=0 obj=0x4331e3a0 self=0x433029c0
I/dalvikvm( 5934):   | sysTid=5934 nice=0 sched=0/0 cgrp=default handle=1073954880
I/dalvikvm( 5934):   | state=R schedstat=( 377627839 51319209 120 ) utm=26 stm=11 core=1
I/dalvikvm( 5934):   #00  pc 00114d08  /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+72)
I/dalvikvm( 5934):   #01  pc 000f13fb  /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+1099)
I/dalvikvm( 5934):   #02  pc 000f1665  /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+69)
I/dalvikvm( 5934):   #03  pc 000d24dc  /system/lib/libdvm.so
I/dalvikvm( 5934):   #04  pc 00001cd1  /system/lib/libnativehelper.so (jniRegisterNativeMethods+225)
I/dalvikvm( 5934):   #05  pc 000fe4d7  /system/lib/libandroid_runtime.so (android::register_android_debug_JNITest(_JNIEnv*)+55)
I/dalvikvm( 5934):   #06  pc 00064552  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+290)
I/dalvikvm( 5934):   #07  pc 0000107c  /system/bin/app_process
I/dalvikvm( 5934):   #08  pc 0001dd4a  /system/lib/libc.so (__libc_init+90)
I/dalvikvm( 5934):   #09  pc 00001206  /system/bin/app_process
I/dalvikvm( 5934):   #10  pc 00000005  <unknown>
I/dalvikvm( 5934):   at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 5934):   at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 5934):
E/dalvikvm( 5934): VM aborting
F/libc    ( 5934): Fatal signal 6 (SIGABRT) at 0x0000172e (code=-6), thread 5934 (app_process)
W/MPEG2TSExtractor( 1889): Completed reading, end of file, 0 : 192 mClipSize=40501248 dataSrcOffset=40501248
I/AnotherPacketSource( 1889): Flushing all Access units for seek
I/DEBUG   ( 5894): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 5894): Build fingerprint: 'samsung/santos10wifixx/santos10wifi:4.4.2/KOT49H/P5210XXUBNK2:user/release-keys'
I/DEBUG   ( 5894): Revision: '0'
I/DEBUG   ( 5894): pid: 5934, tid: 5934, name: app_process  >>> app_process <<<
I/DEBUG   ( 5894): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
W/NativeCrashListener( 2333): Couldn't find ProcessRecord for pid 5934
I/DEBUG   ( 5894):     eax 00000000  ebx 0000172e  ecx 0000172e  edx 00000006
I/DEBUG   ( 5894): AM write failure (32 / Broken pipe)
I/DEBUG   ( 5894):     esi 00000016  edi bf89d83c
I/DEBUG   ( 5894):     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
I/DEBUG   ( 5894):     eip 400a3426  ebp 403194c3  esp bf89d590  flags 00000207
I/DEBUG   ( 5894):
I/DEBUG   ( 5894): backtrace:
I/DEBUG   ( 5894):     #00  pc 00049426  /system/lib/libc.so
I/DEBUG   ( 5894):
I/DEBUG   ( 5894): stack:
I/DEBUG   ( 5894):          bf89d550  00000004 
I/DEBUG   ( 5894):          bf89d554  58e80710  /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG   ( 5894):          bf89d558  00000000 
I/DEBUG   ( 5894):          bf89d55c  14b8982b 
I/DEBUG   ( 5894):          bf89d560  00000020 
I/DEBUG   ( 5894):          bf89d564  43303950 
I/DEBUG   ( 5894):          bf89d568  40047d39  /system/lib/libcutils.so
I/DEBUG   ( 5894):          bf89d56c  14b8982b 
I/DEBUG   ( 5894):          bf89d570  58e6a000 
I/DEBUG   ( 5894):          bf89d574  00000000 
I/DEBUG   ( 5894):          bf89d578  00000000 
I/DEBUG   ( 5894):          bf89d57c  40407f8c  /system/lib/libnativehelper.so
I/DEBUG   ( 5894):          bf89d580  4011d208  /system/lib/libc.so
I/DEBUG   ( 5894):          bf89d584  00000000 
I/DEBUG   ( 5894):          bf89d588  00000000 
I/DEBUG   ( 5894):          bf89d58c  0000172e 
I/DEBUG   ( 5894):     #00  bf89d590  00000006 
I/DEBUG   ( 5894):          bf89d594  40034040 
I/DEBUG   ( 5894):          bf89d598  0000172e 
I/DEBUG   ( 5894):          bf89d59c  400832ea  /system/lib/libc.so
I/DEBUG   ( 5894):          bf89d5a0  0000172e 
I/DEBUG   ( 5894):          bf89d5a4  0000172e 
I/DEBUG   ( 5894):          bf89d5a8  00000006 
I/DEBUG   ( 5894):          bf89d5ac  bf89d5fc  [stack]
I/DEBUG   ( 5894):          bf89d5b0  432fee70 
I/DEBUG   ( 5894):          bf89d5b4  bf89d5fc  [stack]
I/DEBUG   ( 5894):          bf89d5b8  432fee70 
I/DEBUG   ( 5894):          bf89d5bc  4008365a  /system/lib/libc.so
I/DEBUG   ( 5894):          bf89d5c0  40034040 
I/DEBUG   ( 5894):          bf89d5c4  00000006 
I/DEBUG   ( 5894):          bf89d5c8  4011d140  /system/lib/libc.so
I/DEBUG   ( 5894):          bf89d5cc  400c7c93  /system/lib/libc.so
I/DEBUG   ( 5894): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 5934

I will investigate when I have access to a 4.4 device (soon).

I get a device to investigate.

The above problem is about /data/dalvik-cache not being writable:

E/dalvikvm( 5934): Dex cache directory isn't writable: /data/dalvik-cache
I/dalvikvm( 5934): Unable to open or create cache for /data/local/tmp/scrcpy-server.jar (/data/dalvik-cache/data@local@[email protected]@classes.dex)

This is solved by creating /data/local/tmp/dalvik-cache and using it by declaring the environment variable ANDROID_DATA=/data/local/tmp (stackoverflow).

However, this is not sufficient. The video still does not work:

/AndroidRuntime( 5697): 
D/AndroidRuntime( 5697): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 5697): CheckJNI is OFF
E/AndroidRuntime( 5697): readIfwiVersion() open dev file error: 13
I/AndroidRuntime( 5697): Kernel Release Version: 3.4.34-3241387
D/AndroidRuntime( 5697): setted country_code = France
D/AndroidRuntime( 5697): setted countryiso_code = FR
D/AndroidRuntime( 5697): setted sales_code = XEF
D/AndroidRuntime( 5697): readGMSProperty: start
D/AndroidRuntime( 5697): readGMSProperty: already setted!!
D/AndroidRuntime( 5697): readGMSProperty: end
D/AndroidRuntime( 5697): addProductProperty: start
I/dalvikvm( 5697): No library specified. The standard exception handler will be used
D/dalvikvm( 5697): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 5697): Added shared lib libjavacore.so 0x0
D/dalvikvm( 5697): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 5697): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 5697): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 5697): Extra Options: not specified
W/MPEG2TSExtractor( 1891): Completed reading, end of file, 0 : 192 mClipSize=40501248 dataSrcOffset=40501248
I/AnotherPacketSource( 1891): Flushing all Access units for seek
E/IMGSRV  ( 5697): :0: PVRDRMOpen: TP3, ret = 41
E/IMGSRV  ( 5697): :0: PVRDRMOpen: TP3, ret = 42
E/IMGSRV  ( 5697): :0: PVRDRMOpen: TP3, ret = 42
E/IMGSRV  ( 5697): :0: PVRDRMOpen: TP3, ret = 42
D/dalvikvm( 5697): Note: class Landroid/app/ActivityManagerNative; has 192 unimplemented (abstract) methods
D/AndroidRuntime( 5697): Calling main entry com.genymobile.scrcpy.Server
I/dalvikvm( 5697): Total arena pages for JIT: 11
I/dalvikvm( 5697): Total arena pages for JIT: 12
I/dalvikvm( 5697): Total arena pages for JIT: 13
I/dalvikvm( 5697): Total arena pages for JIT: 14
I/dalvikvm( 5697): Total arena pages for JIT: 15
I/dalvikvm( 5697): Total arena pages for JIT: 16
I/dalvikvm( 5697): Total arena pages for JIT: 17
I/dalvikvm( 5697): Total arena pages for JIT: 18
I/dalvikvm( 5697): Total arena pages for JIT: 19
I/dalvikvm( 5697): Total arena pages for JIT: 20
W/MPEG2TSExtractor( 1891): Completed reading, end of file, 0 : 192 mClipSize=40501248 dataSrcOffset=40501248
I/AnotherPacketSource( 1891): Flushing all Access units for seek
I/dalvikvm( 5697): Could not find method android.media.MediaCodec.getOutputBuffer, referenced from method com.genymobile.scrcpy.ScreenEncoder.encode
W/dalvikvm( 5697): VFY: unable to resolve virtual method 9: Landroid/media/MediaCodec;.getOutputBuffer (I)Ljava/nio/ByteBuffer;
D/dalvikvm( 5697): VFY: replacing opcode 0x6e at 0x0044
I/dalvikvm( 5697): threadid=1: recursive native library load attempt (/system/lib/libmedia_jni.so)
D/MtpDeviceJNI( 5697): register_android_mtp_MtpDevice
I/dalvikvm( 5697): threadid=1: recursive native library load attempt (/system/lib/libmedia_jni.so)
I/dalvikvm( 5697): threadid=1: recursive native library load attempt (/system/lib/libmedia_jni.so)
I/dalvikvm( 5697): threadid=1: recursive native library load attempt (/system/lib/libmedia_jni.so)
I/ACodec  ( 5697):  [] Now uninitialized
I/OMXClient( 5697): Using client-side OMX mux.
I/cmodule ( 1891): module libOMXVideoEncoderAVC.so successfully loaded
I/libva   ( 1891): VA-API version 0.34.0
I/libva   ( 1891): va_getDriverName() returns 0
I/libva   ( 1891): Trying to open /system/lib/pvr_drv_video.so
I/libva   ( 1891): Found init function __vaDriverInit_0_32
D/pvr_drv_video( 1891): hw_get_module returned
I/libva   ( 1891): va_openDriver() returns 0
I/componentbase( 1891): OMX.Intel.VideoEncoder.AVC: set working role video_encoder.avc:
I/wrs-omxil-core( 1891): get handle of component OMX.Intel.VideoEncoder.AVC successfully
D/OMX     ( 1891): SendBroadCasting VIDEO_PLAYBACK_START
W/Parcel  ( 2334): Attempt to read object from Parcel 0x67f3ab2c at offset 252 that is not in the object list
I/ACodec  ( 5697): [OMX.Intel.VideoEncoder.AVC] Now Loaded
I/componentbase( 1891): OMX.Intel.VideoEncoder.AVC: set working role video_encoder.avc:
E/OMXVideoEncoderBase( 1891): Bad port index 1, expected: 0
E/OMXNodeInstance( 1891): OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x8000101b
E/ACodec  ( 5697): [OMX.Intel.VideoEncoder.AVC] storeMetaDataInBuffers (output) failed w/ err -2147483648
I/OMX     ( 1891): width (1280), height (800), fps (60)
W/portbase( 1891): Input port size has been changed!
I/ACodec  ( 5697): setupVideoEncoder succeeded
E/OMXComponentCodecBase( 1891): ComponentSetParameter: No handler for index 2130706444
E/OMXNodeInstance( 1891): OMX_EnableAndroidNativeBuffers failed with error -2147479526 (0x8000101a)
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/ACodec  ( 5697): [OMX.Intel.VideoEncoder.AVC] Now Loaded->Idle
E/IMGSRV  ( 1888): :0: PVRDRMOpen: TP3, ret = 40
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device scrcpy -> ls 0 
W/SurfaceFlinger( 1888): [scrcpy] EGL called dequeueBuffer with !async despite eglSwapInterval(0)
E/IMGSRV  ( 1888): :0: PVRDRMOpen: TP3, ret = 61
D/componentbase( 1891): OMX.Intel.VideoEncoder.AVC:video_encoder.avc: transition from OMX_StateLoaded to OMX_StateIdle completed
D/componentbase( 1891): OMX.Intel.VideoEncoder.AVC:video_encoder.avc: transition from OMX_StateIdle to OMX_StateExecuting completed
I/ACodec  ( 5697): [OMX.Intel.VideoEncoder.AVC] Now Idle->Executing
I/ACodec  ( 5697): [OMX.Intel.VideoEncoder.AVC] Now Executing
E/IMGSRV  ( 1891): :0: PVRDRMOpen: TP3, ret = 57
I/VideoEncoder( 1891): map new allocated gfx handle to vaSurface
E/OMXNodeInstance( 1891): !!! Observer died. Quickly, do something, ... anything...
D/componentbase( 1891): OMX.Intel.VideoEncoder.AVC:video_encoder.avc: transition from OMX_StateExecuting to OMX_StateIdle completed
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
I/SurfaceFlinger( 1888): Device Built-in Screen -> ls 0 
W/GraphicBufferSource( 1891): Dropped back down to Loaded without Executing
D/componentbase( 1891): OMX.Intel.VideoEncoder.AVC:video_encoder.avc: transition from OMX_StateIdle to OMX_StateLoaded completed
I/cmodule ( 1891): module libOMXVideoEncoderAVC.so successfully unloaded
I/wrs-omxil-core( 1891): free handle of component OMX.Intel.VideoEncoder.AVC successfully

I'm closing. _scrcpy_ will probably never support Android 4.

@rom1v Thank you for pointing me here. I hope, it is okay for you to use this closed issue to further discuss this issue, or do you prefer another channel? (IRC?)

I've tried to parse this thread to locate the real blockers and their reasons, but didn't succeed. Meanwhile, I've merged your api19 changes into api19hp here and created a debug build. Since I have no physical access to the 4.4.4 device at the moment, I've tried to run it in with an AVD VM (Android 4.4/arm), but failed. (logcat below..) scrcpy does work with an emulated Pixel 2 API 24 (Android 7.0/x86), so my build isn't completely messed up, and is real fun (besides being immensely useful for debugging of course)!

Here's the interesting part of the 4.4 logcat:

D/AndroidRuntime( 3047):
D/AndroidRuntime( 3047): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 3047): CheckJNI is ON
D/dalvikvm( 3047): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 3047): Added shared lib libjavacore.so 0x0
D/dalvikvm( 3047): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 3047): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 3047): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
I/dalvikvm( 3047): DexOpt: source file mod time mismatch (00210000 vs 00000000)
D/dalvikvm( 3047): ODEX file is stale or bad; removing and retrying (/data/dalvik-cache/data@local@[email protected]@classes.dex)
D/dalvikvm( 3047): DexOpt: --- BEGIN 'scrcpy-server.jar' (bootstrap=0) ---
D/dalvikvm( 3048): DexOpt: 'Landroid/view/IRotationWatcher;' has an earlier definition; blocking out
D/dalvikvm( 3048): DexOpt: 'Landroid/view/IRotationWatcher$Stub$Proxy;' has an earlier definition; blocking out
D/dalvikvm( 3048): DexOpt: 'Landroid/view/IRotationWatcher$Stub;' has an earlier definition; blocking out
D/dalvikvm( 3048): DexOpt: not verifying/optimizing 'Landroid/view/IRotationWatcher;': multiple definitions
I/dalvikvm( 3048): DexOpt: not resolving ambiguous class 'Landroid/view/IRotationWatcher;'
D/dalvikvm( 3048): DexOpt: not verifying/optimizing 'Landroid/view/IRotationWatcher$Stub$Proxy;': multiple definitions
D/dalvikvm( 3048): DexOpt: not verifying/optimizing 'Landroid/view/IRotationWatcher$Stub;': multiple definitions
I/dalvikvm( 3048): DexOpt: not resolving ambiguous class 'Landroid/view/IRotationWatcher$Stub;'
D/dalvikvm( 3048): DexOpt: load 23ms, verify+opt 63ms, 180012 bytes
D/dalvikvm( 3047): DexOpt: --- END 'scrcpy-server.jar' (success) ---
D/dalvikvm( 3047): DEX prep '/data/local/tmp/scrcpy-server.jar': unzip in 6ms, rewrite 203ms
E/cutils-trace( 3047): Error opening trace file: No such file or directory (2)
D/dalvikvm( 3047): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 3047): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 3047): failed to load memtrack module: -2
D/AndroidRuntime( 3047): Calling main entry com.genymobile.scrcpy.Server
I/dalvikvm( 3047): Could not find method android.system.Os.write, referenced from method com.genymobile.scrcpy.IO.writeFully
W/dalvikvm( 3047): VFY: unable to resolve static method 49: Landroid/system/Os;.write (Ljava/io/FileDescriptor;Ljava/nio/ByteBuffer;)I
D/dalvikvm( 3047): VFY: replacing opcode 0x71 at 0x0006
W/dalvikvm( 3047): VFY: unable to resolve exception class 24 (Landroid/system/ErrnoException;)
W/dalvikvm( 3047): VFY: unable to find exception handler at addr 0x30
W/dalvikvm( 3047): VFY:  rejected Lcom/genymobile/scrcpy/IO;.writeFully (Ljava/io/FileDescriptor;Ljava/nio/ByteBuffer;)V
W/dalvikvm( 3047): VFY:  rejecting opcode 0x0d at 0x0030
W/dalvikvm( 3047): VFY:  rejected Lcom/genymobile/scrcpy/IO;.writeFully (Ljava/io/FileDescriptor;Ljava/nio/ByteBuffer;)V
W/dalvikvm( 3047): Verifier rejected class Lcom/genymobile/scrcpy/IO;
D/AndroidRuntime( 3047): Shutting down VM
W/dalvikvm( 3047): threadid=1: thread exiting with uncaught exception (group=0xa5a12ba8)
E/scrcpy  ( 3047): Exception on thread Thread[main,5,main]
E/scrcpy  ( 3047): java.lang.VerifyError: com/genymobile/scrcpy/IO
E/scrcpy  ( 3047):      at com.genymobile.scrcpy.DesktopConnection.send(DesktopConnection.java:100)
E/scrcpy  ( 3047):      at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:74)
E/scrcpy  ( 3047):      at com.genymobile.scrcpy.Server.scrcpy(Server.java:19)
E/scrcpy  ( 3047):      at com.genymobile.scrcpy.Server.main(Server.java:133)
E/scrcpy  ( 3047):      at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
E/scrcpy  ( 3047):      at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
E/scrcpy  ( 3047):      at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 3047): GC_CONCURRENT freed 136K, 20% free 572K/712K, paused 1ms+1ms, total 9ms

It bails out, due to android.system.Os isn't available below API Level 21, AFAICS. Okay, my merge sucks :(. Obviously, it needs the https://github.com/Genymobile/scrcpy/blob/1de8506a0d06208304468c9abcee86eebec70828/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java#L107-L114 part ported over to your IO module for lower API levels.
Unfortunately, I'm not that fluent in Java, so this part will take a while.

Dear @rom1v, may I kindly ask you to take a look at my code:

https://github.com/Genymobile/scrcpy/compare/master...frispete:api19hp?expand=1

For some reasons, it still fails, although the API dependent code should be in place?!?

DEBUG: Remaining connection attempts: 100
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.VerifyError: com/genymobile/scrcpy/IO
        at com.genymobile.scrcpy.DesktopConnection.send(DesktopConnection.java:100)
        at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:74)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:19)
        at com.genymobile.scrcpy.Server.main(Server.java:133)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
        at dalvik.system.NativeStart.main(Native Method)
ERROR: Could not retrieve device information
DEBUG: Server terminated

but no logcat output.

I hope, it is okay for you to use this closed issue to further discuss this issue

Yes.

I've tried to parse this thread to locate the real blockers and their reasons, but didn't succeed.

The video encoder does not work below 5.0. (https://github.com/Genymobile/scrcpy/issues/98#issuecomment-379046536)

The video encoder does not work below 5.0. (#98 (comment))

Ugrmpf. Will change hardware to catch up with requirements.

Anyway, you're my hero, Romain! This is the best invention for Android since sliced bread!

i want to connet my stb(eth-connect,kitkat) and my test-mobile(usb-connect,kitkat),but it not work at all.

the prebuild branch-api19 in my window10-64,not work,and no hint,no err,reaction.
who can tellme ,is this branch-api19 support kitkat 4.4.
or is the client not support window10-64?


the prebuild branch-master in my window10-64,not work,and has hint like this:

C:\scrcpy-win64-v1.12.1>scrcpy.exe
INFO: scrcpy 1.12.1 https://github.com/Genymobile/scrcpy
C:\scrcpy-win64-v1.12.1\scrcpy-server: 1 file pushed. 1.5 MB/s (19334 bytes in 0.012s)
adb.exe: error: closed
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
27183
Aborted
WARN: Could not terminate server
Press any key to continue...

No, Android 5.0 is required. I did some attempts to make it work on Android 4, but they failed.

CXTouch supports versions 4.4 (SDK level 19) to 9.0 (SDK level 28)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fernandofreamunde picture fernandofreamunde  路  4Comments

cutoseo picture cutoseo  路  4Comments

qymspace picture qymspace  路  3Comments

behzadpooldar picture behzadpooldar  路  4Comments

SamuelBlickle picture SamuelBlickle  路  3Comments