View Single Post
Posts: 14 | Thanked: 59 times | Joined on Oct 2017
#1
Hi all,

I'm writing a quick post to share some (hopefully) helpful information about a fix for a problem I've experienced with two different Xperia XA2 Ultras running Sailfish.

I bought two Xperia XA2 Ultras about 6 months ago (from two different sources) and installed Sailfish X on them. One of the devices had a problem where Android apps would not automatically rotate to landscape mode when turning the phone. Native Sailfish apps rotated correctly without any problems, but Android apps were stuck in portrait mode. Even manually setting Display/Orientation to Landscape did not work for Android apps. The other XA2 Ultra did NOT have this problem, which was quite strange since I used the same files and process to load Sailfish onto both devices.

I contacted Jolla support and after providing them some log files from the affected device, they sent me a fix that resolved the problem 100%. I haven't had any trouble with Android app rotation on that device since that fix was applied, even after updating the OS on it multiple times.

However, yesterday I updated both of the phones to Sailfish Rokua 3.3.0.16. To my surprise, immediately after the update, the OTHER phone that never had an Android app rotation problem suddenly stopped rotating Android apps! The original "problem phone" where I applied the fix was still working correctly, but now the phone that never had a problem in the first place had suddenty developed it after the update.

So, I applied the same fix Jolla sent me for the other phone, and it resolved the problem perfectly. Both phones now rotate properly between landscape and portrait when using Android apps.

I honestly don't know what the root cause is, why this fix works, or why the devices were affected at different times. Nevertheless, I assume that if this has happened to me twice on two different devices under two different OS versions, that it might be happening with someone else. So, I'm passing along the fix in case it helps others.

To resolve the problem:

1. Enable developer mode on your device and set a password
2. Open Terminal and run the following commands:

devel-su
lxc-attach -n aliendalvik -- /system/bin/sh
settings put system accelerometer_rotation 1
content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:1

3. Test Android app rotation and the problem should be resolved.
4. Disable developer mode, if you'd like.

If for some reason that did not resolve the problem, please also try this, which is an earlier suggestion that Jolla sent me before the above.

5. In Settings > Display > Orientation, choose Landscape.
6. Open an Android app. Check that it goes to Landscape. Close the app.
7. In Settings > Display > Orientation, choose Dynamic.
8.) Open the Android app. Confirm that it follows the device orientation (portrait-landscape-portrait-landscape...)

Hopefully this will be helpful to anyone running Sailfish on an Xperia XA2 Ultra (and perhaps other devices) that stop rotating Android apps correctly. Of course, it might just be a rare problem that is unique to my phones, and it's possible there could be other variations where this won't apply......but just in case, I thought it best to share this fix with everyone. Hope it helps!

Best wishes,

PK
 

The Following 7 Users Say Thank You to paulwk For This Useful Post: