maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Sailfish OS on Sony Xperia Tama devices (XZ2, XZ2c, XZ3) (https://talk.maemo.org/showthread.php?t=100877)

rinigus 2019-11-24 09:38

Sailfish OS on Sony Xperia Tama devices (XZ2, XZ2c, XZ3)
 
I am happy to announce a port of Sailfish OS to Sony Xperia XZ2. It is expected that this port would allow us to add support to XZ2 compact and XZ3 in a rather simple manner. As I have a single-sim device, that's the model its ported to first. To cover all six devices in Tama family, I may need some assistance from the owners. Please open an issue in the project's main repo to discuss specific model and what's needed to make it possible.

As this announcement is made at TMO and XDA, I will keep it short and avoid repetition.

Current features, state, download links: https://github.com/sailfishos-sony-t...ster/README.md

The port was made possible thanks to the help from Sailfish porters (mal, piggz, deathmist, Mister_Magister,*vknecht, spiiroin) as well as Sony AOSP community (MartinX3, jerpelea, oshmoun,*Marijn,*kholk). And I suspect that I forgot someone, as very many contributed. Thank you very much!

I will be following on XDA and TMO. Please file issues centrally, at Github.

Edit: support is extended to cover full platform: single and dual-sim, XZ2, XZ2c, XZ3

rinigus 2019-11-24 10:21

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Regarding current camera state:

Sailfish camera is reproducing AOSP9 camera behavior. Camera in AOSP9 is rather poor with kernel 4.9 series. In particular,

* Focus is slow and looks like unpredictable. So, to get sharp photo you need some luck and try several times

* Flash is out of sync with image taking. Frequently, flash is on while focussing and is off while taking photo.

As a result, to take photo, you need good light and time to make several shots.

There is a new version of blobs that promises better photos on Linux 4.14. Officially, it will be supported only with AOSP10. Maybe I can update kernels to 4.14 and use it with AOSP9, but its currently unknown. If that will fail, we will need to move the port to the new base - AOSP10.

At this moment, there are no AOSP10 stable releases and no stable Linux kernel 4.14 either. So, it will take time before we will be able even to test whether it will work for us.

So, I suggest to expect rather bad camera performance when making decision to join this port. If we manage to pull off camera update, consider it as a bonus. But don't count on it.

rinigus 2019-11-30 10:44

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
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...ges/sony/tama/ (select appropriate device image, as based on its code https://developer.sony.com/develop/o...-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.

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.

rinigus 2019-12-03 16:31

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Builds have been extended to cover XZ3 (single sim/dual sim) as well. If you happen to try those, please report back

ljo 2019-12-03 19:25

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Quote:

Originally Posted by rinigus (Post 1562954)
Builds have been extended to cover XZ3 (single sim/dual sim) as well. If you happen to try those, please report back

@rinigus Thanks, I will get an XZ3 device then and report back. Let us hope it arrives before my travel next week.

rinigus 2019-12-03 20:34

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@ljo - great! while I don't have XZ3 myself, I am sure we can make it work. If there are issues with booting or flashing, just report them either here or github and we will look into it. For me, XZ2 is working great with SFOS.

As far as I can see on Sony devs channel, they work now on Android10 and Linux 4.14 support which promises to fix many camera issues. How well exactly, is hard to tell, but all posted photos do look better on new software stack. For SFOS, I will try first to get Linux 4.14 on AOSP9-based build, the current one. If we fail with it, we will have to move to AOSP10 in future. As for timeline, don't expect it soon. Probably it will take few month for Sony devs to stabilize all and, after that, we can work on it.

rinigus 2019-12-04 07:17

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@ljo: I've got a report from one XZ3 user which got boot stuck on Sony logo (see XDA thread). From the description it sounds like device booted (According to LEDs), but graphics refused to start. Which means that we will probably need to debug it a bit before we make it work. Let me know when you get your device and time to hack around it. I am sure its a small issue and we will find the solution to it.

ljo 2019-12-04 07:24

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus Thanks for the heads up. I will get my device tomorrow, so I will check if I see the same behaviour to start with. And then we can take it from there.

rinigus 2019-12-04 08:29

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@ljo: just don't forget to

* make all updates on stock first. As there is no Android 10 yet for Tama devices, as far as I know, you are free to accept all updates.

* check on stock that all works. Take time to do so. Otherwise you may have issues with warranty

* unlock and loose your stock camera.

* either start with Sailfish or AOSP flashing. AOSP will give you preview of what to expect on SFOS.

Depending on how it will go with SFOS, we may need to check some things on AOSP as well (hopefully not and we can do it simpler).

ljo 2019-12-06 07:18

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus After 14 large android updates that took several hours including to check functionality, I am now ready for unlock step. Unfortunately work calls, so need to continue tonight. I keep you posted then.

rinigus 2019-12-06 07:32

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Sounds great! I checked last night that the recovery image works - the one generated by CI, so we are ready for testing/fixing if needed.

When checking functionality: please check compass. On XZ2, when in SFOS, I have very fast updates and they don't seem to be very correct. As I forgot to check it on stock and AOSP, its a chance to hear what is an expected behavior.

ljo 2019-12-06 20:28

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus The compass seems to be quite reliable on XZ3, at least after quick calibration in one of the two compass apps I tried.

On boot after flashing img it goes:
SONY logo
white led on SONY logo
white led turns off stays on the SONY logo,
so no white dimmed light and no blank screen.
Seems to confirm the previous report.

What should I now try in order to get more info for you?

rinigus 2019-12-06 21:52

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
I presume you use Linux as a PC, correct me if I am wrong. If you are Windows/Mac user, we will have to improvise.

I think phone does boot into full OS, with a tiny absence of GUI. So, let's try to get the logs.

- Boot it as you did. After led will be off, wait a bit to be sure that init has finished, and shut it down by pressing and holding power button. I expect that the led will become red and, if it does, release power button and let it shutdown normally.

- Get into fastboot mode as you were when flashing. Now, let's get into recovery. For that, run

fastboot boot hybris-recovery.img

in the folder with unzipped SFOS images (it should contain hybris-recovery.img). After the command, device will show that message regarding unlocked bootloader, then will go blank and after a bit of time (maybe upto minute), boot into recovery. Do not unplug USB, keep it connected to PC.

In recovery, it should show on the screen, in really small letters for you, that rndis connection is available. I would expect that it allocates itself address 10.42.66.66

On your PC, you should see some messages in dmesg regarding new network card. On my PC, I have to assign network address in this case by running as root:

ifconfig enp0s29f7u6 10.42.66.65 netmask 255.255.255.0

(enp0s29f7u6 is a network card from dmesg, keep an eye if its renaming it from ethX to something like I have; use the last name).
If all is fine up to here, you would be able to login into recovery by running on your PC

telnet 10.42.66.66

(address as in phone screen, that one is expected).

If telnet works, you will be greeted with a menu. Choose to go into the shell and, surprise, reluctantly accept breaking the warranty. Assuming that my log scripts worked, you will find all kind of logs under /rootfs/root (/rootfs should be a root partition mounted on recovery). We are mainly interested in ones with .shutdown. in them. Let's start with journal one.

How to get it over to me, that's a question. One option is to capture full telnet session by using "script" command on your PC (run telnet unser script). Its probably the simplest way and then just cat all the logs we are interested in.

Logs send me by email, just in case. In particular, we don't want to have your private IMEI numbers to be put out online. I presume you have my mail. If not, check out authors in pure maps repo.

I hope that it all works as I described and we don't have other surprises.

Good luck!

ljo 2019-12-06 22:54

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus Thanks, I already went through the dmesg logs when you anwered , so I sent you two versions of the journal.shutdown.log you wanted to start with by mail.

Could it be
Code:

library "libhdr_tm.so" not found
that makes lipstick fail to start or do you have that on other devices too?

Cheers,
ljo

rinigus 2019-12-07 05:44

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
It looks like error with finding touch device:

Code:

Sailfish lipstick[4615]: [C] unknown:0 - evdevtouch: Cannot open input device /dev/touchscreen (No such file or directory)
(wrong date is expected at start of the boot; also before setting it up for the first time)

to fix, we will replace /dev/touchscreen in

/var/lib/environment/compositor/droid-hal-device.conf

(online version https://github.com/sailfishos-sony-t...al-device.conf) with some /dev/input/event device. Question is which.

Earlier it used to be /dev/input/event3 , we can try with that. If it fails, we will find the correct one.

To change the device, please go in via recovery, as you did before for logs. Then just go to /rootfs and down to that file to edit it (vi is available).

PS: 'library "libhdr_tm.so" not found' is OK, its the same on xz2

rinigus 2019-12-07 06:50

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@ljo: you can find touch device in recovery. Boot into recovery, telnet into it, and then check what input devices do you have in /dev/input/

Code:

# ls -l /dev/input/
crw-rw----    1 root    root      13,  64 Jan  1 00:00 event0
crw-rw----    1 root    root      13,  65 Jan  1 00:00 event1
crw-rw----    1 root    root      13,  66 Jan  1 00:00 event2
crw-rw----    1 root    root      13,  67 Jan  1 00:00 event3
crw-rw----    1 root    root      13,  63 Jan  1 00:00 mice

Now go through event* ones by cat'ing them:

Code:

cat /dev/input/event3
While in cat, touch your screen (swipe or tap). If its correct device, it will produce noise chars on the terminal. Note that you maybe not able to Ctrl-C out of cat stream. Use Ctrl-Z and "kill %1" to get rid of it.

As soon as you know device, change it as explained in my prev post and boot into full SFOS.

Later, we will have to find a rule for XZ3 that we will add to https://github.com/sailfishos-sony-t...chscreen.rules

ljo 2019-12-07 09:38

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus It was fore sure /dev/input/event3 from my list:
Code:

/ # ls -l /dev/input/
crw-rw----    1 root    root      13,  64 Jan  1  1970 event0
crw-rw----    1 root    root      13,  65 Jan  1  1970 event1
crw-rw----    1 root    root      13,  66 Jan  1  1970 event2
crw-rw----    1 root    root      13,  67 Mar  1 08:18 event3
crw-rw----    1 root    root      13,  68 Mar  1 08:19 event4
crw-rw----    1 root    root      13,  63 Jan  1  1970 mice

I will find out the udev rule to add.

On boot it now went well with setup until the Jolla account screen where Internet connection, since I use my simcard in my xa2, says wifi is inactivated and pressing activate gives no visible action. So I assume there is a log entry to find for this too.

rinigus 2019-12-07 09:47

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Excellent!

For event3, run

Code:

udevadm info -q all -a /dev/input/event3
See example output for me at https://github.com/sailfishos-sony-t...ment-562822285

As for WiFi, try to shutdown phone and then start again. Maybe its a first boot glitch.

Note that we don't have yet Jolla Store access for your model. Before getting that, few tests need to be done. Then we can ask for access

PS: udevadm we will do AFTER all is running. Let's get this Wifi ready first. Then its easier to grab all outputs and configs

Korkkiruuvi 2019-12-07 10:52

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Finally we have decent phone that running sailfish, brilliant @rinigus. Just mentioning that I'm planing to jump xperia xz3 and install sailfish on it.

ljo 2019-12-07 10:58

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus The name attribute should be ATTRS{name}=="touch_dev".

The wifi is definitely not a first start glitch. Tried several times now. I finished the setup without wifi.
* NFC was on in Settings > Connection > NFC.
* In Settings > Information > About product, no mac for bt in addition to wifi. No imei shown.

OK. So let us get on with the wifi issue.

rinigus 2019-12-07 11:03

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
OK, absence of IMEI, Wifi, and BT is maybe due to the cutting of the corners that we did with images. At least that's my suspicion. Please send the logs and I compare those with mine.

rinigus 2019-12-07 11:10

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@ljo: for full logs, it maybe good to get journal and logcat as well.

Easiest is to boot phone, try to enable Wifi, and shut it down (all in relatively short time, ~2-3 min)

Then boot again and get the .shutdown. logs from /root

ljo 2019-12-07 12:24

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus I sent you the .shutdown. logs for only pressing the activate wifi a few times by email.

rinigus 2019-12-07 13:02

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@ljo, it does look somewhat unhappy, that xz3. Let's try to stick to the rules and build it against its own HAL. At present, akari version is preferred, as shown in https://build.merproject.org/project...l:hw:sony:tama . I'll make a change in devel project and we will test with the build based on that. Not sure that's the solution though.

rinigus 2019-12-07 13:07

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
I presume it's h8416 / akatsuki / XZ3 single sim

ljo 2019-12-07 13:15

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, thanks, it does. But I am happier than it that we are making progress. So let us see what your changes to the devel project bring for next test.

ljo 2019-12-07 13:18

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Quote:

Originally Posted by rinigus (Post 1563107)
I presume it's h8416 / akatsuki / XZ3 single sim

@rinigus Nope, it is a H9436

rinigus 2019-12-07 13:22

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
We do make progress. Just saw in the log that the kernel boot options correspond to akari - maybe its a hint :) . so, new rebuild is going on

ljo 2019-12-07 13:36

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, might be a clue, yes. :) Will test as soon as it is ready
Btw, have been going to ask if you needed storage for a long time. So when I saw thaodan is providing now. I should not wait, so let me know when ...

rinigus 2019-12-07 14:00

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
And one more rebuild is needed - akari was specified for all boot images :( . Please wait

ljo 2019-12-07 14:16

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, Ok. Waiting for the new one. Flashing just finished of the 13:55 build.

rinigus 2019-12-07 14:58

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
New image is ready, please download and flash that.

It has touchscreen event device rule added, so that should work out of the box. We still have a bit of corner cutting in there - some parts are based on single sim XZ3 variant. Let's see if it works.

I'd be happy to get new logs. That way I can compare with the earlier ones and see what changed. Also should confirm the command line for kernel.

As Thaodan was already hosting some images and works on porting, he did provide storage as soon as I hit the issue on CI of gitlab. Our images are bigger than usual ports (they contain aosp as well).

BTW, notice that root partition is larger than on X/XA2/10. :) We can change that size in future, if needed. Although, price is a reflash for most users.

ljo 2019-12-07 15:07

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, downloading is soon done. The udev rule is already confirmed with last build.
Will let you know when boot is done and I will send new logs after that.
For now that reflash for changed space allocations is cheap.

ljo 2019-12-07 15:52

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, I sent you the shutdown logs after successful boot and setup.
* wifi, ok
* BT, ok
* Jolla account work
* Install from Jolla store works
* Compass is roughly 66 degrees off compared to Andoid 9. And calibration seems not to help.
* Camera, ok

If you find something in the logs or if there is something I should check immediately just let me know.

rinigus 2019-12-07 16:05

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Excellent news, thanks!

I am surprised that Jolla Store works. To be sure that we don't get cut off for some reason, please check:

- do you see both IMEIs in Settings/About? This should work without SIM cards. Check that they are the same as on the package sticker or as in Android

- please check whether you see same IMEI as a result of

Code:

ssu s
Run that as normal user, please. If all is OK, I will need a record as shown under 'Device model'. For me, its 'Xperia XZ2 (h8216 / h8216)'

With all these tests passing, I can request official registration for Jolla Store and ensure that we are recorded.


Next, I am going to make new builds with the same 'corner cutting' as before. I wonder if our issues were fixed by kernel command line in practice. So, keep the current image, just in case, and please test a new one to be sure where we stand. If, indeed, I need to avoid this co-building, I will have to setup separate OBS project for different devices.

Finally, with all the tests done, I will make an image not in devel but in 'testing' which you could use as a primary device that is expected to be supported with OTAs as well. So, one more flashing. Later should be just a regular update between SFOS releases, as done for ports.

ljo 2019-12-07 16:34

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, it is excellent indeed.
Continued list:
* both IMEIs (correct) are shown under Settings > Information > About
* ssu s gives UID equals first IMEI correctly too
* ssu s gives device model: "Xperia XZ3 (h9436 / h9436)"
* GPS is quite quick with and without support
So seems good to go for official registration.

And I am ready for testing next builds as outlined. :)

rinigus 2019-12-07 17:10

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Quote:

Originally Posted by ljo (Post 1563119)
@rinigus, it is excellent indeed.
Continued list:
* both IMEIs (correct) are shown under Settings > Information > About
* ssu s gives UID equals first IMEI correctly too
* ssu s gives device model: "Xperia XZ3 (h9436 / h9436)"
* GPS is quite quick with and without support
So seems good to go for official registration.

And I am ready for testing next builds as outlined. :)

Nice! New devel build is ready, using an old approach, just with corrected kernel cmdline and added touch support. Fingers crossed on my side, but let's see. Its not a major issue to organize separate builds either.

I'll let pketo know regarding store registration

ljo 2019-12-07 17:35

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Quote:

Originally Posted by rinigus (Post 1563121)
Nice! New devel build is ready, using an old approach, just with corrected kernel cmdline and added touch support.
Fingers crossed on my side, but let's see. Its not a major issue to organize separate builds either.

Yay! No need with separate builds, it works as before with only the config changes+udev of build 9.

Quote:

Originally Posted by rinigus (Post 1563121)
I'll let pketo know regarding store registration

Great! I appreciate that.


What new sizes were you thing about with the parttions?

rinigus 2019-12-07 17:42

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
Quote:

Originally Posted by ljo (Post 1563122)
Yay! No need with separate builds, it works as before with only the config changes+udev of build 9.



Great! I appreciate that.


What new sizes were you thing about with the parttions?

Awesome! Then I start preparing as is.

As for partitions, they are resized already. root is ~4GB, rest is /home. During updates, to my knowledge, all is downloaded to /home first and then installed. So, it seems to be a waste to put too much to /. But I did increase it from original 2.5GB

Check Settings/Storage for sizes.

ljo 2019-12-07 18:47

Re: Sailfish OS on Sony Xperia Tama devices (XZ2, ...)
 
@rinigus, yes, you are right about the sizes - they are already changed here. 4 GB is definitely better than 2,5 GB which was way too little. I had to remove quite a lot in root partition for every update the last years. For some of the version 3 releases it required almost 700 MB free in root partition, so even if downloaded in home it could get hard to fit with OTA (does the method differ between device types?). I would argue 4 GB is the minimum.


All times are GMT. The time now is 05:19.

vBulletin® Version 3.8.8