You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
执行后报错日志:
03-19 16:22:00.170 13826 13826 E AndroidRuntime: FATAL EXCEPTION: main logcat.txt
03-19 16:22:00.170 13826 13826 E AndroidRuntime: java.lang.UnsupportedOperationException: WindowManagerEventInjector is not supported
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.compat.InputManagerWrapper$WindowManagerEventInjector.(InputManagerWrapper.java:100)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.compat.InputManagerWrapper.(InputManagerWrapper.java:22)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.MinitouchAgent.(MinitouchAgent.java:236)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.Console.listenAndServe(Console.java:84)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.Console.main(Console.java:70)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:401)
总结:
因为执行脚本时偶现ui apk被杀后自启失败,故增加了卸载重新init操作;采用手动Init操作时,先卸载UI相关环境后再安装ui环境时出现WindowManagerEventInjector is not supported。查找资料发现WindowManagerEventInjector 在Android 12后已经不支持相关方法了,是不是需要对异常代码行进行修复或规避。
The text was updated successfully, but these errors were encountered:
luofengwang
changed the title
收到Init时com.github.uiautomator报WindowManagerEventInjector is not supported
手动Init时com.github.uiautomator报WindowManagerEventInjector is not supported
Mar 19, 2024
测试代码:
if uiautomator_package in pkglist or uiautomator_test_package in pkglist:
os.system("adb -s " + device + " shell /data/local/tmp/atx-agent server --stop")
os.system("adb -s " + device + " shell rm /data/local/tmp/atx-agent")
os.system("adb -s " + device + " uninstall " + uiautomator_package)
os.system("adb -s " + device + " uninstall " + uiautomator_test_package)
time.sleep(1)
os.system("adb -s " + device + " install -r -t -g " + sys.path[0] + "\uiautomator\" + "app-uiautomator.apk")
os.system("adb -s " + device + " install -r -t -g " + sys.path[0] + "\uiautomator\" + "app-uiautomator-test.apk")
os.system("adb -s " + device + " push " + sys.path[0] + "\uiautomator\" + "atx-agent " + "/data/local/tmp/")
os.system("adb -s " + device + " shell chmod 755 /data/local/tmp/atx-agent")
os.system("adb -s " + device + " shell /data/local/tmp/atx-agent server -d")
time.sleep(1)
执行后报错日志:
03-19 16:22:00.170 13826 13826 E AndroidRuntime: FATAL EXCEPTION: main
logcat.txt
03-19 16:22:00.170 13826 13826 E AndroidRuntime: java.lang.UnsupportedOperationException: WindowManagerEventInjector is not supported
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.compat.InputManagerWrapper$WindowManagerEventInjector.(InputManagerWrapper.java:100)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.compat.InputManagerWrapper.(InputManagerWrapper.java:22)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.MinitouchAgent.(MinitouchAgent.java:236)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.Console.listenAndServe(Console.java:84)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.github.uiautomator.Console.main(Console.java:70)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
03-19 16:22:00.170 13826 13826 E AndroidRuntime: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:401)
总结:
因为执行脚本时偶现ui apk被杀后自启失败,故增加了卸载重新init操作;采用手动Init操作时,先卸载UI相关环境后再安装ui环境时出现WindowManagerEventInjector is not supported。查找资料发现WindowManagerEventInjector 在Android 12后已经不支持相关方法了,是不是需要对异常代码行进行修复或规避。
感谢大佬们抽空处理!
atx-agent.log
atx-agent.daemon.log
logcat.txt
The text was updated successfully, but these errors were encountered: