android莫名其妙打开支付宝,【未解决】用uiautomator2实现安卓手机打开支付宝自动收集蚂蚁森林能量...
折腾:
【调研】支付宝 蚂蚁森林 自动收集
期间,自己的小米9的安卓10手机,无法用前面调用的各种方式去实现自动手机蚂蚁森林能量
看来只能自己去写代码去实现了。
去搭建uiautomator2的python开发环境。
AutoCollectAliPayAntForestEnery
【已解决】Mac中搭建uiautomator2的开发环境
现在去写代码逻辑
先去启动支付宝
先去搞清楚此处支付宝的id是啥:
【已解决】安卓应用支付宝的包名app id即package id是啥
再去搞清楚:
【已解决】安卓中支付宝的蚂蚁森林页面的activity名称是什么
需要后续代码去能否直接启动到这个页面,才能验证的确是这个activity的name# 通过指定main activity的方式启动应用,等价于调用am start -n com.example.hello_world/.MainActivity
d.app_start("com.example.hello_world", ".MainActivity")
结果代码:# launch Alipay's AntForest activity
startResp = d.app_start(Alipay_PackageId, Alipay_Activity_AntForest)
logging.info("startResp=%s", startResp)
报错:$ curl -X POST -d '{"command": "am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n 'com.eg.android.AlipayGphone/com.alipay.mobile.nebulax.integration.mpaas.activity.NebulaActivity$Main'", "timeout": "60"}' 'http://localhost:49324/shell'
xxx connectionpool.py:433 DEBUG http://localhost:49324 "POST /shell HTTP/1.1" 200 2440
xxx.955 Response (45 ms) >>>
{"error":{"Stderr":null},"exitCode":255,"output":"Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.eg.android.AlipayGphone/com.alipay.mobile.nebulax.integration.mpaas.activity.NebulaActivity$Main }\nSecurity exception: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.eg.android.AlipayGphone/com.alipay.mobile.nebulax.integration.mpaas.activity.NebulaActivity$Main } from null (pid=31729, uid=2000) not exported from uid 10242\n\njava.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.eg.android.AlipayGphone/com.alipay.mobile.nebulax.integration.mpaas.activity.NebulaActivity$Main } from null (pid=31729, uid=2000) not exported from uid 10242\n\tat com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1089)\n\tat com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:788)\n\tat com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:587)\n\tat com.android.server.wm.ActivityStarter.startActivityMayWait(ActivityStarter.java:1388)\n\tat com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:518)\n\tat com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1089)\n\tat com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1063)\n\tat com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3560)\n\tat com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:518)\n\tat com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:172)\n\tat android.os.ShellCommand.exec(ShellCommand.java:104)\n\tat com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10062)\n\tat android.os.Binder.shellCommand(Binder.java:881)\n\tat android.os.Binder.onTransact(Binder.java:765)\n\tat android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4659)\n\tat com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2790)\n\tat android.os.Binder.execTransactInternal(Binder.java:1021)\n\tat android.os.Binder.execTransact(Binder.java:994)\n"}
<<< END
20200827 x AutoCollectAliPayAntForestEnery.py:110 INFO startResp=None
看来是没权限启动
只是只启动appstartResp = d.app_start(Alipay_PackageId)
结果:
是可以的{"error":null,"exitCode":0,"output":"Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.eg.android.AlipayGphone/.AlipayLogin }\n"}
手机页面已启动支付宝了:
不过启动那一刻,支付宝中很多内容还没刷新出来
不过无所谓,后续可以继续操作即可。
继续写代码
【未解决】用uiautomator2在支付宝中寻找并点击启动蚂蚁森林页面
android莫名其妙打开支付宝,【未解决】用uiautomator2实现安卓手机打开支付宝自动收集蚂蚁森林能量...相关推荐
- Android支付宝蚂蚁森林能量自动收取插件开发原理解析
转发一篇高技术含量的文章,原文网址为:https://www.52pojie.cn/thread-794312-1-1.html 一.前言 关于支付宝的蚂蚁森林能量收取这个非常有重大意义的东西,本人表 ...
- android 触摸灵敏,安卓手机打开这个设置,流畅度瞬间提升60%
原标题:安卓手机打开这个设置,流畅度瞬间提升60% 在即将过去的2016年,智能手机市场可谓是风起云涌.苹果创新无力.三星"爆炸门"事件,反而是国内手机厂商不断发力,先后推出了小米 ...
- android usb调试工具,USB调试怎么打开 各版本安卓手机打开USB调试模式方法
手机与电脑通常是通过Adb方式连接,所以需要您在设备上打开USB调试模式,不同版本的安卓系统,打开USB调试模式也有所不同,以下我们根据安卓系统版本而不同,介绍下各版本安卓手机打开USB调试模式的方法 ...
- python支付宝蚂蚁森林_用Python实现定时自动化收取蚂蚁森林能量,再也不用担心忘记收取了...
2. 环境 本文主要环境如下: Win7 小米5s Python3.7 Appium1.5 支付宝10.2.6.7010 3. 实现 功能实现的基本思路为: 打开支付宝进入蚂蚁森林,收取自己的能量 收 ...
- python支付宝每天自动收能量_用Python实现定时自动化收取蚂蚁森林能量,再也不用担心忘记收取了...
1. 概述 提到蚂蚁森林,大家应该都知道,你是否有因忘记收取能量而被好友收取的经历呢? 如果你不是蚂蚁森林重度用户,被别人收取了能量可能对你来说没什么. 但如果你是蚂蚁森林重度用户,遇到能量被偷 .. ...
- Android之蚂蚁森林能量水滴效果
最近公司有个需求,需要一个类似于蚂蚁森林能量水滴浮动效果,所以有了这篇文章,目前在项目里,没时间提出来做demo,有代码欠缺的地方欢迎指出,一定补上. 文章目录 一:效果图 二:具体实现 1.自定义圆 ...
- python支付宝蚂蚁森林_Python数据可视化-支付宝蚂蚁森林能量收取记录
支付宝蚂蚁森林模块最早从2016年推出,题主最开始从支付宝集福活动开始接触.期间懒懒散散收过一些能量,但是相比朋友圈动辄几十几百公斤的能量值,我的能量值只有20Kg,想种棵胡杨连零头都不够.所以,本着 ...
- airpods连接android怎么设置,AirPods怎么自定义功能 AirPods在安卓手机上连接怎么操作...
1.打开设置,找到控制中心,进入自定义界面,添加听觉功能 2.调出iphone的控制面板,点击那个耳朵的标志. 3.点击打开,便可以两个耳机之间彼此对话,你可以自己佩戴一个,交给受访/交谈对象进行对话 ...
- python支付宝自动收能量_守护支付宝的财产,使用Python实现定时自动化收取蚂蚁森林能量...
Python 兄弟姐妹们谁年轻是没有玩过农场,牧场游戏,现在有了蚂蚁森林,你是否有因忘记收取能量而被好友收取的经历呢? 如果你不是蚂蚁森林重度用户,被别人收取了能量可能对你来说没什么. 但如果你是蚂蚁 ...
最新文章
- Elasticsearch 如何做到快速检索 - 倒排索引的秘密
- acrh17华硕固件_华硕全新手游路由器RT-AC85P首发:雷达定向传输
- debug —— list调试命令
- 教你使用stm32接收串口的一帧数据!
- [六省联考2017]组合数问题
- 使用ASP.NET Core 3.x 构建 RESTful API - 4.2 过滤和搜索
- linux脚本算术函数,Linux基础之bash脚本编程初级-变量与算术运算
- QT5基础操作(一)
- SQL error: cannot use the special principal 'sa'
- 荒野行动系统推荐观战榜_荒野行动 观战延迟投票结果公示 更新计划抢先看!...
- word中表格占满一页,在后面出现一个空白页 删除方法
- ie浏览器中 textarea 不能自动换行
- css3中插入地图,CSS3 地图展开动画
- 安装搭建Reviewboard 实现pre-commit-review
- HTML背景颜色为什么改变不了,css背景颜色不显示怎么解决
- 乐高凯德机器人_乐高机器人体验课
- 人工智能/数据科学比赛汇总 2019.9
- java 导出excel换行_java WriteExcelFile生成excel如何让在一个单元格内换行?
- 如何做好基层管理者(一)
- php图片上传存储源码,可实现预览