关于adb shell命令
autojs吧
全部回复
仅看楼主
level 5
兰陵網 楼主
//想在shell模式下滑动屏幕,但是没有效果,加true也没有用。
var result=shell("input swipe 343,1500, 343, 200 ,200");
//var result=shell("input swipe 343,1500, 343, 200 ,200",true);
log(result);
console.show();
if(result.code == 0){ toast("执行成功");}
else{ toast("执行失败!请到控制台查看错误信息");}
2022年04月03日 17点04分 1
level 4
这需要root权限
2022年04月04日 02点04分 2
找到问题的原因了命令的正确写法是shell("input swipe "+343+" "+1500+" "+343+" "+200+" "+200,true); 需要root权限。
2022年04月04日 07点04分
shell命令 shell("input tap 353 269") 这种写法也能行,和auto.js的写法不一样,可以理解成调用。
2022年04月04日 07点04分
level 1
shell("input tap 353 269") 这样不root可以运行吗?一样在autojs里面可以运行,在其他app就报错,code:137
2022年04月09日 16点04分 4
看官方文档,ctrl+f 搜索tap,相关的阅读下就知道了。
2022年04月12日 07点04分
Auto.js执行大部分任务不需要root权限。只有需要精确坐标点击、滑动的相关函数才需要root权限
2022年04月12日 19点04分
1