我找到了一个从命令行启动模拟器的命令:
$ android-sdk-path/emulator/emulator -avd Nexus_5X_API_26 -netdelay none -netspeed full
但是我需要从命令行检查仿真器是否已经运行然后将它带到屏幕的前面。这可以从命令行吗?
答案 0 :(得分:2)
找到了我的问题的答案:
创建osscript文件showEmulator.scpt
tell application "System Events"
tell application process "Dock"
tell list 1
tell UI element "emulator"
perform action "AXPress"
end tell
end tell
end tell
end tell
然后以这种方式从终端执行它
osascript ~/scripts/showEmulator.scpt