1

Is there any "adb command" or anything by which Android device (not emulator) display can get rotate i.e landscape to potrait and vice versa

Chris Stratton
  • 39,254
  • 6
  • 81
  • 117
Maverick
  • 565
  • 1
  • 11
  • 27
  • 1
    Try http://stackoverflow.com/a/14253321/603270 – shkschneider Apr 23 '14 at 12:43
  • @AndroidDev Sorry, but the question got edited 2 hours **after** I posted my comment (Maverick did not stated "not emulator" but Chris Stratton did)... Watch the history before going on flames. – shkschneider Aug 03 '15 at 08:03

1 Answers1

0

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.

MathieuMaree
  • 7,343
  • 6
  • 25
  • 31
  • 1
    @ Thnaks vieuMa for quick reply but .. it is displaying : Result: Parcel(00000000 '....') and screen orientation in not getting change :( – Maverick Apr 23 '14 at 12:50
  • @Maverick Sorry about that... I just found [another post](http://stackoverflow.com/questions/11184503/android-emulator-orientation-change-through-emulator-console-or-adb) that could maybe help you ? If not, do you really have to use ADB ? [Genymotion](http://www.genymotion.com/) is a really great emulator compared to standard emulator... – MathieuMaree Apr 23 '14 at 12:58
  • 1
    I am testing on real device .. there i have to perform this action during one test run – Maverick Apr 23 '14 at 13:06