我的开发一些记事本

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.activity

debug启动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

11

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值