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 手机内执行脚本不能分隔开?
>adb root $adb shell #su 获取文件系统的读写权限,只需要执行shell脚本中一句 mount -o rw,remount / 调起 Activity命令格式: 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" 表示调起 点亮屏幕: adb shell input keyevent 224 熄灭屏幕: adb shell input keyevent 223 滑动解锁如果锁屏没有密码,是通过滑动手势解锁,那么可以通过 命令(参数以机型 Nexus 5,向上滑动手势解锁举例): adb shell input swipe 300 1000 300 500 参数 输入文本在焦点处于某文本框时,可以通过 命令: adb shell input text hello 现在 2.模拟物理按键操作: input keyevent 3 4.模拟滑动操作:input swipe 200 500 400 500 查看Android应用包名、Activity的几个方法adb shell pm list packages 如果想知道应用对应的apk文件在手机上的安装位置则可以在上面的命令后加-f参数 adb shell pm list packages -f 二、只有Apk的情况 (1)aapt 使用命令行aapt dump xmltree ColaBox.apk AndroidManifest.xml (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= |
|