Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9152597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:05:36+00:00 2026-06-17T12:05:36+00:00

I am trying to build an automated test framework for checking basic things that

  • 0

I am trying to build an automated test framework for checking basic things that an app should respond to, without crashing. One of those is checking if an app responds to configuration change properly. Now, since it is automated, I have to switch the emulator’s orientation between landscape and portrait and observe if it crashes, PROGRAMMATICALLY. [caps cuz there are many questions relating to ctrl+F12 or num pad 7]

I am trying to figure out an adb or emulator console command to get this done.

i did a telnet to localhost:5554 and entered the following commands:

$sensor status // gives the enabled/disabled status of all sensors

acceleration: enabled.
magnetic-field: enabled.
orientation: enabled.
temperature: enabled.
proximity: enabled.
OK

$sensor get orientation

orientation = 0:0:0

$sensor set orientation 90:0:0

OK

I tried different combinations of this and it doesn’t respond. To get the value that is set when it is in landscape mode, I manually changed the orientation using ctrl+F12 and tried getting the orientation sensor status again, and to my dismay, the value didn’t change.

A certain blog also mentioned this particular command in ADB

$service call window 18 i32 1

$service call window 18 i32 0

for switching orientations. But, I get this error message

Result: Parcel(fffffffc ffffffff ‘……..’)

It would be great if I could get a solution to this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:05:37+00:00Added an answer on June 17, 2026 at 12:05 pm

    Finally I figure out a way to do it.

    First I will try to clarify the question a little bit:

    usually people talking about ‘rotate’ the AVD screen actually mean changing the skin layout to portrait/landscape (Mimic rotation of the tablet). Which can be done by press “7/9” key on number keypad or press ctrl+Fn+F12. In this case, the direction of the display will not change, sometimes the display will be annoying Left-to-right or right-to-left, in stead of natural up-to-bottom. This can be solved by uncheck the auto-rotation in android setting.

    However, in some case we would like to see the effect of the gravity sensor. I think this is actually related to the OP’s question. Unlike the GPS, there is no GUI tools of Eclipse to do this. The OP is very close to solve the problem. However, the orientation sensor is not the correct one, we need to use the gravity/acceleration sensor to rotate the screen automatically.
    try following command and observe the display direction with auto-rotation on:

    sensor set acceleration 9.77622:0:0
    sensor set acceleration 0:9.77622:0
    sensor set acceleration 0:0:9.77622
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a test framework for automated web testing in Selenium and
I'm trying to build a feature into my framework wrapper that automates registering template
I am trying to build an automated email that will send attachments based on
I am trying build an automated testing framework for some of our internal web
I'm trying to build an automatic testing framework (based on jUnit, but that's no
I'm trying to work out an automated Build-Deploy-Test workflow using Lab Management/VS 2010 and
I am trying to setup an automated build of my Windows CE application. However,
I am trying to set up an automated build system on Windows using Cygwin.
I'm new to TFS and we're trying to automate the test / build /
I'm trying to setup an automated build server for my rails projects using Hudson

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.