Reply
Thread Tools
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:
Posts: 459 | Thanked: 669 times | Joined on Sep 2007 @ The DMV
#2
Thank you for this! The "android apps stuck on portrait" regression hit my Xperia XA2 after the update to 3.3.0.16. I followed steps 5-8 and all is working now.
 
Posts: 301 | Thanked: 531 times | Joined on Aug 2010 @ The Netherlands
#3
Thank you! It somehow did not work straightaway when I arrived at step 6. More precise: Aliendalvik Control /Settings did respond, but apps that were already open did not respond to landscape. However, after continuing step 7 and re-opening Whatsapp (step 8) all went well. Including the camera within Whatsapp. Great!
__________________
Palm Treo -> N900 -> N9 -> Jolla -> SailfishX -> XA2
Developer mode novice, and enjoying it
 
Posts: 14 | Thanked: 59 times | Joined on Oct 2017
#4
Well, amigos, after updating to SFOS 3.4.0.24 today, the Android rotation problem returned on one of my XA2 Ultras. The other identical model phone was not affected. Coincidentally, I also flashed a new standard XA2 phone directly to 3.4 with the latest download from Jolla store and it developed the Android rotation problem right out of the box. So strange and random! Unfortunately, the above fixes that were successful with previous SFOS versions are not working for me now with SFOS 3.4.

I eventually managed to find the following workaround, which works consistently but is not ideal:

1. Install the latest 9.3.1-1 Aliendalvik Control from Open Repos
2. Open Settings->Aliendalvik Control
3. Click Settings then Display and turn OFF Auto-rotate screen
4. Exit and reopen AlienDalvik Control.
5. Click Settings then Display and turn ON Auto-rotate screen
6. Stop Alien Dalvik in Settings->Android App Support
7. Launch an Android app and it will automatically restart Dalvik.
8. Confirm that rotation works properly in the Android app

I found that after powering off the device, the problem returns and the above steps 2-8 have to be taken again. I'd rather avoid Aliendalvik Control and repetition of steps after every reboot, but this was the only viable option that worked on both of my affected phones. If I manage to figure out a better, permanent fix, I'll post it here, but for now this is the best I have. Of course, if anyone else identifies a proper fix, please share. This problem doesn't seem to be very widespread in the community, but I hope the info is helpful to others.

Best Wishes,

PK
 

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

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:17.