adb、git相关
git
- 代码提交到远程分支后,想在在commit下追加提交
git commit --amend
按键 i 进入insert状态, 直接进行修改,改成你想要的
输入完成后,按ESC退出输入模式
输入:wq完整保存退出
- 多次commmit后。想合并到一个commit, 是由rebase
adb
- 编码格式
设置dos编码格式 UTF-8 : chcp 65001
设置dos编码格式 GBK : chcp 936
- 启动Activity、server、广播
启动Activity
adb shell am start -n xxx.xxx.xxx/xxx.xxx.xxx.activitydebug启动Activity
adb shell am start -n -d xxx.xxx.xxx/xxx.xxx.xxx.activity
发送广播
adb shell am broadcast -a com.test.action --es key "value" --ei keyInt 1启动服务
adb shell am startService xxx.xxx.xxx/xxx.xxx.xxx.service
- 杀进程
列出所有进程ID: adb shell ps
列出指定包名; adb shell "ps|grep" xxx.xxx.xxx
- 分辨率
分辨率:adb shell wm size
密度:adb shell density
- 1
log
- 打印任务栈
Log.i(TAG, “” + Log.getStackTraceString(new Throwable()));
- 任务栈
打印任务栈: adb shell dumpsys activity activities
adb shell dumpsys activity activities | grep com.itbird
打印的任务栈存到日志
adb shell dumpsys activity activities >D:\ReceiveFiles\temp\log_qq.txt
搜索栈信息-跟踪任务栈:
Task display areas in top down Z order
查看activity数量-可以定位是否有activity内存泄露
adb shell dumpsys meminfo com.hihonor.id:pay
- 1