Tinker Board Forum

Full Version: How-To: Change OS Screen Orientation via /system/build.prop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
So after a bit of trial and error, I was able to figure out how to change the OS screen orientation when booted. Long story short, this was always an issue when running Android on the Raspberry Pi Official 7" Touchscreen, since it was always appearing upside down. Seeing that it's not like Raspberry PI, there's no config file to edit which fixes it. With that said here's how you can change it through build.prop (performed on v13.11.0.5):

First, adb connect to your board, then run adb as root, connect to it again, remount the board's filesystem, then pull the current /system/build.prop to the current directory (or wherever you want to save it):
Code:
adb connect [ip address of tinkerboard]
adb root
adb connect [ip address of tinkerboard]
adb remount
adb pull /system/build.prop .

Then, edit the pulled build.prop file with a text editor. You want to focus on this particular property:
Code:
ro.sf.hwrotation=0

Change it to:
Code:
# other possible values:
# 0 = Landscape, 90 = Portrait, 180 = Reverse Landscape, 270 = Reverse Portrait
ro.sf.hwrotation=180

Save the modified build.prop file, then push it back to the Tinker Board and reboot the device:
Code:
adb push build.prop /system
adb reboot

Note that the "Rockchip Kernel" boot splash will still be upside down. This is normal. Once the Android logo is displayed during boot, it will show the orientation from the newly pushed build.prop file. Hope everyone finds this useful when using the Tinker Board with existing RPI hardware.
On my TB, with the last version of Android, screen orientation works fine after booting.
However, on some apps downloaded from playstore (Playzer, Spotify, FranceTV,) the screen orientaion is portrait while my (fixed) installation is lanscape.

Some of these Apps (Spotify), turn into Landscape after registration.
But it's still frutrating to have to register with a 90degree wrong orientation.

I searched in the parameters how to force "Landscape" but I did not find it.
Is there a way to do so.
Thanks for your reply
To keep e.g. spotify (and other apps with same behavior) in landscape orientation I have installed 'Rotation Lock Adaptive'.
(09-11-2017, 09:09 AM)wappi Wrote: [ -> ]To keep e.g. spotify (and other apps with same behavior) in landscape orientation I have installed 'Rotation Lock Adaptive'.

Sorry, but I am not an Android expert and my question may be stupid.
How do you install this?
Is it an App?
Does it maket it at each boot?
Hi, did anyone try to put the orientation to 90/270 degree? When i try to switch to portrait mode the orientation chages but not to fullscreen.
In my case i have the Tinker Board rooted.
So i could easily change the oriantation with the following apps (so without changes in the system folder):

- Rotation Control.apk
- Set Orientation.apk
- Ultimate Rotation.apk

all Apps worked.

The Problem that some apps open in portrait mode is solved so far and will open now in landscape mode but in some cases the app do not show some settings like in the navigation apk "Here We Go" there you have to change it back to portrait if you want to change some settings.
I was able to get the display to rotate, but my touch controls still act like it is in landscape. Are there any additional settings that I need to set in build.prop???
(11-28-2017, 11:27 PM)Fyb3roptik Wrote: [ -> ]I was able to get the display to rotate, but my touch controls still act like it is in landscape. Are there any additional settings that I need to set in build.prop???

I am the same. I can rotate to portrait but the touch controls are in landscape. I've tested on two separate touch screens and it is the same on both. Could it be hardware related to the screen rather than the board?

I've tried the steps in this post: https://android.stackexchange.com/questi...al-display but no luck. I am new to this so not sure if what was done there would work or if I have done it correctly.
(10-04-2017, 11:09 AM)Gadgetto Wrote: [ -> ]Hi, did anyone try to put the orientation to 90/270 degree? When i try to switch to portrait mode the orientation chages but not to fullscreen.

Now we can only support rotate 270 degrees clockwise with full screen.
(We will fix the rotate 90 degrees clockwise but not full screen issue at next release.)

the step is :
1.  follow this POST "https://tinkerboarding.co.uk/forum/thread-574-post-2144.html#pid2144" to set ro.sf.hwrotation=270
2. $ adb shell "setprop persist.demo.hdmirotation portrait"
3. reboot the device
(12-04-2017, 02:35 AM)jamess Wrote: [ -> ]
(10-04-2017, 11:09 AM)Gadgetto Wrote: [ -> ]Hi, did anyone try to put the orientation to 90/270 degree? When i try to switch to portrait mode the orientation chages but not to fullscreen.

Now we can only support rotate 270 degrees clockwise with full screen.
(We will fix the rotate 90 degrees clockwise but not full screen issue at next release.)

the step is :
1.  follow this POST "https://tinkerboarding.co.uk/forum/thread-574-post-2144.html#pid2144" to set ro.sf.hwrotation=270
2. $ adb shell "setprop persist.demo.hdmirotation portrait"
3. reboot the device

Hi Jamess,

Does this also work for rotation for touch input too or is there another setting in the prop file that is needed to do this?
Pages: 1 2 3