copy from https://github.com/operando/Android-Command-Note

Android Command Note

Logcat

adb logcat -v time

adb logcat -v time -b main

adb logcat -v time -b system

adb logcat -v time -b events

adb logcat -v time -b radio

adb shell logcat -b all

adb logcat -B

Android 6.0〜

adb shell logcat -v color

Android 7.0〜

adb logcat -e android

adb logcat -m 100

log

adb shell log [message]

adb shell log -t [tag name] [message]

adb shell log -p [log level] [message]

mount

$ adb shell
$ su
# mount -o rw,remount /system

Bugreport

adb bugreport

Application

adb install [Apk File]

adb uninstall [Package Name]

pm - PackageManager

adb shell pm list packages

adb shell pm list packages -e

adb shell pm list packages -d

adb shell pm list packages -s

adb shell pm list packages -3

dumpsys

adb shell dumpsys

adb shell dumpsys -l

adb shell dumpsys [system service]

adb shell dumpsys service [service name]

adb shell dumpsys activity activities

adb shell dumpsys activity top

adb shell dumpsys activity all

adb shell dumpsys activity provider

adb shell dumpsys activity provider all

adb shell dumpsys gfxinfo

adb shell dumpsys jobscheduler

adb shell dumpsys netpolicy

Root

adb root

Key Event

adb shell input keyevent [event key]

adb shell input keyevent KEYCODE_HOME

adb shell input keyevent KEYCODE_BACK

adb shell input keyevent KEYCODE_MENU

Alarm

adb shell dumpsys alarm

System properties

adb shell getprop

adb shell getprop [property name]

adb shell setprop [property name] [property value]

screenrecord

adb shell screenrecord /sdcard/test.mp4

adb shell screenrecord --size 720x1080 /sdcard/test.mp4

adb shell screenrecord --bit-rate 10000000 /sdcard/test.mp4

adb shell screenrecord --time-limit 120 /sdcard/test.mp4

adb shell screenrecord --bugreport /sdcard/test.mp4

"unofficial" options

adb shell screenrecord --rotate /sdcard/test.mp4

adb shell screenrecord --output-format raw-frames /sdcard/test

screenrecordの"unofficial" optionsは夢がいっぱいだった

Date

adb shell date -s YYYYMMDD.hhmmss

YYYYMMDD:年月日 hhmmss:時分秒

要Root

【Android】adb shell date は System User or radio Groupじゃないと反映されない

Windows

adb shell date -s %date:0,4%%date:5,2%%date:8,2%.%time:0,2%%time:3,2%%time:6,2%

Linux or Mac

adb shell date -s $(date +"%Y%m%d.%H%M%S")

Dropbox

adb shell dumpsys dropbox

adb shell dumpsys dropbox --print

adb shell dumpsys dropbox --file

Lint

lint [application directory] --html [file name].html

lint [application directory] --simplehtml [file name].html

Windows

lint [application directory] --fullpath --quiet --html lint_%date:0,4%%date:5,2%%date:8,2%-%time:0,2%%time:3,2%%time:6,2%.html

Linux or Mac

lint [application directory] --fullpath --quiet --html lint_$(date +"%Y%m%d-%H%M%S").html

Kernal

adb shell dmesg

adb shell cat /proc/kmsg

Permission

adb shell pm list permissions -d -g

adb shell pm grant [permission.name] ...

adb shell pm revoke [permission.name] ...

Other

adb shell printenv

adb reboot

adb shell reboot recovery

adb pull [Unit Path] [Local Path]

adb push [File Path] [Unit Path]

adb shell input text [string]

adb jdwp

adb shell am start -a android.settings.WEBVIEW_SETTINGS

[Android Tips] 25. ADB Command Note的更多相关文章

  1. How to Use Android ADB Command Line Tool

    Android Debug Bridge (adb) is a tool that lets you manage the state of an emulator instance or Andro ...

  2. 【原创】Android开发之ADB及ADB SHELl命令的应用

    adb的全称为Android Debug Bridge,就是起到调试桥的作用.通过adb我们可以在Eclipse中方面通过DDMS来调试Android程序,说白了就是debug工具.adb的工作方式比 ...

  3. Android Tips – 填坑手册

    出于: androidChina   http://www.androidchina.net/3595.html 学习 Android 至今,大大小小的坑没少踩,庆幸的是,在强大的搜索引擎与无私奉献的 ...

  4. 【转】Android开发调试工具ADB的使用

    原文网址:http://www.cnblogs.com/meil/archive/2012/05/24/2516055.html ADB(Android Debug Bridge)是Android S ...

  5. 解决adb command not found以及sdk环境配置

    解决adb command not found以及sdk环境配置 分类: mark 2013-10-02 09:41 2975人阅读 评论(0) 收藏 举报 原文地址:http://www.cnblo ...

  6. mac上adb command not found

    第一种报错(使用的自带mac命令行) bash: adb: command not found 1.vim ~/.bash_profile ,如果.bash_profile不存在,先touch ~/. ...

  7. 解决Mac上adb: command not found问题

    使用mac进行开发的时候,有时候需要使用adb指令来进行一些操作,但是如果没有配置过Android环境变量,可能会出现adb: command not found的问题,查了一些资料,这里记录一下ma ...

  8. ionic打包apkFailed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137

    错误代码如下 BUILD SUCCESSFUL in 12s 46 actionable tasks: 1 executed, 45 up-to-date Built the following ap ...

  9. 转:Android 调试桥(adb)是多种用途的工具

    转自:http://my.oschina.net/xuwa/blog/1574 Android 调试桥(adb)是多种用途的工具,该工具可以帮助你你管理设备或模拟器 的状态. 可以通过下列几种方法加入 ...

随机推荐

  1. redis非特定类型命令

    1. key查询 keys my* #获取当前数据库中符合模式的所有key exists mykey #查看key是否还存在 2. 数据库操作 redis默认一个实例的数据库是16个[db0-db15 ...

  2. MySQL - 问题集 - "Got error 28 from storage engine"

    数据库的临时目录空间不够,修改配置文件中的tmpdir,指向一个硬盘空间很大的目录即可. windows下,找到配置文件my.ini. [mysqld] tmpdir=D:/work/tool/mys ...

  3. Unity4.0的使用

    最近公司用到了Unity,自己就研究了一下. 新建一个ASP.NET MVC基本项目,在NuGet上引入Unity4.0.1最新版. 因为我使用的项目为ASP.NET MVC,所以又添加一个Unity ...

  4. iOS模糊效果(毛玻璃效果)的实现

    前一段时间项目中用到毛玻璃效果,那时对UIBlurEffect类和 UIVisualEffectView这两个类做了一部分了解.但当时并没有去特别的深入研究,直到项目做完后,才静下心来好好研究了一番. ...

  5. MySQL 存储过程基本函数

    字符串类 CHARSET(str) //返回字串字符集CONCAT (string2 [,... ]) //连接字串INSTR (string ,substring ) //返回substring首次 ...

  6. java基础-接口

    浏览以下内容前,请点击并阅读 声明 接口是java语言中的一个引用类型,和类一样,接口可以包含常量,方法签名,默认方法,静态方法和嵌套类型.含有方法主体的只有其中的默认方法和静态方法.接口不能被实例化 ...

  7. WSDL项目----操作和请求

    至于现在你只看服务相关的特性,让我们尝试更多的操作和相应的请求. 操作 每个基于WSDL服务公开的操作包括一个请求和响应消息格式(可选). soapUI服务中的动作显示为节点在项目导航器的服务下 在s ...

  8. vs 2015 连接不上tfs 错误代码:TF31002

    在vs2015里面怎么也连接不上,把地址放到浏览器里可以打开,所以点击右边的 在visual studio 中打开,然后将源码映射到本地

  9. dedecms中调用制定栏目

    {dede:type typeid='5'} <li> <a href="[field:typelink/]" target="_blank" ...

  10. UVA 10791 Minimum Sum LCM(分解质因数)

    最大公倍数的最小和 题意: 给一个数字n,范围在[1,2^23-1],这个n是一系列数字的最小公倍数,这一系列数字的个数至少为2 那么找出一个序列,使他们的和最小. 分析: 一系列数字a1,a2,a3 ...