scrcpy
scrcpy copied to clipboard
Android10 mobile phone cannot cast screen
Environment
- OS: Windows11 Professional x64, antivirus software turned off
- scrcpy version: scrcpy-win64-v2.0
- installation method: Windows release
- device model: Xiaomi CC9e in China
- Android version: Android 10
Describe the bug
-
Scrcpy location: "D:\scrcpy-win64-v2.0"
-
ADB debugging enabled
D:\scrcpy-win64-v2.0>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
3ed52b1d0f6b device
-
USB debugging authorized
-
ADB connection is normal and only one mobile phone is connected
-
【Scrcpy prompt】
D:\scrcpy-win64-v2.0>scrcpy
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
adb: error: stat failed when trying to push to /data/local/tmp/scrcpy-server.jar: Permission denied
ERROR: "adb push" returned with value 1
ERROR: Server connection failed
- I try to copy "scrcpy server" to "/data/local/tmp/scrcpy server. jar" and chmod775
Still failed to cast the screen!!!
Try manually:
adb push scrcpy-server /data/local/tmp/scrcpy-server.jar
What is the result?
What is the output of:
adb shell ls -l /data/local/tmp/
你使用root复制旧版本的server,导致2.0server校验不通过,scrcpy尝试复制新版本server但是adb不能操作用户组为root的文件,你要删掉旧版本并且避免用root权限操作文件
Try manually: adb push scrcpy-server /data/local/tmp/scrcpy-server.jar Result:
scrcpy-server: 1 file pushed, 0 skipped. 114.2 MB/s (52867 bytes in 0.000s) adb: error: failed to copy 'scrcpy-server' to '/data/local/tmp/scrcpy-server.jar': remote couldn't create file: Permission denied
Try manually: adb shell ls -l /data/local/tmp/ Result:
ls: /data/local/tmp/: Permission denied
Try manually: adb shell su -c "ls -l /data/local/tmp/" Result:
total 0
Try manually: adb push scrcpy-server /sdcard/scrcpy-server.jar Result:
scrcpy-server: 1 file pushed, 0 skipped. 123.2 MB/s (52867 bytes in 0.000s)
Try manually: adb shell su -c "mv -f /sdcard/scrcpy-server.jar /data/local/tmp/scrcpy-server.jar" Try manually: adb shell su -c "ls -lA /data/local/tmp/scrcpy-server.jar" Result:
-rw-rw---- 1 root sdcard_rw 52867 2023-03-12 09:13 /data/local/tmp/scrcpy-server.jar
Try manually: adb shell su -c "chmod 775 /data/local/tmp/scrcpy-server.jar" Try manually: adb shell su -c "ls -lA /data/local/tmp/scrcpy-server.jar" Result:
-rwxrwxr-x 1 root sdcard_rw 52867 2023-03-12 09:13 /data/local/tmp/scrcpy-server.jar
Try manually: adb root
adbd cannot run as root in production builds
root操作文件是大忌