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 <远程路径> <本地路径>

 

 

 

 

 

 

转载于:https://www.cnblogs.com/ClodThunder/p/5925780.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值