zoukankan      html  css  js  c++  java
  • python+adb,随便点点。

    adb下载

    以下是adb工具包最新Google官方版下载地址:

    ADB和Fastboot for Windows

    https://dl.google.com/android/repository/platform-tools-latest-windows.zip

    ADB和Fastboot for Mac

    https://dl.google.com/android/repository/platform-tools-latest-darwin.zip

    ADB和Fastboot for Linux

    https://dl.google.com/android/repository/platform-tools-latest-linux.zip

    由于这些是直接的 Google 链接,用户可以确保下载不仅是官方的,而且将始终能够获得最新版本的 ADB 和 Fastboot 。

    原文链接:https://blog.csdn.net/liuxinfa/article/details/82878816

    adb安装+系统环境变量配置

    1、在“platform-tools”路径下可以看到图示三个adb相关的文件。现在需要将这个路径添加到系统环境变量中。

    我的↓其他被我删了,不影响。

     

    2、打开我的电脑——高级系统设置——系统属性——高级——环境变量

    3、然后点击系统变量——编辑Path,将步骤1 adb所在路径添加到Path变量值中。最后点击“确定”。

    3、重新打开一个cmd窗口,输入adb,可以看到如下的窗口,有显示adb的版本和用法,这就说明adb正确安装好了。

    原文链接:https://zhidao.baidu.com/question/458972580.html

    设置手机

    数据线连接电脑 ,手机打开开发者模式+usb调试,输入 adb devices,出现下图就是连接上手机了

    手机进行设置,在开发者模式里找到指针位置选项,并打开,是为了获取点位信息的。

    简单代码

    # 引入time包  
    import os  
    import time  
    def daka():  
    print(os.system('adb shell input keyevent 224')) # 电源键  
    time.sleep(3)  
    print(os.system('adb shell input tap 647 1685 ')) # 点击钉钉应用  
    time.sleep(3)  
    print(os.system('adb shell input tap 528 2190 ')) # 点击菜单  
    time.sleep(3)  
    print(os.system('adb shell input swipe 747 1413 747 323')) # 上滑  
    time.sleep(3)  
    print(os.system('adb shell input tap 910 1011 ')) # 点击考勤打卡  
    time.sleep(3)  
    print(os.system('adb shell am force-stop com.alibaba.android.rimet'))  
    pass  
    # 函数定义  
    def sleeptime(hour, min, sec):  
      print(hour * 3600 + min * 60 + sec)   return hour * 3600 + min * 60 + sec # 设置自动执行间隔时间,我这里设置的2s second = sleeptime(0, 0, 10) # 死循环 while 1 == 1: # 延时   time.sleep(second) # 执行 daka()

    原文来源:https://www.cnblogs.com/zzpython/p/13377508.html

     

  • 相关阅读:
    go函数和方法
    Golang的“面向对象”
    高性能 socket 框架
    wpf 自定义圆形按钮
    WPF 实际国际化多语言界面
    使用过滤器对mvc api接口安全加密
    使用mvc3实现ajax跨域
    WPF,给颜色SolidColorBrush添加动画
    C# 通用验证类 支持 WPF,MVC,Winform
    WSL安装ubuntu搭建vue开发环境(三):docker安装
  • 原文地址:https://www.cnblogs.com/DLYQY/p/15159588.html
Copyright © 2011-2022 走看看