-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adb 无法获取屏幕朝向 (Android 15) #466
Comments
可以提供一下 |
好的,这是完整输出 |
那要么加个备用方案好了 adb shell dumpsys input | grep -m 1 -o -E "orientation=[0-9]" | head -n 1 | grep -m 1 -o -E "[0-9]" 只是不知道这样获取的准不准确 |
interface.json 里可以先加个配置试一下 {
// 在 controller 那些的里面
"adb": {
"config": {
"command": {
"Orientation": [
"{ADB}",
"-s",
"{ADB_SERIAL}",
"shell",
"dumpsys input | grep -m 1 -o -E orientation=[0-9] | head -n 1 | grep -m 1 -o -E [0-9]"
]
}
}
}
} |
将
会报错
另:如果设备分辨率非16:9,是需要手动adb调到16:9吗?是的话能否考虑自动调? |
-m 1,打错了 去掉能用也行 |
maafw 没有限制 16:9,只是分辨率比例不一样的话,图标的位置和形状和你开发的时候可能都不一样,导致用不了,相当于是业务层面的问题 如果可以保证你的识别兼容性足够好,理论上是任意分辨率都可以的。不过这很难做到,所以大伙一般都说要求 16:9 |
@MistEO mac genymotion的输出 |
@neko-para 你这俩用不了,走到 AdbShellInput 去了,AdbShellInput 不需要获取朝向( |
乐 |
@MistEO dumpsys input的输出 |
这么一想截图有测速,输入应该也加一个测试,刚列的 3.0 计划是在 toolkit 测,现在简单一点也可以在 adb controller 里测一下 但是比较麻烦的是,截图是 const 的(shen,输入不是,乱点一下给点错了什么东西也挺麻烦 |
v2.4.0 临时修改了一下判断屏蔽了 等 3.0 再重构一下 #478 |
如题,使用模板项目运行的报错如下:
完整的日志
adb shell input|grep orientation
的输出:安卓设备是Android15。
在
interface.json
中强制使用adb:{input:1}
之后可继续运行,但分辨率会错误。使用最新的MaaFW release和模板项目。
The text was updated successfully, but these errors were encountered: