adb命令操作安卓模拟器app

链接网易mumu浏览器
adb connect 127.0.0.1:7555
查看在安卓模拟器安装的第三方包进入cmd输入:

adb shell pm list packages -3
package:com.UCMobile.x86
package:com.tencent.mtt.x86

获取安装包的Activity名称

adb shell "dumpsys window |grep mCurrentFocus"
mCurrentFocus=Window{218143fc u0 com.mumu.launcher/com.mumu.launcher.Launcher}

打开qq浏览器
adb shell am start -n {包(package)名}/{包名}.{活动(activity)名称}

adb shell am start -n com.tencent.mtt.x86/com.tencent.mtt.x86.MainActivity
Starting: Intent { cmp=com.tencent.mtt.x86/.MainActivity }

打开qq浏览器:
adb shell am force-stop com.tencent.mtt.x86-强制退出程序。
adb shell pm clear com.tencent.mtt.x86-清除缓存退出
关闭UC浏览器:
adb shell am force-stop com.UCMobile.x86-强制退出程序。
adb shell pm clear com.UCMobile.x86-清除缓存退出


@echo off
echo 点击网页
set time = 20
echo %time%
for /l %%i in (1,1,10) do (
 echo %%i
  adb shell input tap 1045.0 150.0

   ping 127.0.0.1 -n 2
   adb shell input tap 921 570
   ping 127.0.0.1 -n 2

   adb shell input tap 648 320

)
pause
RTBASIA_2  14:08:11
[文件]
RTBASIA_2  14:19:50
@echo off


rasdial "VPN-aliyunbj_c01"


rem 外网IP
wget  -O temp "http://ip.chinaz.com/getip.aspx" 
cls
for /f "tokens=2 delims='" %%i in (temp) do set result=%%i
del temp
echo 外网IP是: %result%

adb connect 127.0.0.1:7555
echo 点击网页
set "aqq=http://www.caacbook.com/?qqbrowser_office_"
set "auc=http://www.caacbook.com/?ucbrowser_office_"
set "bqq=%aqq%%result%"
set "buc=%auc%%result%"
echo %b%
ping 127.0.0.1 -n 4 >nul
for /l %%i in (1,1,1000) do (
  echo %%i
  adb shell am start -n com.tencent.mtt.x86/com.tencent.mtt.x86.MainActivity
  ping 127.0.0.1 -n 4 >nul
  adb shell input tap 1024.0 76.0

  ping 127.0.0.1 -n 4 >nul
  adb shell input tap 400.0 120.0

  ping 127.0.0.1 -n 2 >nul
  adb shell input text %bqq%
  ping 127.0.0.1 -n 2 >nul
  adb shell input tap 1040 120
  ping 127.0.0.1 -n 16 >nul
  adb shell am force-stop com.tencent.mtt.x86
  adb shell input keyevent 3
  ping 127.0.0.1 -n 5 >nul
  adb shell am start -n com.UCMobile.x86/com.uc.browser.InnerUCMobile
  ping 127.0.0.1 -n 4 >nul
  adb shell input tap 1026.0 82.0

  ping 127.0.0.1 -n 1 >nul
  adb shell input tap 437.0 1067.0

  ping 127.0.0.1 -n 1 >nul
  adb shell input tap 300.0 220.0

  ping 127.0.0.1 -n 2 >nul
  adb shell input text %buc%
  ping 127.0.0.1 -n 2 >nul
  adb shell input tap 1020 80
  ping 127.0.0.1 -n 19 >nul
  adb shell pm clear com.UCMobile.x86
  ping 127.0.0.1 -n 5 >nul
)
rasdial "VPN-aliyunbj_c01" /disconnect
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 版权声明:本文为LooperJing原创文章,转载请注明出处! 一、设备相关 1、adb devices显示连接到...
    LooperJing阅读 23,646评论 3 90
  • 最近看到一些关于adb的相关知识,总结一下,这些常用的命令以后可以直接拿来用~ adb其实就是Android De...
    Mr_冯先生阅读 4,277评论 0 10
  • android开发环境中,ADB是我们进行android开发经常要用的调试工具,它的使用当然是我们Android开...
    Memebox阅读 6,146评论 0 32
  • adb:Android 调试桥接 Android Debug Bridge,是一个 C/S 架构的命令行工具 a...
    LLd_阅读 3,138评论 0 3
  • 6月29日 星期四 晴 参加这个特训营耗费了很多时间和精力,同样收获也很多,只要够认真够有执行力,可以让微商小白...
    雪媚阅读 308评论 0 0