bat与adb命令结合使用

一.循环拨号

rem 循环标志
:LOOP
rem 开始拨号,10086表示号码
adb shell am start -a android.intent.action.CALL -d tel:10086
rem 延时执行下条命令用
ping 127.0.0.1 -n 20>a.txt
del a.txt
rem 模拟挂断电话
adb shell input keyevent 6
rem 跳转到标志位
goto LOOP

二、批量安装同一文件下的apk

@echo off
rem 遍历当前文件夹下的apk并安装
for /f “delims=” %%i in (‘dir /b /a-d /s “*.apk”’) do adb install %%i
Pause

三、循环发送短信
:loop
rem 发送短信,10010表示号码,hello是内容
adb shell am start -a android.intent.action.SENDTO -d sms:10010 –es sms_body “hello” –ez exit_on_sent true
rem 模拟发送键
adb shell input keyevent 66
goto loop

四、发送5条短信给10010
for /l %%i in (1,1,5) do adb shell am start -a android.intent.action.SENDTO -d sms:10010 –es sms_body “hello” –ez exit_on_sent true & adb shell input keyevent 66
pause

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值