码迷,mamicode.com
首页 > 移动开发 > 详细

android ADB的简单实用实践

时间:2016-10-03 10:42:33      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:

 

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

 

 

 

 

 

 

android ADB的简单实用实践

标签:

原文地址:http://www.cnblogs.com/ClodThunder/p/5925780.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!