这些Api是提供给动手能力较强的人,特别是作者。
利用的是Android的Intent机制。
X8大师:a)支持adb shell;b)支持手机命令行;c)手机App发起intent。
X8沙箱:a)支持沙箱内的命令行;b)沙箱内App发起intent;c)网络Adb(0.6.3.1以上)
1、开启加速/暂停(com.x8.api.{包名}.action.acc):
1 2 3 4 5 6 7 |
#以游戏“霸王雄心”九游版为例,包名为:com.manling.bwxx.aligames #加速200.9,开始命令: adb shell am broadcast -a com.x8.api.com.manling.bwxx.aligames.action.acc --es cmd "start_acc" --es scale "200.9" #暂停命令: adb shell am broadcast -a com.x8.api.com.manling.bwxx.aligames.action.acc --es cmd "stop_acc" |
2、悬浮窗隐藏/移动功能(com.x8.api.{包名}.action.bm):
1 2 3 4 5 6 7 8 9 10 |
#以游戏“霸王雄心”九游版为例,包名为:com.manling.bwxx.aligames,在辅助脚本调用命令行执行 沙箱内测试终端推荐用“T-UI” #移动悬浮窗到坐标(1000, 300) am broadcast -a com.x8.api.com.manling.bwxx.aligames.action.bm --es cmd "move" --es ball "x8acc" --ei x 1000 --ei y 300 #隐藏悬浮窗 am broadcast -a com.x8.api.com.manling.bwxx.aligames.action.bm --es cmd "hide" --es ball "x8acc" #显示悬浮窗 am broadcast -a com.x8.api.com.manling.bwxx.aligames.action.bm --es cmd "show" --es ball "x8acc" |
3、沙箱网络adb链接方法 (0.6.3.1以上)
1 2 3 4 5 6 7 8 9 |
# adb connect {手机ip}:9527 # adb -s {手机ip}:9527 shell # 例如:手机ip是 192.168.1.103 adb connect 192.168.1.103:9527 # connected to 192.168.100.103:9527 adb -s 192.168.100.103:9527 shell # root@walleye:/ # |