git 常用命令
流程命令
git checkout - name
git add .
git reset HEAD name
git commit
git commit -m ""
git commit --amend
git push origin
回退
git reset --hard HEAD^ 回退到上一版本
git reset --hard commitID 回退到指定版本
分支
git branch 查看分支
git branch -a 查看所有分支
git branch -d 删除分支
adb 命令
其他
adb reboot resetfactory 手机恢复出厂设置
adb install apk 文件夹路径
adb logcat | grep -iE " " 抓日志过滤关键字
adb shell pm disable com.huawei.hwstartupguide :手机开机向导循环无法退出
adb shell wm size 查看手机分辨率
是否连接成功
adb devices
fastboot devices
手机解锁
adb reboot bootloader
sudo fastboot flashing unlock 按住声音上键
fastboot reboot
刷机
adb reboot bootloader
sudo fastboot flash system img路径
sudo fastbot reboot
刷机验证
cd odex/nolog
ls
cd SHN-ANOO-Ptelsp-CN/
adb reboot bootloader
./updateinadb-all.sh
刷root
cd root/update_pkg_res/BINs/
./get_root.sh
替换手机文件
adb root
adb disable-verity
adb reboot
adb root
adb remount
adb push 路径1 路径2 :将路径1安装到路径2下面
adb shell
获取应用报名
adb shell dumpsys activity top | grep pid 看最上层活动,获得相应的包名
adb shell dumpsys window | grep mCurrentFocus
adb shell pm path 路径 查看APK在文件中的位置
adb shell dumpsys SurfaceFlinger 查看该界面有几个窗口
getprop 查看此手机属性
adb shell getprop | grep hw_op 筛选出带有grep hw_op字样的属性
adb shell getprop | grep ro.product.wallet.nfc 看钱包的系统配置的值
adb shell getprop ro.build.date 查看所刷版本所对应的系统组件构建日期
adb shell getprep ro.build.hSystemVer 查看所刷版本所对应的系统组件信息
adb shell getprop ro.product.mode 查看手机型号
adb shell getprop | grep "lite" 查看是否有lite组件
apkList 查看系统组件和产品组件对应的
adb shell setprop ro. .
模拟手机电量
### 设置手机电量为1%;
adb shell dumpsys battery set level 1
### 设置断开充电
adb shell dumpsys battery unplug
### 复位,恢复实际状态
adb shell dumpsys battery reset