多春鱼小屋

登录
记住密码
  1. 首页
  2. Android 常用adb命令
Android 常用adb命令
发布 | 2015-5-31 | 评论数:0 | 阅读数:2796 | 标签:Android
ADB常用命令:

1. 查看设备 
        adb  devices
  这个命令是查看当前连接的设备, 连接到计算机的android设备或者模拟器将会列出显示 

2. 安装软件 
  adb  install <apk文件路径> 
  这个命令将指定的apk文件安装到设备上
       参数“-r”,它是更新安装的意思,
       参数 -s ,安装到sdcard. 
       如: adb install com.sina.weibo.apk	

3. 卸载软件 
  adb  uninstall <包名>  
        如果加 -k 参数,为卸载软件但是保留配置和缓存文件.
        如: adb uninstall com.sina.weibo.apk	

4. 登录设备shell 
  adb  shell 
  adbshell <command命令> 
  这个命令将登录设备的shell. 
  后面加<command命令>将是直接运行设备命令, 相当于执行远程命令
        如:	adb  shell cat /proc/kmsg 

5. 从电脑上发送文件到设备 
  adb push <本地路径> <远程路径> 
  用push命令可以把本机电脑上的文件或者文件夹复制到设备(手机)
        如: adb push /local/build.prop  /system/build.prop

6. 从设备上下载文件到电脑 
  adb  pull <远程路径> <本地路径> 
  用pull命令可以把设备(手机)上的文件或者文件夹复制到本机电脑
        如: adb  /system/build.prop  /local/

7. 同步更新 
         adb sync [ <directory> ]
         如果不指定目录,将同时更新 /data 和  /system/
         如: adb sync /data/

8. 显示帮助信息 
  adb  help 
  这个命令将显示帮助信息

9.  重新挂载
        adb  remount
        重新挂载系统  分区 用于读写
       
10.   启 動和关閉
        adb start-server             - ensure that there is a server running
        adb kill-server              - kill the server if it is running

11. 重启设备
         adb reboot [bootloader|recovery]      - reboots the device, optionally into the bootloader or recovery program


12. 查看Log 
     	[adb] logcat [<option>] ... [<filter-spec>] ..
      	-b <buffer> 加载一个可使用的日志缓冲区供查看,比如event 和radio . 默认值是main 。具体查看Viewing 	Alternative Log Buffers. 
 	-c 清楚屏幕上的日志. 
 	-d 输出日志到屏幕上. 
 	-f <filename> 指定输出日志信息的<filename> ,默认是stdout . 
 	-g 输出指定的日志缓冲区,输出后退出. 
	 -n <count> 设置日志的最大数目<count> .,默认值是4,需要和 -r 选项一起使用。 
	 -r <kbytes> 每<kbytes> 时输出日志,默认值为16,需要和-f 选项一起使用. 
	 -s 设置默认的过滤级别为silent. 
 	-v <format> 设置日志输入格式,默认的是brief 格式
	where <tag> is a log component tag (or * for all) and priority is:
 	 V    Verbose
 	 D    Debug
 	 I    Info
 	 W    Warn
 	 E    Error
 	 F    Fatal
 	 S    Silent (supress all output)

	'*' means '*:d' and <tag> by itself means <tag>:v

13、查看bug报告:
	 adb bugreport 

分享至:

本文已关闭评论

  • 评论0
  • 粉丝1
  • 文章33

    • 多春鱼
    • 广州
    • 1970年2月26日
    • 联系 :capelin@qq.com 微信:imcapelin
    • 查看更多 >
    热门文章
    标签
    Delphi Android PHP Tools