Sony Nagara (Xperia 1IV and 5IV) port

This is a thread for announcements and discussion regarding the new Sailfish port to Sony Xperia 1 IV and 5 IV (Nagara platform).

Status at the moment of writing:

  • daily driver for one of the port developers
  • has to be built from sources
  • up to date status in Github, see links below

There are two bases that can be used by ports for Sony devices. Traditionally, Sony’s AOSP has been used with corresponding blobs by official Jolla Sony ports as well as unofficial Sony Tama (XZ2, XZ2c, XZ3) port. For a while, Lineage has been basing its ROM on Sony’s stock Android - the version that is used when you buy a new device. Stock Android uses different blobs that seem to be of better quality in terms of hardware support, hence Lineage’s choice.

This SFOS port used the AOSP base like other Sony ports before. However, it quickly became clear that AOSP was in very bad shape for these devices, so we decided to switch to stock-based Lineage. Except, there is no official Lineage for Nagara. So, we ported Lineage 21 (Android 14) to Nagara first. The Lineage port is not released (yet), but can be compiled using our docs.

As stock Android has many updated interfaces, such as the use of AIDL for VoLTE, this port is associated with several new developments for SFOS in general:

  • Camera required extra package handling on the Android side. Developed in parallel with @mal and is now using the official implementation by @mal as in C2
  • Addition of a new service for qcrilNrd init to enable receiving SMS
  • Development of an open-source VoLTE plugin for AIDL. Allows calls, swapping calls between on hold/active states, sending/receiving SMS, fixed several bugs that are in the open-source HIDL VoLTE plugin
  • Addition of Bluetooth monitoring to ensure that BT headsets can be used for calls
  • Handling of keystore initialization to make sure it is usable

Current plans are mainly fixing a few annoying remaining bugs (see links below) and then preparing for release. The latter would require full packaging of Lineage 21 including revision of all imported blobs and only after that, full SFOS release. For those interested in building and testing, the port wiki contains instructions on how to build Lineage and SFOS.

Port developers: @rinigus and @vlagged

Links:

64 Likes

Wow Rinigus,

This is a huge acheivement, and amazing to see. We’ll all benefit from a lot of this work I feel.

Thanks so much.

4 Likes

Well I couldn’t get more excited about this announcement! While I was indeed full speed into booting sailfish on 5 IV when rinigus picked up the platform and we were trying Sony AOSP, after a while life took a turn so I couldn’t do other than basically follow the development.

Meanwhile rinigus figured out that there was no AOSP branch and blob in sight that would fix the problems we had (think Xperia 10 marks 4 and 5 like, but worse). So he started to figure out how to build his own Lineage ROM!!

Needless to say, all the points listed above as needing development for this Sony, that are now figured out, will benefit the whole porting community. I am already receiving SMSs on my zenfone thanks to these advancements :wink:

25 Likes

Fantastic work from both of you, especially all the new custom parts you had to develop!

7 Likes

F’reals this feels like light at the end of the tunnel for all devices.

2 Likes

Ran a GSM Arena comparison between X1IV, X5IV and X10III

Wow, X10III looks like a kids toy next to these. Seems like these X1s are devices worth working on!

5 Likes

Best news ever. Probably.

2 Likes

Holy crap this sounds fantastic. The 5iV looks like a really great device. Have I missed anything or is the only issue that up to now just one back camera is working. If so, which camera works and how good are the chances to have the others working soon (real world soon, not Jolla soon :winking_face_with_tongue:)?

1 Like

This is really great news. I know what to ask Santa for this year.

2 Likes

for the 5mk4: the only model supported is xq-cq54, right? would the others work?

would the japanese versions (sim+esim) work?

would 2sim version (cq72) work?

what about esim on SFOS?

2 Likes

Oh and can you say how battery life is? Any problems coming through a busy day?

1 Like

How about waydroid? Stable working.

2 Likes

No, there are other issues as well. We use issues to keep track. I suggest to take a look there.

As for timing - no comments. I haven’t bugged mal regarding that recently. I think he had some changes that may help us too.

I think that is the model @vlagged is using. Very hard to promise if it will work with cq72. With AOSP I know that japanese models were not supported for Tama. I would avoid them just in case, until someone would try and report that they work.

Xperia 1IV/5IV are “famous” for getting warmer than some other devices. I could observe that browsing does hit battery life more than I would have expected. But currently, 1 or 2 days for me is not a problem (1 for sure). Now how busy is my busy compared to your busy, I don’t know.

Not working. Tried by @vlagged some time ago, but it didn’t work then.

7 Likes

Waydroid is not working most probably because the vndk version of the base android is newer (in approximate terms, the latest Waydroid Lineage 20 doesn’t know how to “talk” to Lineage 21 vendor services). In this respect, App Support has the edge as it is already running on A14 I think.

As soon as waydroid patches are rebased / applied and built for Lineage 21 we will surely make this work.

I do not daily drive the 5IV now, but I did use it with a SIM as a second-phone. Except for the bluetooth power consumption bug #38, it was definitely 1 or even 2 days of usage. That bug has some pretty chance of having been fixed by rinigus by now, I need to re-take the tests.

I currently used it lightly and it sat at home, under Wifi - where it manages almost 7 days of uptime.

Will re-take the tests on the road as soon as I get the chance.

13 Likes

Ordered one 5 IV if only for the test. Not sure if I can help, but I can try. :slight_smile:

6 Likes

If this isn’t some absolutely some fantastic new! It was just over a week ago I posted on XDA and Reddit xperia/5iv forums if LOS was possible in any form, as nothing had been done for it. I still use it daily and adequate for my needs imo still a relative power house.
After many days, I was pointed to this effort and made me super excited. Just wish I had a spare CQ54 to test on. I’m not a developer in any form but have rooted since the HTC desire days. The developers absolutely rock!

1 Like

It would be great to see a similar effort for Xperia 10 iii :smile:

5 Likes

Indeed, as it seems the only way to get the standby power drain bug fixed.

The question it begs is why not do it this way for all Sony phones (10IV, 10V etc).

What does AOSP offer, especially given that Sony doesn’t seem to start the AOSP effort until months after the phones release. Perhaps using the standard binaries would allow the porting to begin on pre-release phones.

(Everyone who has a Sony phone has paid a license for all the software therein)

because it is not as trivial as some may think it is

I think from previous community meetings the key reason for sticking with Sony Open Devices/AOSP is the ability to legally distribute the binaries/blobs, or something along those lines.

2 Likes