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. WordPress安装插件提示输入FTP账户信息

    在WP后台安装插件时提示输入FTP账户信息,其实出现这个的问题的原因是Apache/Nginx的执行身份非文件属主身份. 如果你使用的是独立服务器或VPS,WordPress的安装目录为 /home/ ...

  2. HTTP 头字段总结

    1. Accept: 告诉WEB服务器自己接受什么介质类型,/ 表示任何类型,type/* 表示该类型下的所有子类型,type/sub-type.2. Accept-Charset: 浏览器申明自己接 ...

  3. 如何使用ArcGIS Online的地图数据作为底图

    1.添加数据-GIS服务器 2.选择添加ArcGIS Server 3.使用GIS服务,下一步 4.输入url为http://cache1.arcgisonline.cn/ArcGIS/service ...

  4. [USACO] 铺放矩形块 题解

    题目大意: 给定4个矩形块,找出一个最小的封闭矩形将这4个矩形块放入,但不得相互重叠.所谓最小矩形指该矩形面积最小. 思路: 枚举矩形的安放顺序,再按照题目所给的图判断即可,主要要想到枚举. 代码: ...

  5. python字符串

    字符串格式化 字符串格式化使用字符串格式化操作符%来实现:格式化字符串 % 值(字符串或者数字或者多个值的元组,字典) >>> format = "hello, %s. % ...

  6. ubuntu安装配置elasticSearch(vagrant)

    安装jdk sudo apt-get install python-software-properties sudo add-apt-repository ppa:webupd8team/java s ...

  7. SharedPreferences介绍,用来做数据存储

    sharedPreferences是通过xml文件来做数据存储的. 一般用来存放一些标记性的数据,一些设置信息. *********使用sharedPreferences存储数据 public sta ...

  8. Learn ZYNC (5)

    今天为了熟悉axiLite的自定义ip核设计, 把LED和SW的往AXI总线输入输出定义在一个ip核中, BD设计如下: ip核顶层文件(增加了LED_Out和SW_In的定义)mygpio_v1.0 ...

  9. C fread

    fread是一个函数.从一个文件流中读数据,最多读取count个元素,每个元素size字节,如果调用成功返回实际读取到的元素个数,如果不成功返回 0. 函数原型 size_t fread ( void ...

  10. PHP 模拟 HTTP 基本认证(Basic Authentication)

    当某个页面需要认证才能进行访问时,接到请求后服务器端会在响应头中发送一个 WWW-Authenticate 首部(用来标识认证安全域),语法为 WWW-Authenticate:Basic relam ...