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. 【淘淘】Quartz之集群利弊

    一.前言: 虽然单个Quartz实例能给予我们很好的任务job调度能力,但它不能满足典型的企业需求,如可伸缩性.高可靠性满足.假如你需要故障转移的能力并能运行日益增多的 Job,Quartz集群势必成 ...

  2. CodeForces460B. Little Dima and Equation

    B. Little Dima and Equation time limit per test 1 second memory limit per test 256 megabytes input s ...

  3. Java的四种内部类

    Java的四种内部类包括如下: 成员内部类 静态内部类 局部内部类 匿名内部类 成员内部类: 定义在另一个类(外部类)的内部,而且与成员方法和属性平级叫成员内部类,......相当于外部类的非静态方法 ...

  4. Python for Infomatics 第12章 网络编程四(译)

    注:文章原文为Dr. Charles Severance 的 <Python for Informatics>.文中代码用3.4版改写,并在本机测试通过. 12.7 用BeautifulS ...

  5. .NET Framework中Object基类有哪些方法?

    ToString(),虚方法,任何子类可重写自定义 GetType(),非虚,返回类型名 Equals(),虚方法,默认情况下判定两个引用是否指向同一实例.(ReferenceEquals()功能相同 ...

  6. ZeroMQ接口函数之 :zmq_msg_get - 获取消息的性质

    ZeroMQ 官方地址 :http://api.zeromq.org/4-1:zmq_msg_get zmq_msg_get(3)  ØMQ Manual - ØMQ/3.2.5 Name zmq_m ...

  7. 免费馅饼——G

    G. 免费馅饼 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼.说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内.馅饼如果 ...

  8. Java的算数运算符、关系运算符、逻辑运算符、位运算符

    JAVA的运算符,分为四类: 算数运算符.关系运算符.逻辑运算符.位运算符 算数运算符(9):+  -  *  /  %  ++  -- 关系运算符(6):==  !=  >  >=  & ...

  9. Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318/UITableView.m:10772

    Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3 ...

  10. 使用BOOTICE 恢复系统启动项

    使用BOOTICE 恢复系统启动项 我在安装deepin 系统的时候,经常遇到重启进不去系统,每次重启都会进入windows 系统,这让我感到特别头疼,试了好多次都不成功,有些情况是,成功后再次重启又 ...