hgjazhgj / FGO-py

自动爬塔! 自动每周任务! 全自动免配置跨平台的Fate/Grand Order助手.启动脚本,上床睡觉,养肝护发,满加成圣诞了解一下?
http://fgo-py.hgjazhgj.top/
GNU Affero General Public License v3.0
1.52k stars 180 forks source link

无法使用javacap和minicap #121

Closed KarylDAZE closed 1 year ago

KarylDAZE commented 1 year ago

在提问之前...

描述你的问题

javacap和minicap截图均无法使用,被动使用adbcap,运行很慢

如何复现

adb连接到模拟器 点击“肝”启动fgopy 出现问题

预期行为

正常使用javacap或minicap

相关 Logs

[2023-10-22 12:17:24,771][INFO]<fgo> FGO-py v18.8.3 PID 28644
[2023-10-22 12:17:31,007][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe devices
[2023-10-22 12:17:57,048][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 get-state
[2023-10-22 12:17:57,078][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 connect 127.0.0.1:16384
[2023-10-22 12:17:57,108][INFO]<airtest.core.android.adb> connected to 127.0.0.1:16384

[2023-10-22 12:17:57,108][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 wait-for-device
[2023-10-22 12:17:57,141][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell getprop ro.build.version.sdk
[2023-10-22 12:17:57,177][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell dumpsys activity top
[2023-10-22 12:17:57,223][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell ls -l /data/local/tmp/rotationwatcher.jar
[2023-10-22 12:17:57,264][DEBUG]<airtest.core.android.rotation> install_rotationwatcher skipped
[2023-10-22 12:17:57,264][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell app_process -Djava.class.path=/data/local/tmp/rotationwatcher.jar /data/local/tmp com.example.rotationwatcher.Main
[2023-10-22 12:17:57,430][DEBUG]<airtest.utils.nbsp> [rotation_server]b'90'
[2023-10-22 12:17:58,267][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell wm size
[2023-10-22 12:17:58,267][INFO]<airtest.core.android.rotation> update orientation None->1
[2023-10-22 12:17:58,313][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell getprop ro.sf.lcd_density
[2023-10-22 12:17:58,348][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell dumpsys SurfaceFlinger
[2023-10-22 12:17:58,388][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell dumpsys input
[2023-10-22 12:17:58,427][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell getevent -p
[2023-10-22 12:17:58,711][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell dumpsys window windows
[2023-10-22 12:17:58,759][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell dumpsys window windows
[2023-10-22 12:17:58,811][WARNING]<fgo.Detect> Package: com.bilibili.fatego, Region: CN
[2023-10-22 12:18:09,265][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell ls -l /data/local/tmp/maxpresent.jar
[2023-10-22 12:18:09,317][DEBUG]<airtest.core.android.touch_methods.maxtouch> install_maxtouch skipped
[2023-10-22 12:18:09,318][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 forward --no-rebind tcp:13288 localabstract:maxpresent_13288
[2023-10-22 12:18:09,347][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell app_process -Djava.class.path=/data/local/tmp/maxpresent.jar /data/local/tmp com.netease.maxpresent.MaxPresent socket maxpresent_13288
[2023-10-22 12:18:09,551][DEBUG]<airtest.utils.nbsp> [airtouch_server]b'Metrics Message : 2560.0=====1440.0'
[2023-10-22 12:18:09,552][DEBUG]<airtest.utils.nbsp> [airtouch_server]b'Start local socket (maxpresent_13288) server...'
[2023-10-22 12:18:09,888][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell dumpsys package com.netease.nie.yosemite
[2023-10-22 12:18:09,928][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 forward --no-rebind tcp:19089 localabstract:javacap_19089
[2023-10-22 12:18:09,955][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell pm path com.netease.nie.yosemite
[2023-10-22 12:18:09,995][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell CLASSPATH=/data/app/~~RBDc3mYyEfkkhtSAFVUiJg==/com.netease.nie.yosemite-q2rcNAdUJy_73P6Y-j57Cw==/base.apk exec app_process /system/bin com.netease.nie.yosemite.Capture --scale 100 --socket javacap_19089 -lazy 2>&1
[2023-10-22 12:18:10,149][DEBUG]<airtest.utils.nbsp> [javacap_sever]b'Capture server listening on @javacap_19089'
[2023-10-22 12:18:10,158][ERROR]<airtest.core.android.cap_methods.screen_proxy> OSError('socket connection broken')
[2023-10-22 12:18:10,158][ERROR]<airtest.core.android.cap_methods.screen_proxy> Javacap setup up failed!
[2023-10-22 12:18:10,159][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell ls /data/local/tmp/minicap
[2023-10-22 12:18:10,169][DEBUG]<airtest.utils.nbsp> [javacap_sever]b''
[2023-10-22 12:18:10,197][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell ls /data/local/tmp/minicap.so
[2023-10-22 12:18:10,239][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -v 2>&1
[2023-10-22 12:18:10,272][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-10-22 12:18:10,273][DEBUG]<airtest.core.android.cap_methods.minicap> upgrade minicap to lastest version: -1->5
[2023-10-22 12:18:10,273][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell rm -r /data/local/tmp/minicap*
[2023-10-22 12:18:10,312][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell getprop ro.product.cpu.abi
[2023-10-22 12:18:10,344][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell getprop ro.build.version.preview_sdk
[2023-10-22 12:18:10,380][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell getprop ro.build.version.release
[2023-10-22 12:18:10,413][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 push C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\stf_libs\x86_64\minicap /data/local/tmp/minicap
[2023-10-22 12:18:10,461][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell chmod 755 /data/local/tmp/minicap
[2023-10-22 12:18:10,504][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 push C:\Tools\FGO-py.portable\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-10-22 12:18:10,540][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell chmod 755 /data/local/tmp/minicap.so
[2023-10-22 12:18:10,583][INFO]<airtest.core.android.cap_methods.minicap> minicap installation finished
[2023-10-22 12:18:10,583][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -n 'airtest_minicap' -P 1440x2560@1440x2560/90 -s
[2023-10-22 12:18:10,615][ERROR]<airtest.core.android.cap_methods.screen_proxy> b''
[2023-10-22 12:18:10,615][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-10-22 12:18:10,616][ERROR]<airtest.core.android.cap_methods.screen_proxy> Minicap setup up failed!
[2023-10-22 12:18:10,616][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell screencap -p
[2023-10-22 12:18:11,829][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell screencap -p
[2023-10-22 12:18:13,160][DEBUG]<fgo.Fuse> 0
[2023-10-22 12:18:13,463][DEBUG]<fgo.Detect> isMainInterface False
[2023-10-22 12:18:13,464][DEBUG]<fgo.Detect> isBattleContinue False
[2023-10-22 12:18:13,465][DEBUG]<fgo.Detect> isTurnBegin True
[2023-10-22 12:18:13,465][INFO]<fgo.Kernel> Battle 1
[2023-10-22 12:18:13,465][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell screencap -p
[2023-10-22 12:18:14,681][DEBUG]<fgo.Fuse> 0
[2023-10-22 12:18:14,981][DEBUG]<fgo.Detect> isTurnBegin True
[2023-10-22 12:18:15,183][DEBUG]<airtest.core.android.adb> C:\Tools\FGO-py.portable\Python39\Lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 127.0.0.1:16384 shell screencap -p
[2023-10-22 12:18:16,485][DEBUG]<fgo.Fuse> 0
[2023-10-22 12:18:16,499][DEBUG]<fgo.Ocr> __call__ 3
[2023-10-22 12:18:16,499][DEBUG]<fgo.Detect> getStage 3
[2023-10-22 12:18:16,499][DEBUG]<fgo.Detect> isServantFriend False
[2023-10-22 12:18:16,499][DEBUG]<fgo.Detect> isServantFriend False
[2023-10-22 12:18:16,500][DEBUG]<fgo.Detect> isServantFriend True
[2023-10-22 12:18:16,505][DEBUG]<fgo.Ocr> __call__ 3
[2023-10-22 12:18:16,505][DEBUG]<fgo.Detect> getStageTotal 3
[2023-10-22 12:18:16,532][DEBUG]<fgo.Detect> getFieldServantClassRank (13, 0)
[2023-10-22 12:18:16,541][DEBUG]<fgo.Detect> getFieldServant 367
[2023-10-22 12:18:16,564][DEBUG]<fgo.Detect> getFieldServantClassRank (4, 0)
[2023-10-22 12:18:16,611][DEBUG]<fgo.Detect> getFieldServant 326
[2023-10-22 12:18:16,632][DEBUG]<fgo.Detect> getFieldServantClassRank (6, 0)
[2023-10-22 12:18:16,685][DEBUG]<fgo.Detect> getFieldServant 314
[2023-10-22 12:18:16,685][INFO]<fgo.Kernel> Turn 1 Stage 3 StageTurn 1 [367, 326, 314]
[2023-10-22 12:18:16,705][DEBUG]<fgo.Detect> setupEnemyGird 0
[2023-10-22 12:18:16,715][DEBUG]<fgo.Ocr> __call__ 
[2023-10-22 12:18:16,715][DEBUG]<fgo.Detect> getEnemyHp 0
[2023-10-22 12:18:16,722][DEBUG]<fgo.Ocr> __call__ 704,140
[2023-10-22 12:18:16,723][DEBUG]<fgo.Detect> getEnemyHp 704140
[2023-10-22 12:18:16,731][DEBUG]<fgo.Ocr> __call__ 
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> getEnemyHp 0
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> getEnemyHp 0
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> getEnemyHp 0
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> getEnemyHp 0
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,731][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,732][DEBUG]<fgo.Detect> isSkillReady True
[2023-10-22 12:18:16,732][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,732][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,732][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,732][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,732][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,733][DEBUG]<fgo.Detect> getEnemyNp (0, 0)
[2023-10-22 12:18:16,734][DEBUG]<fgo.Detect> getEnemyNp (0, 4)
[2023-10-22 12:18:16,735][DEBUG]<fgo.Detect> getEnemyNp (0, 0)
[2023-10-22 12:18:16,735][DEBUG]<fgo.Detect> getEnemyNp (0, 0)
[2023-10-22 12:18:16,735][DEBUG]<fgo.Detect> getEnemyNp (0, 0)
[2023-10-22 12:18:16,735][DEBUG]<fgo.Detect> getEnemyNp (0, 0)
[2023-10-22 12:18:16,735][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,736][DEBUG]<fgo.Detect> isSkillReady False
[2023-10-22 12:18:16,768][CRITICAL]<fgo.Gui> Script Stopped: Stop Command Effected

命令行log:
From https://github.com/hgjazhgj/FGO-py
 * branch            master     -> FETCH_HEAD
Already up to date.
[2023-10-22 12:17:24,771][INFO]<fgo> FGO-py v18.8.3 PID 28644
[2023-10-22 12:17:57,108][INFO]<airtest.core.android.adb> connected to 127.0.0.1:16384

[2023-10-22 12:17:58,267][INFO]<airtest.core.android.rotation> update orientation None->1
[2023-10-22 12:17:58,811][WARNING]<fgo.Detect> Package: com.bilibili.fatego, Region: CN
[2023-10-22 12:18:10,158][ERROR]<airtest.core.android.cap_methods.screen_proxy> OSError('socket connection broken')
[2023-10-22 12:18:10,158][ERROR]<airtest.core.android.cap_methods.screen_proxy> Javacap setup up failed!
[2023-10-22 12:18:10,272][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-10-22 12:18:10,583][INFO]<airtest.core.android.cap_methods.minicap> minicap installation finished
[2023-10-22 12:18:10,615][ERROR]<airtest.core.android.cap_methods.screen_proxy> b''
[2023-10-22 12:18:10,615][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-10-22 12:18:10,616][ERROR]<airtest.core.android.cap_methods.screen_proxy> Minicap setup up failed!
C:\Tools\FGO-py.portable\Python39\lib\site-packages\airtest\core\android\cap_methods\adbcap.py:10: UserWarning: Currently using ADB screenshots, the efficiency may be very low.
  warnings.warn("Currently using ADB screenshots, the efficiency may be very low.")

截图

image

还有别的吗?

模拟器:mumu12

运行环境 VT : 开启 Hyper-V : 关闭 网络环境检测 : 正常 以管理员运行方式 : 否 DirectX 11是否安装 : 是 防火墙 : 开启(建议关闭)

电脑配置 主板型号 : Manufacturer: Micro-Star International Co., Ltd. Product: MAG B660M MORTAR WIFI DDR4 (MS-7D42) CPU : 12th Gen Intel(R) Core(TM) i7-12700 系统版本 : Windows 10 64-bit Kernel 10.0.19045 显卡驱动 : 正常 显卡驱动型号 : 31.0.15.3713 (20230814) 所有显卡 : NVIDIA GeForce RTX 3080 | Intel(R) UHD Graphics 770 | Microsoft Basic Render Driver 当前使用显卡 : NVIDIA GeForce RTX 3080 安装磁盘(可用/总)空间 : 465.3GB/1863GB 可用内存/总内存 : 9.2GB/31.8GB

模拟器设置 Root : 关闭 显卡渲染模式 : DirectX 模式 性能设置 : 4核/3GB 手机型号 : vivo IQOO 10 Pro 分辨率 : 2560 * 1440 高帧率 : 开启

来点色图

エリちゃん(ブレイブ) 町村こもり 59842011

hgjazhgj commented 1 year ago

换模拟器