架构想法
架构比较简单,有个安卓端和webserver端。
2.按照个人需求修改代码
这里我提供了一个get_commands方法供开发者使用。有两个参数,第一个token代表登陆时的标签,用以区分用户。第二个img_file代表安卓设备的截图。
所以只要修改 simple-control-server/logics.py 文件即可。
私信菜鸟007有神秘惊喜哦!
def get_commands(token, img_file): """ analyze the screenshot and send commands back to android device """ img_file.save("tmp.png") print(token) # your adb shell commands cmds = [ 'input text "111"', 'input text "222"', 'input text "333"', ] return cmds 复制代码
这里面为了简单,提供了一个每个一秒自动输入“111”、“222”、“333”的例子。