在哪里可以找到/ system / bin和system / xbin中的android shell命令文档?
答案 0 :(得分:0)
我收集了一些主要的adb commands
以下是adb命令的集合
1导航至主屏幕 - > " adb shell am start -a android.intent.action.MAIN -c android.intent.category.HOME"
2应用程序安装 - > " adb安装TPLTRCU.apk"
3应用程序卸载 - > " adb uninstall com.tpltrcu"
4查看apk属性 - > " aapt dump badging"
5删除默认启动器 - > " adb shell rm
/system/app/Launcher3.apk"6 Android运行服务 - > " adb shell dumpsys活动服务"
7 Android版 - > " adb shell getprop ro.build.version.release"
8 Android SDK版本 - > " adb shell getprop ro.build.version.sdk"
9个Android属性 - > " adb shell getprop"
10日期&时间 - > " adb shell date"
11申请人 - 停止 - > " adb shell am force-stop"
12个正在运行的进程 - > " adb shell ps"
13 ADB shell - > " adb shell"
14网络状态 - > " adb shell netcfg"
15获取文件 - > " adb pull path_to_file"
16放置文件 - > " adb push sourcePath destinationPath"
17更改时区 - > " adb shell setprop persist.sys.timezone "亚/加尔各答"" 查找时区[http://en.wikipedia.org/wiki/List_of_tz_database_time_zones]
18进行备份 - > “adb backup -apk -shared -all”
19恢复 - > “adb restore backup.ab”
20要保存来自android的日志 - > “adb shell logcat> log.txt的”
21检查CPU使用情况 - > “adb shell dumpsys cpuinfo”
22 CheckMemory用法 - > “adb shell dumpsys meminfo”
23更改设置 - > “adb shell am start -n com.android.settings / .Settings”
通过亚行提交的24个错误报告 - > “adb bugreport> bug_report.txt”
25错误报告解析 - > “java -jar chkbugreport.jar bug_report.txt” 获取chkbugreport.jar [https://github.com/sonyxperiadev/ChkBugReport/downloads]
26重新启动操作系统 - > " adb shell reboot"
27 ADB版本 - > " adb版本"
28获取帮助 - > " adb help"
29获取序列号 - > " adb get-serialno"
30设备列表 - > " adb devices"
31开始运行 - > " adb shell ps"
32打印转储 - > " adb shell dumpsys"
33开始活动 - > " adb shell am start PACKAGE_NAME / .ACTIVITY_NAME"
34保存屏幕截图 - > " adb shell screencap -p /mnt/image_name.png"
35已安装软件包列表 - > " adb shell pm list packages -f"
36制作关键事件 - > " adb shell输入keyevent"
Logcat选项
如果要控制每个日志条目的格式被转储,那么 需要使用" adb logcat -v"选项,支持 以下格式:
37显示优先级/标签和发出消息的进程的PID (默认格式) - > " adb logcat -v brief"
38仅显示PID - > " adb logcat -v process"
39仅显示优先级/标签 - > " adb logcat -v tag"
40显示原始日志消息,没有其他元数据字段 - > " adb logcat -v raw"
41显示日期,调用时间,优先级/标记和PID 发出消息的过程 - > " adb logcat -v time"
42显示线程的优先级,标记以及PID和TID 发出消息 - > " adb logcat -v thread"
43显示日期,调用时间,优先级,标记和PID 和发出消息的线程的TID - >" adb logcat -v threadtime"
44显示所有元数据字段并用空白分隔消息 线 - > " adb logcat -v long"
adb命令的关键代码"输入keyevent"
0 - > " KEYCODE_UNKNOWN"
1 - > " KEYCODE_MENU"
2 - > " KEYCODE_SOFT_RIGHT"
3 - > " KEYCODE_HOME"
4 - > " KEYCODE_BACK"
5 - > " KEYCODE_CALL"
6 - > " KEYCODE_ENDCALL"
7 - > " KEYCODE_0"
8 - > " KEYCODE_1"
9 - > " KEYCODE_2"
10 - > " KEYCODE_3"
11 - > " KEYCODE_4"
12 - > " KEYCODE_5"
13 - > " KEYCODE_6"
14 - > " KEYCODE_7"
15 - > " KEYCODE_8"
16 - > " KEYCODE_9"
17 - > " KEYCODE_STAR"
18 - > " KEYCODE_POUND"
19 - > " KEYCODE_DPAD_UP"
20 - > " KEYCODE_DPAD_DOWN"
21 - > " KEYCODE_DPAD_LEFT"
22 - > " KEYCODE_DPAD_RIGHT"
23 - > " KEYCODE_DPAD_CENTER"
24 - > " KEYCODE_VOLUME_UP"
25 - > " KEYCODE_VOLUME_DOWN"
26 - > " KEYCODE_POWER"
27 - > " KEYCODE_CAMERA"
28 - > " KEYCODE_CLEAR"
29 - > " KEYCODE_A"
30 - > " KEYCODE_B"
31 - > " KEYCODE_C"
32 - > " KEYCODE_D"
33 - > " KEYCODE_E"
34 - > " KEYCODE_F"
35 - > " KEYCODE_G"
36 - > " KEYCODE_H"
37 - > " KEYCODE_I"
38 - > " KEYCODE_J"
39 - > " KEYCODE_K"
40 - > " KEYCODE_L"
41 - > " KEYCODE_M"
42 - > " KEYCODE_N"
43 - > " KEYCODE_O"
44 - > " KEYCODE_P"
45 - > " KEYCODE_Q"
46 - > " KEYCODE_R"
47 - > " KEYCODE_S"
48 - > " KEYCODE_T"
49 - > " KEYCODE_U"
50 - > " KEYCODE_V"
51 - > " KEYCODE_W"
52 - > " KEYCODE_X"
53 - > " KEYCODE_Y"
54 - > " KEYCODE_Z"
55 - > " KEYCODE_COMMA"
56 - > " KEYCODE_PERIOD"
57 - > " KEYCODE_ALT_LEFT"
58 - > " KEYCODE_ALT_RIGHT"
59 - > " KEYCODE_SHIFT_LEFT"
60 - > " KEYCODE_SHIFT_RIGHT"
61 - > " KEYCODE_TAB"
62 - > " KEYCODE_SPACE"
63 - > " KEYCODE_SYM"
64 - > " KEYCODE_EXPLORER"
65 - > " KEYCODE_ENVELOPE"
66 - > " KEYCODE_ENTER"
67 - > " KEYCODE_DEL"
68 - > " KEYCODE_GRAVE"
69 - > " KEYCODE_MINUS"
70 - > " KEYCODE_EQUALS"
71 - > " KEYCODE_LEFT_BRACKET"
72 - > " KEYCODE_RIGHT_BRACKET"
73 - > " KEYCODE_BACKSLASH"
74 - > " KEYCODE_SEMICOLON"
75 - > " KEYCODE_APOSTROPHE"
76 - > " KEYCODE_SLASH"
77 - > " KEYCODE_AT"
78 - > " KEYCODE_NUM"
79 - > " KEYCODE_HEADSETHOOK"
80 - > " KEYCODE_FOCUS"
81 - > " KEYCODE_PLUS"
82 - > " KEYCODE_MENU"
83 - > " KEYCODE_NOTIFICATION"
84 - > " KEYCODE_SEARCH"
85 - > " TAG_LAST_KEYCODE"
完整指南
Karim Yaghmour的嵌入式Android
也会帮助你。你可以buy it from here。对于E-Book follow这个