New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android watch (Android 4) not showing up #98

Closed
elig0n opened this Issue Mar 26, 2018 · 14 comments

Comments

Projects
None yet
2 participants
@elig0n

elig0n commented Mar 26, 2018

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.

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 26, 2018

See #82.

@rom1v rom1v added the codec label Mar 26, 2018

@elig0n

This comment has been minimized.

elig0n commented Mar 26, 2018

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

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 26, 2018

I have run adb shell screenrecord with success though.

Ah, interesting. Could you try #82 (comment)?

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 26, 2018

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

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 27, 2018

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

Please post its results for your watch.

@elig0n

This comment has been minimized.

elig0n commented Mar 28, 2018

$ ./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?

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 28, 2018

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)

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 30, 2018

@elig0n Could you test the branch api19, please?

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

@elig0n

This comment has been minimized.

elig0n commented Mar 30, 2018

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
@rom1v

This comment has been minimized.

Collaborator

rom1v commented Mar 31, 2018

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

Could you check adb logcat just after that, please?

@elig0n

This comment has been minimized.

elig0n commented Mar 31, 2018

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

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Apr 5, 2018

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@tmp@scrcpy-server.jar@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).

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Apr 5, 2018

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@tmp@scrcpy-server.jar@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

@rom1v rom1v added device and removed device labels Aug 23, 2018

@rom1v rom1v added the android4 label Sep 4, 2018

@rom1v

This comment has been minimized.

Collaborator

rom1v commented Nov 22, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment