Open 201905270246 opened 4 years ago
https://testerhome.com/topics/21668 https://github.com/JamesChungZLL/minicap https://blog.csdn.net/Sunxiaolin2016/article/details/90697555
以三星手机(serial/udid: RFCN5038Y8J, build version: 29, 屏幕分辨率:1080x2340,通过sdkmanager安装NDK)为例,解决步骤如下: `
$ git clone https://github.com/JamesChungZLL/minicap.git
$ cd minicap $ git submodule init $ git submodule update $ ndk-build APP_PLATFORM=android-29 PLATFORM_SDK_VERSION=29 # 可通过sdkmanager 安装ndk
$ ABI=$(adb -s RFCN5038Y8J shell getprop ro.product.cpu.abi | tr -d '\r') $ adb -s RFCN5038Y8J push libs/$ABI/minicap /data/local/tmp/
$ SDK=$(adb -s 7b895cac shell getprop ro.build.version.sdk | tr -d '\r') $ adb -s RFCN5038Y8J push jni/minicap-shared/aosp/libs/android-$SDK/$ABI/minicap.so /data/local/tmp/
$ adb -s RFCN5038Y8J shell chmod 777 /data/local/tmp/minicap*
$ adb -s RFCN5038Y8J shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -P 1440x3040@1440x3040/0
$ adb -s RFCN5038Y8J shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -P 1440x3040@1440x3040/0 -t PID: 18525 INFO: Using projection 1440x3040@1440x3040/0 INFO: (external/MY_minicap/src/minicap_29.cpp:241) Creating SurfaceComposerClient INFO: (external/MY_minicap/src/minicap_29.cpp:244) Performing SurfaceComposerClient init check INFO: (external/MY_minicap/src/minicap_29.cpp:255) Creating virtual display INFO: (external/MY_minicap/src/minicap_29.cpp:261) Creating buffer queue INFO: (external/MY_minicap/src/minicap_29.cpp:264) Setting buffer options INFO: (external/MY_minicap/src/minicap_29.cpp:268) Creating CPU consumer INFO: (external/MY_minicap/src/minicap_29.cpp:272) Creating frame waiter INFO: (external/MY_minicap/src/minicap_29.cpp:276) Publishing virtual display INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 13134852 bytes for JPG encoder OK INFO: (external/MY_minicap/src/minicap_29.cpp:291) Destroying virtual display `
此时检测Android Q已可以在atxserver2服务上显示屏幕
提PR呀
没用
把 DeviceFarmer 那边有 2.6 的 minicap 替换 provider 里的就可以了,因为文件大小不一致会重新推送,最好直接替换掉 stf-binaries-0.2.1.zip 这个文件的内容
android Q接入atxserver 屏幕黑屏,命令行操作正常。 检查android Q手机的 /data/local/tmp目录下,没有minicap.so文件。