AirtestProject / Airtest

UI Automation Framework for Games and Apps
http://airtest.netease.com/
Apache License 2.0
8.26k stars 1.3k forks source link

android12 无法使用minicap(b'CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": "/data/local/tmp/minicap.so" is 32-bit instead of 64-bit\r\n') #1085

Open xiaoxiaocaiiao opened 2 years ago

xiaoxiaocaiiao commented 2 years ago

(重要!问题分类)

描述问题bug android12 无法使用minicap(b'CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": "/data/local/tmp/minicap.so" is 32-bit instead of 64-bit\r\n')

相关截图 image

复现步骤 1.使用最新airtest 连接 android 模拟器 12 (谷歌原生模拟器 ANDROID31(12))

预期效果 可以通过minicap 连接android 12

设备:

hgjazhgj commented 1 year ago

我遇到了相同问题,以下是相关日志

[2023-06-17 14:21:33,374][DEBUG]<airtest.core.android.adb> C:\...\adb.exe devices
[2023-06-17 14:21:34,925][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 get-state
[2023-06-17 14:21:34,986][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 wait-for-device
[2023-06-17 14:21:35,045][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell getprop ro.build.version.sdk
[2023-06-17 14:21:35,122][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell dumpsys activity top
[2023-06-17 14:21:35,209][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell ls -l /data/local/tmp/rotationwatcher.jar
[2023-06-17 14:21:35,320][DEBUG]<airtest.core.android.rotation> install_rotationwatcher skipped
[2023-06-17 14:21:35,320][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell app_process -Djava.class.path=/data/local/tmp/rotationwatcher.jar /data/local/tmp com.example.rotationwatcher.Main
[2023-06-17 14:21:35,538][DEBUG]<airtest.utils.nbsp> [rotation_server]b'0'
[2023-06-17 14:21:36,335][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell wm size
[2023-06-17 14:21:36,334][INFO]<airtest.core.android.rotation> update orientation None->0
[2023-06-17 14:21:36,411][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell getprop ro.sf.lcd_density
[2023-06-17 14:21:36,478][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell dumpsys SurfaceFlinger
[2023-06-17 14:21:36,564][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell dumpsys input
[2023-06-17 14:21:36,629][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell getevent -p
[2023-06-17 14:21:37,296][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell dumpsys window windows
[2023-06-17 14:21:37,418][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell dumpsys window windows
[2023-06-17 14:21:39,184][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell ls -l /data/local/tmp/maxpresent.jar
[2023-06-17 14:21:39,267][DEBUG]<airtest.core.android.touch_methods.maxtouch> install_maxtouch skipped
[2023-06-17 14:21:39,267][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 forward --no-rebind tcp:15125 localabstract:maxpresent_15125
[2023-06-17 14:21:39,330][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell app_process -Djava.class.path=/data/local/tmp/maxpresent.jar /data/local/tmp com.netease.maxpresent.MaxPresent socket maxpresent_15125
[2023-06-17 14:21:39,589][DEBUG]<airtest.utils.nbsp> [airtouch_server]b'Metrics Message : 900.0=====1600.0'
[2023-06-17 14:21:39,639][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell dumpsys package com.netease.nie.yosemite
[2023-06-17 14:21:39,688][DEBUG]<airtest.utils.nbsp> [airtouch_server]b'Start local socket (maxpresent_15125) server...'
[2023-06-17 14:21:39,729][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 forward --no-rebind tcp:18715 localabstract:javacap_18715
[2023-06-17 14:21:39,791][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell pm path com.netease.nie.yosemite
[2023-06-17 14:21:39,873][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell CLASSPATH=/data/app/~~HAiHvOIn4s_eJFcSftmWcg==/com.netease.nie.yosemite-C2GLMVvPuSkieW-L3xliXw==/base.apk exec app_process /system/bin com.netease.nie.yosemite.Capture --scale 100 --socket javacap_18715 -lazy 2>&1
[2023-06-17 14:21:40,248][DEBUG]<airtest.utils.nbsp> [javacap_sever]b'Capture server listening on @javacap_18715'
[2023-06-17 14:21:40,263][ERROR]<airtest.core.android.cap_methods.screen_proxy> OSError('socket connection broken')
[2023-06-17 14:21:40,264][ERROR]<airtest.core.android.cap_methods.screen_proxy> Javacap setup up failed!
[2023-06-17 14:21:40,265][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell ls /data/local/tmp/minicap
[2023-06-17 14:21:40,277][DEBUG]<airtest.utils.nbsp> [javacap_sever]b''
[2023-06-17 14:21:40,336][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell ls /data/local/tmp/minicap.so
[2023-06-17 14:21:40,409][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -v 2>&1
[2023-06-17 14:21:40,480][ERROR]<airtest.core.android.cap_methods.minicap> stdout[b'CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": "/data/local/tmp/minicap.so" is 32-bit instead of 64-bit\r\n'] stderr[b'']
[2023-06-17 14:21:40,481][DEBUG]<airtest.core.android.cap_methods.minicap> upgrade minicap to lastest version: -1->5
[2023-06-17 14:21:40,481][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell rm -r /data/local/tmp/minicap*
[2023-06-17 14:21:40,549][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell getprop ro.product.cpu.abi
[2023-06-17 14:21:40,614][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell getprop ro.build.version.preview_sdk
[2023-06-17 14:21:40,683][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell getprop ro.build.version.release
[2023-06-17 14:21:40,751][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 push C:\...\Python39\Lib\site-packages\airtest\core\android\static\stf_libs\x86_64\minicap /data/local/tmp/minicap
[2023-06-17 14:21:40,992][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell chmod 755 /data/local/tmp/minicap
[2023-06-17 14:21:41,061][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 push C:\...\Python39\Lib\site-packages\airtest\core\android\static\stf_libs\minicap-shared/aosp/libs/android-32/x86_64/minicap.so /data/local/tmp/minicap.so
[2023-06-17 14:21:41,136][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell chmod 755 /data/local/tmp/minicap.so
[2023-06-17 14:21:41,207][INFO]<airtest.core.android.cap_methods.minicap> minicap installation finished
[2023-06-17 14:21:41,208][DEBUG]<airtest.core.android.adb> C:\...\adb.exe -s 127.0.0.1:62025 shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -n 'airtest_minicap' -P 1600x900@1600x900/0 -s
[2023-06-17 14:21:41,278][ERROR]<airtest.core.android.cap_methods.screen_proxy> b''
[2023-06-17 14:21:41,279][ERROR]<airtest.core.android.cap_methods.screen_proxy> b'CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": "/data/local/tmp/minicap.so" is 32-bit instead of 64-bit\r\n'
[2023-06-17 14:21:41,279][ERROR]<airtest.core.android.cap_methods.screen_proxy> Minicap setup up failed!
SawyerPan commented 9 months ago

我也遇到了同样的问题, ro.build.version.sdk=32,ro.product.cpu.abi=x86_64 并且重新编译minicap,使用对应的minicap和minicap.so仍然无法解决

Jerry-Terrasse commented 4 months ago

使用MuMu模拟器12也会遇到相同问题。似乎是上游仓库提供了错误的版本: https://github.com/DeviceFarmer/minicap/issues/32 https://github.com/varundtsfi/Android12Support_withso/issues/5