I wanted to rotate the screen orientations i.e from landscape -> patriot and vice verse for every 500 ms(This is on real device(not on emulator)). Is there any shell command where we can rotate the current screen orientation? This is not corresponding to any of the app. I just want to rotate the screen in all available directions with irrespective to current activity
I've checked with adb shell to change the screen to landscape:
service call window 18 i32 1
change the screen to portrait:
service call window 18 i32 0
But these are not working on real device.. Can any one please provide a better solution to do this, would really helpful for me.
Atleast share/point me to any available scripts/apks that will do this auto orientations.
Thanks in advance
Well adb shell is still a shell (if a bit cut down)
You can do this:
And this is the one line version of it (in case you can not write it in file)
This will switch orientation every second (I don't think sleep works with less than seconds)