com.isoftstone.client.ipsa
com.isoftstone.client.ipsa
am start -n com.isoftstone.client.ipsa/com.isoftstone.ipsa.app.activity.SplashActivity
使屏幕点亮
input keyevent 224
滑动屏幕开锁 swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
input swipe 300 1800 300 800
打开软件
am start -n com.isoftstone.client.ipsa/com.isoftstone.ipsa.app.activity.SplashActivity
延时几秒
点击某一位置
input tap 240 1500
等待几秒
input tap 900 1470
点击打卡
应该一直循环判断时间
写入apk在某个范围是打卡或者开启应用闹铃提醒打卡
input keyevent 224
input swipe 300 1800 300 800
am start -n com.isoftstone.client.ipsa/com.isoftstone.ipsa.app.activity.SplashActivity
sleep 10
input tap 240 1500
sleep 11
input tap 900 1470
//1、回到主界面
input keyevent 3
//2、打开微信
am start -n com.tencent.mm/com.tencent.mm.ui.LauncherUI
//3、延时反应一会
sleep 3
//4、点击进入联系人
input tap 500 450
//5、进入输入菜单
input tap 1000 1850
//6、点视频聊天框
input tap 750 1350
//7、点击语音或视频聊天等待对方回复
input tap 600 1700
手机内执行脚本不能分隔开?
- #!/system/bin/sh
- result=`sleep 3`
- result=`input keyevent 3`
- result=`am start -n com.tencent.mm/com.tencent.mm.ui.LauncherUI`
- result=`sleep 5`
- result=`input tap 500 450 `
- result=`input tap 1000 1850`
- result=`input tap 750 1350`
- result=`input tap 600 1700`
>adb root
adbd cannot run as root in production builds
exit的话,先是退回到$,之后才是退出shell。
执行
$adb shell
#su
命令格式:
adb shell am start [options] <INTENT>
例如:
adb shell am start -n com.tencent.mm/.ui.LauncherUI
表示调起微信主界面。
adb shell am start -n org.mazhuang.boottimemeasure/.MainActivity --es "toast" "hello, world"
表示调起 org.mazhuang.boottimemeasure/.MainActivity
并传给它 string 数据键值对 toast - hello, world
。
点亮屏幕:
adb shell input keyevent 224
熄灭屏幕:
adb shell input keyevent 223
如果锁屏没有密码,是通过滑动手势解锁,那么可以通过 input swipe
来解锁。
命令(参数以机型 Nexus 5,向上滑动手势解锁举例):
adb shell input swipe 300 1000 300 500
参数 300 1000 300 500
分别表示起始点x坐标 起始点y坐标 结束点x坐标 结束点y坐标
。
在焦点处于某文本框时,可以通过 input
命令来输入文本。
命令:
adb shell input text hello
现在 hello
出现在文本框了。
2.模拟物理按键操作: input keyevent 3
3.模拟点击操作:input tap 500 500
4.模拟滑动操作:input swipe 200 500 400 500
(2)使用apktool
使用反编译工具apktool,反编译后打开AndroidManifest.xml文件,查找方式同“有源码情况”
(3)aapt
感谢“天地会珠海分舵”地址:http://blog.csdn.net/zhubaitian/article/details/38926679
三、没有apk,应用已经安装到手机或虚拟机中
1.logcat
.清除logcat内容,使用命令adb logcat -c
.启动logcat,使用命令adb logcat ActivityManager:I *:s
.启动要查看的程序,
2.dumpsys
(1)启动要查看的程序;
(2)命令行输入:adb shell dumpsys window w |findstr \/ |findstr name=
联系客服