zoukankan      html  css  js  c++  java
  • android手机版本

    1.判断安卓手机是64位,还是32位

    adb pull /system/bin/cat
    file cat
    

    32位

    64位

    2.判断安卓手机CPU是64位,还是32位

    adb shell getprop|grep ro.product.cpu
    #如果ro.product.cpu.abilist64内容为空,CPU为32位
    

    32位

    64位

    3.判断安装包是否可以安装在32位的安卓机或模拟器

    将库存放在lib/下,针对不同的平台、不同的指令,启动不同的库。可以通过查看lib目录下是否包含x86目录判断安装包是否支持真机
    armeabi 真机
    x86 模拟器或x86机型

    #unzip -l 参数:  list files (short format)
    unzip -l xueqiu_108_05221425.apk |grep lib/
    
    # 4.adb shell input命令介绍 ```#shell adb shell input ``` ```log Usage: input [] [...]

    The sources are:
    dpad
    keyboard
    mouse
    touchpad
    gamepad
    touchnavigation
    joystick
    touchscreen
    stylus
    trackball

    The commands and default sources are:
    text (Default: touchscreen)
    keyevent [--longpress] ... (Default: keyboard)
    tap (Default: touchscreen)
    swipe [duration(ms)] (Default: touchscreen)
    draganddrop [duration(ms)] (Default: touchscreen)
    press (Default: trackball)
    roll (Default: trackball)
    tmode

    ```#shell
    #示例
    adb shell input text "hello world" #输入hello world
    adb shell input keyevent 4    #返回
    adb shell input tap 250 250 #点击
    adb shell input swipe 500 500 500 1500    #滑动
    adb shell input draganddrop 500 500 500 1500    #拖放
    

    更多keyevent code查看这里

    5.获取手机分辨率

    3种方式

    adb shell dumpsys window displays|grep init=|awk '{print $1}'
    adb shell dumpsys |grep init=|awk '{print $1}'    #适用于低版本的安卓机
    adb shell wm size
    
  • 相关阅读:
    忘了SA密码的SQL SERVER
    关于VC中的错误处理
    编译filezilla
    001.第一天|第二天
    JVM学习之类加载
    JAVA学习之HashCode
    JAVA学习之泛型
    JAVA学习之动态代理
    solr学习之域的管理与中文分析器配置
    solr 学习之简介及安装
  • 原文地址:https://www.cnblogs.com/csj2018/p/9800334.html
Copyright © 2011-2022 走看看