yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
development builds for XZ2 and XZ2c variants

I am expanding a raster of devices with the images from Tama family. As mentioned above, XZ3 is

still missing mount points, hence its builds are not ready. However, as large fraction of the build if offloaded to the build servers, including generation of the images, it will be 'easy' to extend it to XZ3.

Currently, there are development builds for

- XZ2 single sim - release build is available as well and better use that

- XZ2 dual sim

- XZ2 compact single and dual

The images are available at https://thaodan.de/public/sailfishos/community/images/sony/tama/ (select appropriate device image, as based on its code https://developer.sony.com/develop/open-devices/get-started/supported-devices-and-functionality). Thanks to Thaodan for providing server space!

I have not tested those images as mine is from earlier days. In particular, I am looking for feedback regarding

- whether images work on any of the devices. They do share the same vbmeta (see flashing instructions) which maybe a wrong assumption of mine.

- whether dual sim support works on dual-sim devices

In short, if you flashed it, please do report back. Even if its just report all is OK.

Boot sequence is as follows:

- screen regarding unlocked bootloader

- SONY logo

- white brighter led while on SONY logo

- white dimmer led while on SONY logo

- blank screen

- Sailfish greeting

Please note these are development images. If all works as intended (boots and functionality is as for XZ2 single sim), we will make new release images. The difference is in over-the-air update support - this is available to release images only.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bartys:
Hi you did great job with this port. I installed it without problems and everything is working fine. Sailfish is beautiful and smooth but without android apps support i can't use it as daily driver.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Thanks! Yes, Android support is missing. For myself, I found that live without Android apps is fine. For banking apps, and that's all what I have to use once in a while, I use another device. But your mileage may vary.

Would you mind telling which device did you test it on and which build did you use?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] bartys:
I used build from github on xperia xz2 h8216
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
Thank you for your great effort in making things clear. :good:

I tried to flash XZ2 version. Naive maybe :)

Followed your request to upload the partition scheme for XZ3. You might check it out on GitHub. Just in case, my hardware is XZ3 4GB/64GB Dual Sim akatsuki 9436.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Thanks! Looks like mount points are the same as for other devices in Tama family. Now I will have to build AOSP and Sailfish components for XZ3. After that, images will be generated using CI and uploaded to the same server as development builds above. Give me couple of days and it will be ready for testing.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
New development builds are out covering all Tama variants. See https://xdaforums.com/showpost.php?p=81060529&postcount=6 for instructions.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
Ironically enough, after reflashing the right image files according to the instruction, the boot sequence for me is as follows:

- screen regarding unlocked bootloader

- SONY logo

- white brighter led while on SONY logo

- white dimmer led while on SONY logo

- no led while on SONY logo

- SONY LOGO for a lot of time

Stuck. What can be done for debugging such case on Sailfish?
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Thanks a lot for reporting. There are ways to debug it, just will require some patience. Looks like Sailfish as such boots, just it cannot start GUI for one or another reason.

First, let's see if we get lucky. Hold power button for some time. Led should turn red and device will shut down. Try to start again. Do you have the same issue or GUI starts?

If we are not lucky, let me check if recovery image is fine. For speeding up debugging - do you have Linux PC or something else?

Its late over here, I am off for tonight. Will be able to continue tomorrow evening.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] Guangd:
There is no Android app support

So can't I download any apps？:crying:
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
No, there is no Android support. It also doesn't support iOS apps, Windows apps, Playstation games, and programs compiled for VAX.

Yes, you can download apps written for Sailfish OS.

On constructive note: all devices that are not XZ2 single sim will have to be tested first with few commands to get access to Jolla Store. If you happen to have such device, get in touch with me and I will ask you to make these tests. You could open an issue at Github for it (Jolla Store access for HYYYY) or ask here.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] MartinX3:
What is needed to add the android support?

A bought license from sailfish?

Because on their website there is a payable version with android support for specific phones.

"Sailfish licensing customers choose if they wish to use, or not to use, the Android application compatibility part in the OS."
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
In practice, there are two ways to get Android support:

- get an officially supported device (xperia x, xa2, 10) and buy license. That will allow you to use their Aliendalvik software which provides Android support. Not perfect support, but works for decent amount of apps.

- develop open-source Android compatibility stack, for example Anbox. I don't know much about Anbox development, though. From the outsider perspective, such as mine, it looks rather slow.

At this moment, none will work on Xperia Tama. As mentioned earlier in the thread, look what you really need and, if it is missing, develop it. Obviously, it will not work for closed-protocols apps. But then you have to choose, whether to stay on Android, get dumb phone for few Android apps that you need, or ditch the closed-protocol apps. In some respect, trying to emulate Android on other platforms seems to me unproductive, but that's my personal opinion.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
[MENTION=7816594]ozamyatin[/MENTION]: we are starting to debug xz3 issue with ljo at TMO thread (http://talk.maemo.org/showthread.php?t=100877 ). I hope it will get resolved soon. Right now we have to get logs and then proceed from there
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
XZ3 dual/single and XZ2 dual released

XZ3 dual has been yesterday fixed together with ljo. Turned out that the touchscreen device had a different name and I forgot to adjust boot cmd line. I have uploaded XZ3 dual/single and XZ2 dual to the released images.

If you get any issues with Jolla Store access, please let me know

XZ2c is expected to be released in a week or so. Device has been ordered by one of Sailfish users and I think we will be able to finalize its release soon.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
XZ3 9436 Sailfish fully functional

Oh my God! Sailfish is fully functional now on my dual sim Xperia XZ3 9436 4/64 akatsuki (to the extend android with oem SW binaries v9 was, but with both SIM cards working since it is a dual sim build). That is wonderful and I cannot thank you enough, sir [MENTION=7078096]rinigus[/MENTION]! :) :good::victory: I am going to use it as my daily driver for a while and report any errors.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] math_green20:
I might give this a try next weekend. I have Xperia Xz2 dual sim
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
If you happen to try it, please check few things as well, as you maybe the first on XZ2 dual

1. Please check whether IMEI is detected correctly in Settings/About product

2. Whether correct IMEI (one of them) shows up when you run `ssu s` in terminal

3. As a response to `ssu s`, I expect that the command will list Device name as 'Xperia XZ2 (h8266 / h8266)' . Please check and tell if it is.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] math_green20:
I don't seem to have ssu command
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
should be there in terminal.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
XZ2c added

I have just released XZ2c images, under releases in https://github.com/sailfishos-sony-tama/main/releases

This work was made possible thanks to lots of testing and feedback by [MENTION=2813845]Apb[/MENTION] - thank you! We also fixed dual-sim support, so all dual-sim devices should work properly now.

Meanwhile, I fixed SELinux support that required compilation of AOSP9 bits. For those who have flashed already on XZ2 and XZ3, I recommend to download https://github.com/sailfishos-sony-t...elinux.tar.bz2 and unpack it at / of the device. It contains two files with SELinux policies that will later allow us to switch on SELinux as it is on official devices.

In future releases, flash images will include that fix. If you want to flash now XZ2 or XZ3, I recommend to use images from https://thaodan.de/public/sailfishos...ges/sony/tama/ (dated 3 Dec 2019, check before downloading). Those have SELinux fix as well.

Right now, SELInux is disabled as it mainly makes logs longer. However, this port should be able to follow official devices in this respect.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
3.2.1.20 release

3.2.1.20 released, available as OTA and images will be uploaded soon. See release notes at https://github.com/sailfishos-sony-tama/main/releases/tag/3.2.1.20-beta2

Few comments regarding the release:

Camera is not magically cured, that will have to wait for major update in kernel to 4.14. As Sony developers told me, it may require move to AOSP10 as a base. Issue is that in addition to the kernel, few other bits were updated. As a result, we may not be able to just bump the kernel version on our base. However, I will try to update kernel on AOSP9 at some point, probably in 2-3 months - depending on how fast kernel will stabilize on AOSP10. Just let's be aware that it may fail.

If AOSP10 base is needed, expect it to happen somewhere in summer 2020. As in 2019, Jolla gets bits ready for the next AOSP base around that time.

Other changes in release are mainly related to XZ2c and housekeeping.

Thanks to all helping with testing and suggestions!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
So much better than the original release, video acceleration seems to work better on XZ3. Youtube videos work. Online maps are less laggy and determine location faster.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Great to hear, although I am not sure what led to that change. BTW, do you have the issues with battery life as in https://github.com/sailfishos-sony-tama/main/issues/55 ? On XZ2 and, according to ApB, on XZ2c, we don't have such issues and battery life is OK.

PS: for me youtube videos worked from the beginning as well as Pure Maps (online and offline) were fast.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
The battery seems to drain faster than on android, but enough to sustain a day under normal usage with 16% at the end of the day and 4-5 hours screen time, both wifi and cellular usage. I have a lot of accounts connected - google, vk, facebook, telegram, they refresh every 30 min, 5-6 apps running in background, so I thought that such battery usage was to be expected, but now I doubt myself after reading the thread. Maybe it could be better.

Nonetheless IMHO it does not bother at all in comparison to lack of some apps like whatsapp.

Previously, I had problems playing youtube videos with resolution higher than 720p, and any kind of maps app would be very slow to determine location, even if they managed. But I havent tried Pure Maps, I will check it out, thanks!
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Re battery drain: I will be looking into wakeup sources with the hope to find some anomalies and improving battery life. But it seems we don't have some very fast discharge issue right now.

Re maps: Pure Maps is available at OpenRepos (there are reasons why it cannot go to Jolla Store, see TMO and/or TJC for background info). In general, I do recommend to enable OpenStore by allowing "Untrusted software" (in Settings) and installing Storeman. As soon as Storeman is on, you could search for Pure Maps, enable my repository, and install it. For offline maps support, install separate application for maps management and service on device - OSM Scout Server.

Re location: location is determined slowly usually at the beginning. As soon as you get the lock, its quite fast. Well, you could use Pure Maps perfectly as a navigator in real time.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Re battery consumption: [MENTION=7816594]ozamyatin[/MENTION] - as you used Android earlier, would you mind to compare battery usage by Sailfish port on Tama and Android? As I expect that your usage is similar on the both platforms, that would indicate how far we are off. I plan to work on battery consumption and would be good to know realistic target.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
Ok, now I have spent about a week on last stock android 9 and about a month on latest beta of sailfish. In order not to spend much time on posting and reviewing battery drain graphics, I can sum up my experience as follows. I had as much apps and accounts installed as possible both on sailfish and android with android having a lot more happening in the background (~30 more apps with push notifications enabled). 2-3 of my accounts in different social media receive thousands of notifications every day and make usage of intelligent notifications sorting in apps on android. That might have balanced the energy consumption. Upon beginning of tests I had most of the settings on android and sailfish set by default without any change. Screen autobrightness set to manual 50% all the time.

Conclusions:

1) Drain problem from other devices is not present on XZ3 Dual-Sim.

2) Having a lot of accounts logged in on sailfish affects your battery life severely when using default sync time (like every half hour) and syncing everything - contacts, mail, messages, newsfeed, mentions, replies on any social media platform available and not available out of the box (from Jolla built in store so to say).

3) Adding features and apps from a third-party Storeman App Store did not affect battery life significantly.

4) Sailfish may be not aimed at regular users that what to install something and use it without changing any settings at all.

To have decent battery life one has to understand what choices one makes when adding an account to sync. Default settings with most of the built in options and tons of accounts resulted in a pretty decent battery life lasting a one complete day without issues but not much screen time and a lot of unnecessary notifications. After customizing the according settings to my taste with a lot of accounts set to sync manually, Sailfish resulted in a bit less than 2 days battery life with 3-4 hours a day screentime. So, one concrete solid day of battery life is good and is in no way inferrior to android.

IMHO it would be a major improvement if the OS had a single setting for all the accounts apps to sync together at a desired period of time of 15 min, for example.

PS I have tried out pure maps and it is beautiful how snappy they are in comparison to what you can get from Jolla store. Thank you!

However, I still consider lack of some popular apps on Sailfish the major hindrance to switch-over. For example, launching whatsapp web is not possible on the device because of the obsolete build of fennec code used in built-in browser. Third party browsers (Webcat, Webpirate) seem to be somehow inferrior even to the built in browser. Either a modern and popular browser aiming at web apps support, or even paid android support for all sailfish ports would do the trick.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
[MENTION=7816594]ozamyatin[/MENTION]: thank you very much for this thorough analysis! Good to know that we have similar drain as it has been questioned. I just think we could be a bit better...

Re sync timing: in practice, Sailfish apps use the keepalive library to sync all their tasks. This makes it possible for apps/daemons to select from predefined intervals how frequently they want to be working and, on the wakeup of device, call all apps requesting it. So, in this respect, all accounts sync should be done correctly already. But its still all pulling of data (unless you choose IMAP persistent connection).

Re browser: I am working on getting Flatpak supported. That should help us with the browser as well, as we will be able to install software developed for generic Linux using recent libraries.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
Great to hear! Looking forward to trying out Firefox, Chromium and some native linux apps.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Well, those may have to wait a bit. Gtk apps don't work as we have rather old Wayland, so its mainly new browsers developed on the basis of Qt/QML 5.12 or higher.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
Are we talking about Falkon browser then, for example? Still a great alternative to stock...
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Falkon or, better suited for mobile, Angelfish. The latter we can help to develop as well. They both use QtWebengine so rendering is as for Chromium. Tama series have Flatpak support already, you just have to run zypper ref && zypper up as root and you'll get libhybris that is compatible with Flatpaks. But there is some development to be done before it will be reasonably usable by end users.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
3.3.0.16 release

3.3.0.16 is released. See release notes at https://github.com/sailfishos-sony-tama/main/releases/tag/3.3.0.16

While OTA can be done now, images will be uploaded tomorrow and attache them to the release, as done with the earlier ones.

Note that I have tested OTA only. While testing has been limited, I have not observed any degradation in functionality.

Highlights of 3.3.0.16 is updated gcc used for app development and better support for Flatpaks. While gcc impact is just starting through use of newer libs by app developers, Flatpak-induced changes allow to run multiple Flatpak applications at the same time. In 3.2.x.x we were limited to a single window due to a Lipstick bug that got fixed in 3.3.0.16.

Port-specific changes are mainly based on following the changes in official Xperia 10 port, bringing updates by Sony AOSP team into kernel. See release notes for specifics.

As always, the ones that wish to be on the safe side, wait for others to update and listen for incoming issues.

For issues, use Github at https://github.com/sailfishos-sony-tama/main/issues and discuss them at TMO or XDA
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
macOS Catalina script flashing procedure

Flashing script for linux works from macOS, too. Terminal commands to make it work:

1) This installs Homebrew on your Mac

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

2) This installs necessary component to fetch adb tools

brew tap homebrew/cask

3) Use the cask tool to fetch adb&fastboot to /usr/local/Caskroom/android-platform-tools/30.0.0/platform-tools

brew cask install android-platform-tools

4) Copy the contents of the following downloaded zips to your new platform-tools folder:

with SailfishOS from ringus Github page https://github.com/sailfishos-sony-tama/main/releases/download/3.3.0.16/Sailfish_OS-testing-20200512-3.3.0.16-h9436-0.2.0.2.zip ,

SW binaries 9.0 (Tama) from Sony DevWorld site https://developer.sony.com/file/download/software-binaries-for-aosp-pie-android-9-0-kernel-4-9-tama

vbmeta from this post or this link https://github.com/sailfishos-sony-tama/main/releases/download/3.2.0.12-alpha1/vbmeta.zip

5) This sets path to your platform-tools folder for the script to work

export PATH="/usr/local/Caskroom/android-platform-tools/30.0.0/platform-tools":$PATH

6) Finally, connect the device in fastboot mode and run the script

/usr/local/Caskroom/android-platform-tools/30.0.0/platform-tools/flash.sh
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Sensors

Host of sensors just got supported on Sony Xperia Tama devices. All you have to do, is to run

zypper ref

zypper up

as root. I am not going to make separate images with it, just use OTA as described above.

Added sensors are:

- fixed compass using geo rotation vector provided by Android layer

- pressure

- step counter

- pickup gesture

See https://github.com/sailfishos-sony-tama/main#tips on how to enable/use step counter and pickup gesture.
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] rinigus:
Fingerprint

Under initiative and drive of [MENTION=455718]PiggZ[/MENTION], we managed to add fingerprint support for community devices.

For Sony Tama, instructions are at https://github.com/sailfishos-sony-tama/main#fingerprint-support .

For brave ones, try to reproduce issue https://github.com/piggz/sailfish-fpd-community/issues/10
[Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other] ozamyatin:
Angelfish and Telegram working fine on XZ3 Tama via Flatpak

I am more and more convinced that Flatpak should be the future of Linux. Flatpak support on Tama is amazing and relatively easy to use for users experienced in Linux. However, I agree with your statement about end-users, I cannot imagine how one might possibly get around all the tips and tricks if one has not read https://github.com/sailfishos-flatpak/main carefully.

Angelfish browser installs out of the box just fine (looked through the thread http://talk.maemo.org/showthread.php?t=100909)

The dpi scaling seems to be fine with the settings you provided for XZ2 (3x with 120 dpi) on github :good:

BTW, did you know that you could offload page rendering to cloud servers and save battery during web surfing as well as improve privacy? One of the examples that work with Angelfish on XZ3 is webgap.me. It is a webpage with a browser run on a remote server that provides the same javascript performance as Angelfish on XZ3 itself. The score of Webgap is 8500 points vs 9500 points native Angelfish.

I am wondering if we could launch Puffin browser that is using much faster servers to make our device triple the web surfing performance (Puffin scores 30000-40000 in Google Octane which is much more like my desktop in terms of performance). Puffin is available on arm devices like Raspberry Pi3/4 right now but does not have any Flatpak versions.

Telegram is also working fine out of the box with the variable you provided: QT_QPA_PLATFORM=wayland without any other changes to dpi.