Is there any "adb command" or anything by which Android device (not emulator) display can get rotate ie landscape to potrait and vice versa
I think this should work. To change the screen orientation to lanscape :
service call window 18 i32 1
and to change it to portrait :
service call window 18 i32 0
.
I've found the solution:
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
1
at the end means that the device rotation will be set to "landscape".0
- "portrait". 2
- "reversed portrait". 3
- " other landscape". Sources:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.