android 通过adb shell命令旋转Android屏幕朝向
获取当前方向一:
adb shell "dumpsys input | grep SurfaceOrientation"
# 纵向(正常状态:顺时针旋转0°):SureaceOrientation 的值为 0
# 横向(顺时针旋转90°): SureaceOrientation 的值为 1
# 纵向(顺时针旋转180度): SureaceOrientation 的值为 2
# 横向(顺时针旋转270度): SureaceOrientation 的值为 3
注意: 默认0有的为横向,有的为纵向
获取当前方向二:
adb shell "dumpsys window displays|grep init="
纵向返回结果:cur
的值 宽
短 x 高
长
init=1080x1920 420dpi cur=1080x1920
app=1080x1794 rng=1080x1017-1794x1731
横向返回结果:cur
的值 宽
长 x 高
短
init=1080x1920 420dpi cur=1920x1080
app=1794x1080 rng=1080x1017-1794x1731
旋转屏幕
#禁止旋转
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
#陀螺仪控制
#屏幕翻转
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#手动
#屏幕翻转
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
#或者:
#屏幕翻转
adb shell settings put system user_rotation 1
#屏幕正常模式
adb shell settings put system user_rotation 0
android 通过adb shell命令旋转Android屏幕朝向相关推荐
- android ADB shell 命令启动 android程序
今天用eclipase写了个android程序,主要用到了service.activity.broadcast,在安卓系统手机上调试通过,现在想用ADB shell命令启动这个程序,使达到的效果和在e ...
- Android SDK: adb shell 命令的使用(am、pm、wm、screencap、monkey等)
本文链接: https://blog.csdn.net/xietansheng/article/details/86675136 adb其他命令介绍详见上一篇: Android SDK: adb 常用 ...
- Android 常用adb shell 命令
原文地址http://blog.csdn.net/rain_butterfly/article/details/40894807 调试Android程序有时需要adb shell 命令,adb全称An ...
- Android常用adb shell命令
1.显示应用版本信息 dumpsys package com.flyzebra.app | grep version 2.显示应用安装路径 pm path com.flyzebra.app 或者 pm ...
- adb shell 命令打开android系统的开发者选项界面
adb shell am start -n com.android.settings/com.android.settings.DevelopmentSettings
- adb shell命令_[Android]adb的使用
什么是ADB: Android-debug-bridge(简称ADB),命令行工具,可以与android设备进行通信. 安装ADB: 直接安装: sudo apt-get install adb 下载 ...
- android afw 权限,如何从adb shell命令启动AFW徽章应用程序?
我无法启动Android从Adb shell命令启用工作的应用程序? 有人可以举个例子吗? 请参阅附加屏幕,我想启动Playstore应用程序. 没有徽章ICON Play商店应用程序也具有与Badg ...
- 学习转载:Android中常用shell命令详解
https://blog.csdn.net/Z_HUALIN/article/details/77878609 设置adb环境变量 其实就是将adb.exe的路径放到Path中,目的是cmd直接可以使 ...
- android 常用adb 和 adb shell 命令 获取root权限
android 常用adb 和 adb shell 命令 ADB常用命令: 1. 查看设备 adb devices 这个命令是查看当前连接的设备, 连接到计算机的android设备或者模拟器将会 ...
最新文章
- 什么是采样层(pooling)
- swift string,Int,Double相互转换
- Galaxy 生信平台(二):生产环境部署
- 青源Forum | 人工智能的数理基础前沿系列报告 · 第 3 期
- NTFS的交换数据流ADS应用
- MySQL—04—MySQL的其他对象
- unity 开发总结
- python安装第三方库win10_音频处理 windows10下python三方库librosa安装教程
- Kafka是靠什么机制保持高可靠,高可用的?
- java正则表达式及api_Java API 之 正则表达式
- 高性能高可靠性的全数字嵌入式仿真测试软件SkyEye
- 国际电汇的清算代码是什么?
- 面向对象的编程-类和实例
- w7设置双显示器_怎么在windows7系统下设置双显示器
- Python+Visual Studio
- div探索系列(二):让多个div显示在一行(浮动的div)
- win10 64位下Oracle10g安装
- mac os安装Windows系统失败后不能合并为一个分区
- STM32芯片无法下载 芯片锁死 M3错误的一种解决方案
- 查看电脑开机关机记录