zoukankan      html  css  js  c++  java
  • android ADB的简单实用实践

    Using activity manager

    // app 分辨率高 测试低分辨率  用来做屏幕适配

    Override emulator/device display density. This command is helpful for testing your app across different screen densities on high-density screen environment using a low density screen, and vice versa.

    1.display-density <dpi>

    eg:

    am display-density 480

     

    Override emulator/device display size. This command is helpful for testing your app across different screen sizes by mimicking a small screen resolution using a device with a large screen, and vice versa.

    2.display-size [reset|<WxH>]  

    eg:

    am display-size 1280x800

    Kill all background processes.

    kill-all

     

    3.adb shell pm uninstall []

    eg:

    adb shell pm install /storage/emulated/0/Download/app-release.apk

    可能出现问题:

    Failure [INSTALL_FAILED_INVALID_URI]

    原因,你手机上存在该项目。所以先卸载后安装。

    adb shell pm uninstall com.lskj.rrhr.shortkeytest 红色部分指的是apk 的package  

    manifest package
    你可能关心怎么将apk 传到手机活着模拟器。
    adb push [apk电脑本地路径] [手机上的目标路径]
    eg:adb push app/app-release.apk /storage/emulated/0/Download

    4.adb shell pm install [手机上apk的路径]

    5.adb push [apk电脑本地路径] [手机上的目标路径]

    6.adb devices 查看当前所有的设备

     7.adb pull <远程路径> <本地路径>

     

     

     

     

     

  • 相关阅读:
    finally 到底是什么时候执行的问题
    转发与重定向
    java中的常量池
    数据库优化之设置fetchSize
    java集合去重和排序
    jdbc连接数据库
    重写和重载的区别
    <? extends E>和<? super E> 的意义和区别
    入栈和出栈规律
    JAVA中poi操作excel合并单元格的技巧,以及easypoi,注解@Excel的操作
  • 原文地址:https://www.cnblogs.com/ClodThunder/p/5925780.html
Copyright © 2011-2022 走看看