11

On android phones, the orientation typically defaults to portrait. When you disable auto-rotation, the screen will always remain in a portrait mode.

On android tablets, the orientation typically defaults to landscape. When you disable auto-rotation, the screen will always remain in a landscape mode.

Apparently tablets were not envisioned for use while lying sideways. When I do this, there is no way to get the tablet to remain in portrait mode - with or without auto-rotation the screen is stuck in landscape.

As it is pretty hard for me to change gravity, I am trying to figure out if I can hack my tablet to default to portrait mode. My question is, where would this be set? As I can't find any applications that can force change the orientation I get the impression this is embedded somewhere deep and inaccessible in the operating system. Is this possibly somewhere in the properties file? Is it embedded deep in the hardware? Where can I start looking?

My specific tablet is a Notion Ink Adam Running BeastyRom 2.2.1 + Clemsyn

edit: also asked here: http://forum.xda-developers.com/showthread.php?p=14315083#post14315083

4 Answers 4

11

It's possible to override the default screen orientation by disabling accelerometer rotation and setting user rotation in the system settings database. The phone/tablet needs to be rooted to do this. The change is applied after the phone/tablet is rebooted.

On the console:

su
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
insert into system (name,value) values('accelerometer_rotation',0);
insert into system (name,value) values('user_rotation',1);
.exit
  • user_rotation 0 -> ROTATION_0
  • user_rotation 1 -> ROTATION_180
  • user_rotation 2 -> ROTATION_270
  • user_rotation 3 -> ROTATION_90

See http://developer.android.com/reference/android/provider/Settings.System.html#USER_ROTATION for more details

7
  • 1
    Instead of rooting the phone/tablet, you can just write an app that changes these settings permanently. Add <uses-permission android:name="android.permission.WRITE_SETTINGS" /> to the manifest to give it the required permission and in the code run Settings.System.putInt(this.contentResolver, Settings.System.ACCELEROMETER_ROTATION, 0); to disable auto rotation and Settings.System.putInt(this.contentResolver, Settings.System.USER_ROTATION, Surface.ROTATION_0); to set the phone's new default screen rotation.
    – Sam
    Commented Jul 8, 2014 at 10:31
  • can't find sqlite3 , have an idea ? Commented Sep 24, 2014 at 12:52
  • @Sam woooow your way is just awesome and it totally worked with me Commented Sep 24, 2014 at 14:07
  • 1
    @MuhammedRefaat, actually I've since discovered a flaw in this approach: enabling and disabling the auto rotation setting via the phone settings UI actually resets the USER_ROTATION value.
    – Sam
    Commented Sep 24, 2014 at 23:20
  • @Sam yeah that's right, and really great hint Commented Sep 25, 2014 at 7:01
1

You could use a custom home launcher like ADW -

Go to ADWSettings > UI Settings > Screen Preferences > Home Orientation this allows you to specify which orientation you want.

Apart from that im not sure its possible

Only other thing could be Custom ROM

1
  • 2
    that sets the home orientation for the launcher. When I start an app it then goes into landscape mode
    – fostandy
    Commented Jun 24, 2011 at 4:37
1

The auto-rotate setting is just that, automatic. When it is disabled, the device doesn't always use a single screen orientation, but uses whatever orientation is active when entering an application, until that app is closed. At least, this is trite for phones, i have little experience with tablets, but I expect it would be the same. If it is, just make sure the tablet is in portrait when you launch the app, and you'll be good.

7
  • this is not the case for me. If I enable auto-rotate, then orient it so it is in portrait mode, then enter an application, then disable auto-rotate, my tablet goes back to landscape.
    – fostandy
    Commented Jun 24, 2011 at 0:34
  • what if you disable auto-rotate, hold the tablet horizontally, then launch an application? Commented Jun 24, 2011 at 13:55
  • then my launcher orients in landscape mode and the application also starts in landscape mode
    – fostandy
    Commented Jun 25, 2011 at 7:20
  • what happens if you do the same thing, but start vertically, in portrait mode? how to the launcher and application react? Commented Jun 27, 2011 at 12:26
  • I can't - when I disable auto-rotate my tablet goes into landscape mode. To start apps in portrait mode I have to enable auto-rotate (see my first comment)
    – fostandy
    Commented Jun 30, 2011 at 3:23
0

Sideways Mode

I've written an app to let you use auto-rotation even when you're lying on your side. You can get it from the Play store here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .