• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Adb和GIT常用指令

武飞扬头像
Sodnrn
帮助1

展开通知栏
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 //上传修改

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgejhea
系列文章
更多 icon
同类精品
更多 icon
继续加载