Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.88k stars 10.48k forks source link

Fail to run on vmos pro #4125

Open mrpbpp opened 1 year ago

mrpbpp commented 1 year ago

Environment

Describe the bug

scrcpy -s 192.168.1.97:5668
scrcpy 2.1 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 2.7 MB/s (56955 bytes in 0.020s)
[server] INFO: Device: [XIAOMI] XIAOMI 10X (Android 7.1.2)
[server] ERROR: Exception on thread Thread[main,7,main]
java.io.IOException: Connection refused
    at android.net.LocalSocketImpl.connectLocal(Native Method)
    at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:292)
    at android.net.LocalSocket.connect(LocalSocket.java:131)
    at com.genymobile.scrcpy.DesktopConnection.connect(DesktopConnection.java:50)
    at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:100)
    at com.genymobile.scrcpy.Server.scrcpy(Server.java:106)
    at com.genymobile.scrcpy.Server.main(Server.java:199)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:340)
ERROR: Server connection failed

$adb devices
List of devices attached
192.168.1.97:5668   device
83f0384f52313653    device

logcat
06-28 18:06:49.788 15757 16553 I LXHLOVE : 1 retryCount 325-error:No such file or directory
06-28 18:06:50.422  4754  4754 D io_stats: !@   8,0 r 1041040 40956292 w 131259 3123012 d 21229 1493164 f 45853 45042 iot 643200 624471 th 61440 0 0 pt 0 inp 0 0 1478.364
06-28 18:06:50.895 15757 15836 I LXHLOVE : 1 retryCount 328-error:No such file or directory
06-28 18:06:51.410 13485 13485 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
06-28 18:06:51.414 13485 13485 D AndroidRuntime: CheckJNI is OFF
06-28 18:06:51.415 13485 13485 W AndroidRuntime: ro.dalvik.vm.native.bridge is not expected to be empty
06-28 18:06:51.523 13485 13485 D ICU     : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
06-28 18:06:51.555 13485 13485 V AndroidRuntime: --- registering native functions ---
06-28 18:06:51.564 13485 13485 E HAL     : enter gralloc class_id=memtrack
06-28 18:06:51.565 13485 13485 E memtrack: Couldn't load memtrack module (No such file or directory)
06-28 18:06:51.565 13485 13485 E android.os.Debug: failed to load memtrack module: -2
06-28 18:06:51.566 13485 13485 I Radio-JNI: register_android_hardware_Radio DONE
06-28 18:06:51.582 13485 13485 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
06-28 18:06:51.583 13485 13485 I scrcpy  : Device: [XIAOMI] XIAOMI 10X (Android 7.1.2)
06-28 18:06:51.658 13485 13485 D AndroidRuntime: Shutting down VM
06-28 18:06:51.658 13485 13485 E scrcpy  : Exception on thread Thread[main,7,main]
06-28 18:06:51.658 13485 13485 E scrcpy  : java.io.IOException: Connection refused
06-28 18:06:51.658 13485 13485 E scrcpy  :  at android.net.LocalSocketImpl.connectLocal(Native Method)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:292)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at android.net.LocalSocket.connect(LocalSocket.java:131)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at com.genymobile.scrcpy.DesktopConnection.connect(DesktopConnection.java:50)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:100)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at com.genymobile.scrcpy.Server.scrcpy(Server.java:106)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at com.genymobile.scrcpy.Server.main(Server.java:199)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
06-28 18:06:51.658 13485 13485 E scrcpy  :  at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:340)
06-28 18:06:52.013 13499 13499 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
06-28 18:06:52.017 13499 13499 D AndroidRuntime: CheckJNI is OFF
06-28 18:06:52.017 13499 13499 W AndroidRuntime: ro.dalvik.vm.native.bridge is not expected to be empty
06-28 18:06:52.132 13499 13499 D ICU     : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
06-28 18:06:52.161 13499 13499 V AndroidRuntime: --- registering native functions ---
06-28 18:06:52.170 13499 13499 E HAL     : enter gralloc class_id=memtrack
06-28 18:06:52.170 13499 13499 E memtrack: Couldn't load memtrack module (No such file or directory)
06-28 18:06:52.170 13499 13499 E android.os.Debug: failed to load memtrack module: -2
06-28 18:06:52.172 13499 13499 I Radio-JNI: register_android_hardware_Radio DONE
06-28 18:06:52.185 13499 13499 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
06-28 18:06:52.185 13499 13499 I scrcpy  : Cleaning up
06-28 18:06:52.205 13499 13499 I scrcpy  : Restoring normal power mode
06-28 18:06:52.207 14131 14131 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xf58e4000
06-28 18:06:52.207 14131 14131 D SurfaceFlinger: Screen type=0 is already mode=2
06-28 18:06:52.207 13499 13499 D AndroidRuntime: Shutting down VM
rom1v commented 1 year ago

Weird. Try:

scrcpy -s 192.168.1.97:5668 --force-adb-forward

mrpbpp commented 1 year ago

Still got fail

$scrcpy -s 192.168.1.97:5668 --force-adb-forward
scrcpy 2.1 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 1.8 MB/s (56955 bytes in 0.030s)
[server] INFO: Device: [XIAOMI] XIAOMI 10X (Android 7.1.2)
ERROR: Server connection failed

**Logcat**

06-28 22:43:20.359  2707  2707 I scrcpy  : Device: [XIAOMI] XIAOMI 10X (Android 7.1.2)
06-28 22:43:20.414  3715  3858 D SamsungAlarmManager: Expired : 8
06-28 22:43:20.414  3715  3858 I SamsungAlarmManager: setLocked to kernel - T:3 / 20230628T224400, SetElapsed=18107944, nowELAPSED=18068358
06-28 22:43:20.414  3715  3858 V SamsungAlarmManager: Sending to uid : 10032 action=com.sec.spp.push.ACTION_CONNECTION_STATE_CHECK alarm=Alarm{8de52ea type 3 when 18068358 com.sec.spp.push}
06-28 22:43:20.417  3715  3736 D CompatibilityInfo: mCompatibilityFlags - 0
06-28 22:43:20.417  3715  3736 D CompatibilityInfo: applicationDensity - 480
06-28 22:43:20.417  3715  3736 D CompatibilityInfo: applicationScale - 1.0
06-28 22:43:20.427  3715  8040 D SamsungAlarmManager: Cancel Alarm calling from uid:10032 pid :7586 / op:PendingIntent{ee8c9db: PendingIntentRecord{fba3c05 com.sec.spp.push broadcastIntent}}
06-28 22:43:20.431  3715  3946 D SamsungAlarmManager: setExact Intent (T:3/F:5/AC:false) 20230628T225820 - CU:10032/CP:7586
06-28 22:43:20.433  7586  7586 E SPPClientService: [[PushClientService]] reqType : 0
06-28 22:43:20.438  7586  7586 E SPPClientService: [[PushClientService]] F:false, D:false, E:false(), T:false(), S:true, R:false, O:true
06-28 22:43:20.800  2718  2718 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
06-28 22:43:20.805  2718  2718 D AndroidRuntime: CheckJNI is OFF
06-28 22:43:20.805  2718  2718 W AndroidRuntime: ro.dalvik.vm.native.bridge is not expected to be empty
06-28 22:43:20.811 15757 15836 I LXHLOVE : 1 retryCount 4470-error:No such file or directory
06-28 22:43:20.912  2718  2718 D ICU     : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
06-28 22:43:20.941  2718  2718 V AndroidRuntime: --- registering native functions ---
06-28 22:43:20.950  2718  2718 E HAL     : enter gralloc class_id=memtrack
06-28 22:43:20.951  2718  2718 E memtrack: Couldn't load memtrack module (No such file or directory)
06-28 22:43:20.951  2718  2718 E android.os.Debug: failed to load memtrack module: -2
06-28 22:43:20.952  2718  2718 I Radio-JNI: register_android_hardware_Radio DONE
06-28 22:43:20.965  2718  2718 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.CleanUp
06-28 22:43:21.513  3715 10998 D SSRM:t  : SIOP:: AP = 360, PST = 354 (W:20), CP = 303, CUR = 275, LCD = 119
06-28 22:43:22.571 18470 18521 I nightwatch-target: monitor resources last 600 iteration: 301614 msec
06-28 22:43:22.842  3715  3934 D WifiStateMachine: Current network is: "IT 5G" , ID is: 29
06-28 22:43:23.266  3715  4473 E Watchdog: !@Sync 601 [2023-06-28 22:43:23.265]
06-28 22:43:24.112 15757 16553 I LXHLOVE : 1 retryCount 4468-error:No such file or directory
06-28 22:43:24.801  4754  4754 D io_stats: !@   8,0 r 1505905 59409392 w 261069 4911336 d 41289 1894564 f 79582 78688 iot 1057960 983652 th 61440 0 0 pt 0 inp 0 0 18072.743
06-28 22:43:24.815 15757 15836 I LXHLOVE : 1 retryCount 4471-error:No such file or directory
06-28 22:43:25.338  3715  3748 D PowerManagerService: [s] UserActivityState : 2 -> 4
06-28 22:43:25.339  3715  3748 I PowerManagerService: [PWL] On : 0 (18073282 ms ago)
06-28 22:43:25.339  3715  3748 I PowerManagerService: [PWL]  mStayOn: false  mWakeLockSummary & WAKE_LOCK_STAY_AWAKE: 20  mUserActivitySummary: 0x4
06-28 22:43:25.339  3715  3748 I PowerManagerService: [PWL]  SCREEN_BRIGHT_WAKE_LOCK        'WindowManager' ON_AFTER_RELEASE (uid=1000, pid=3715, ws=WorkSource{10310}) (uid=1000, pid=3715, ws=WorkSource{10310}, pkg=android, elapsedTime=16303872)
06-28 22:43:25.871  3715  3934 D WifiStateMachine: Current network is: "IT 5G" , ID is: 29
06-28 22:43:26.003 15429 15429 D BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.scheduler.ACTION_PROXY_SCHEDULE dat=chimera-action: cmp=com.google.android.gms/.chimera.PersistentApiService }
06-28 22:43:26.813  3715  3728 D SamsungAlarmManager: Cancel Alarm calling from uid:10014 pid :21801 / op:PendingIntent{100dc78: PendingIntentRecord{8173e41 com.google.android.gms broadcastIntent}}
06-28 22:43:26.821 21801 21795 I AlarmManager: setExactAndAllowWhileIdle [name: GCM_HB_ALARM type: 2 triggerAtMillis: 18604764]
06-28 22:43:26.832  3715  8848 D SamsungAlarmManager: setExact Intent (T:2/F:5/AC:false) 20230628T225216 - CU:10014/CP:21801
06-28 22:43:28.116 15757 16553 I LXHLOVE : 1 retryCount 4469-error:No such file or directory
06-28 22:43:28.819 15757 15836 I LXHLOVE : 1 retryCount 4472-error:No such file or directory
06-28 22:43:28.899  3715  3934 D WifiStateMachine: Current network is: "IT 5G" , ID is: 29
06-28 22:43:29.541   497   622 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
06-28 22:43:29.541   497   622 I System.out: (HTTPLog)-Static: isSBSettingEnabled false
06-28 22:43:29.544  3209  3701 D EnterpriseController: netId is 0
06-28 22:43:29.544  3209  3701 D Netd    : getNetworkForDns: using netid 502 for uid 10224
06-28 22:43:29.544  3209  3701 D DnsProxyListener: DNSDBG::dns addrinfo af 0
06-28 22:43:29.807  4754  4754 D io_stats: !@   8,0 r 1505905 59409392 w 261073 4911400 d 41289 1894564 f 79583 78689 iot 1057970 983659 th 61440 0 0 pt 0 inp 0 0 18077.749
06-28 22:43:30.304  2718  2718 I scrcpy  : Cleaning up
06-28 22:43:30.353  2718  2718 I scrcpy  : Restoring normal power mode
06-28 22:43:30.356 14131 14131 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xf58e4000
06-28 22:43:30.356 14131 14131 D SurfaceFlinger: Screen type=0 is already mode=2
06-28 22:43:30.357  2718  2718 D AndroidRuntime: Shutting down VM

After that got disconnected from vmos

$ scrcpy -s 192.168.1.97:5668 --force-adb-forward
scrcpy 2.1 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find ADB device 192.168.1.97:5668:
ERROR:           (usb)  83f0384f52313653                device  SM_N920I
ERROR: Server connection failed
rom1v commented 1 year ago

It looks there is a problem at the adb level (maybe the adb server in the device ROM).

Enaium commented 2 months ago

Use Android 9 ROM