随笔分类 -  遇到过的坑

摘要:import ssl ssl._create_default_https_context = ssl._create_unverified_context 阅读全文
posted @ 2024-04-09 16:00 只宅不技术 阅读(282) 评论(0) 推荐(0)
摘要:xcode升级到12.4后build不成功 解决:将build setting->combined->all->validate workspace设置为yes 启动 iproxy 8100 8100 tidevice xctest 阅读全文
posted @ 2021-07-07 17:42 只宅不技术 阅读(404) 评论(0) 推荐(0)
摘要:cmd = os.popen('adb shell dumpsys activity|findstr mFocus').read() 执行上述代码后会os.popen后台并不会结束 需要改为 cmd = os.popen('adb shell dumpsys activity|findstr mFo 阅读全文
posted @ 2020-05-22 20:52 只宅不技术 阅读(5020) 评论(0) 推荐(1)
摘要:无线adb连接手机跑功耗,代码里调用了定时器任务,但是发现手机经常出现断连的情况,或者offline,最终的解决方法 1、确定网络是否稳定 2、更新pocoui版本 pip install -U pocoui 3、检查代码中是否使用了多线程,若有的话,需要加线程锁。由于定时器任务里定义了两个方法,一 阅读全文
posted @ 2020-05-07 20:43 只宅不技术 阅读(2196) 评论(0) 推荐(0)
摘要:一、写一个定时器,5分钟连接一次 def new_connect_device(): global ip_port_str try: connect_device("android:///%s" % ip_port_str) logger.info("连接设备成功") return ADB(ip_p 阅读全文
posted @ 2020-04-25 00:10 只宅不技术 阅读(1462) 评论(0) 推荐(0)
摘要:现象:十分钟不使用就会自动关闭 usb 调试模式,重新打开还得输入验证码,真尼玛烦人。 方法: 数字拨号盘 输入 *#8011# 就可以永久打开. 阅读全文
posted @ 2020-04-16 00:06 只宅不技术 阅读(1495) 评论(0) 推荐(0)
摘要:一、进入系统设置,区域设置,将使用Unicode UTF-8提供全球语言支持勾选上,之后重启 二、 1、在cmd命令行模式中输入chcp 65001,然后回车 2、按住win+R打开windows运行窗口输入regedit点击确定,打开注册表 3、找到command processor项 新建aut 阅读全文
posted @ 2020-04-11 19:00 只宅不技术 阅读(520) 评论(0) 推荐(0)
摘要:打开手机中设置->应用->应用权限, 打开文件读写权限,好了…… 动态申请权限 if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERM 阅读全文
posted @ 2020-01-10 11:12 只宅不技术 阅读(1418) 评论(0) 推荐(0)
摘要:执行同样的split,python2和python3截取的行数内容却不一样 我想要截取Dalvik Heap行,使用split('\n')的方法 import os cpu='adb shell dumpsys meminfo com.cleanmaster.mguard_cn' re_cpu=os 阅读全文
posted @ 2019-10-30 17:54 只宅不技术 阅读(1381) 评论(0) 推荐(0)
摘要:代码如下,提示error: Logcat capture failed: spawn ENOENT from appium import webdriver from time import sleep desired_caps={} desired_caps['platformName']= 'A 阅读全文
posted @ 2019-10-29 10:58 只宅不技术 阅读(198) 评论(0) 推荐(0)