Adb和GIT常用指令

展开通知栏
adb shell cmd statusbar expand-notifications
收起通知栏
adb shell cmd statusbar collapse
打开通知里更多设置
adb shell cmd statusbar expand-settings
通知栏帮助
adb shell cmd statusbar help
滑动解锁
adb shell input keyevent 82
查看当前运行的应用
adb shell dumpsys activity top | findstr ACTIVITY
查看当前的顶层应用
adb shell dumpsys activity | findstr "mResumedActivity"
检测当前是否处于锁屏状态(android 12)
dumpsys window policy | grep mIsShowing
关闭自动旋转
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
设置设备的显示模式(横向,纵向,最后面参数的取值范围是0, 1, 2, 3)
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
移除device-owner权限命令(输入adb shell dpm list-owners查看当前有权限的应用,然后remove-active-admin指定应用)
adb shell dpm remove-active-admin com.android.cts.verifier/.managedprovisioning.DeviceAdminTestReceiver
#获取屏幕休眠时间
adb shell settings get system screen_off_timeout
#更改休眠时间,10分钟  (never为2147483647)
adb shell settings put system screen_off_timeout 600000
#系统 全局 安全相关参数
adb shell settings list system
adb shell settings list global
adb shell settings list secure
属性对应的值(Android API): https://developer.android.com/reference/android/provider/Settings.System

GIT

进入相应的项目文件, 打开命令行或者右键打开bash
1: git checkout main  //切换到主分支
2: git pull //拉取最新代码
3: git branch huchengbo_date //创建新分支
4: git checkout huchengbo_date //切换到最新分支
5: 修改文件
6: git status //查看修改状态
7: git add . //将修改添加到暂存区
8: git status //再次查看修改状态
9: git commit //提交修改
10: git push //上传修改

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值