• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

LineageOS 17.1 for Xperia Z2

Search This thread

NeoArian

Recognized Developer
Nov 25, 2017
1,272
2,906
Sony Xperia Z2
Sony Xperia Z3 Compact
Thank you, I had no issues installing this and followed the install instructions in the first post.

Its been like six years since I've done this before and was wondering if I now need to install anything else like a kernel or SuperSU / Magisk? I've come straight from the Z2 stock rom and unlocked the bootloader then installed LineageOS & openGapps. I'm sure that I'm only halfway there.
I guess the availability of custom kernels for this device is, well, limited. You don't need to install magisk or other root methods if you don't need them explicitly.
 

NeoArian

Recognized Developer
Nov 25, 2017
1,272
2,906
Sony Xperia Z2
Sony Xperia Z3 Compact
Good Morning everyone!
I have built a new update for sirius!
Download: https://sourceforge.net/projects/ep...1/lineage-18.1-20210710-UNOFFICIAL-sirius.zip
Recommended recovery: https://sourceforge.net/projects/ephedraceae/files/sirius/lineage-18.1-20210710-RECOVERY-sirius.img

Changelog:
* Fixed regional WiFi issues
* Fixed offline charging (previously the backlight didn't turn off)
* Hopefully fixed modem on D6502
* A lot of lineage changes, including juny 2021 security patch

I plan on shipping official builds of lineage-18.1 for this device as soon as possible, but it would be awesome to get feedback from a D6502 user wether modem works on this build. To test it please use the recommended recovery and do not mount system manually in recovery. Just flash the zip in lineage recovery and report back.

Greetings, Arian.
 

cartio

New member
Feb 6, 2013
1
0
Good Morning everyone!
I have built a new update for sirius!
Download: https://sourceforge.net/projects/ep...1/lineage-18.1-20210710-UNOFFICIAL-sirius.zip
Recommended recovery: https://sourceforge.net/projects/ephedraceae/files/sirius/lineage-18.1-20210710-RECOVERY-sirius.img

Changelog:
* Fixed regional WiFi issues
* Fixed offline charging (previously the backlight didn't turn off)
* Hopefully fixed modem on D6502
* A lot of lineage changes, including juny 2021 security patch

I plan on shipping official builds of lineage-18.1 for this device as soon as possible, but it would be awesome to get feedback from a D6502 user wether modem works on this build. To test it please use the recommended recovery and do not mount system manually in recovery. Just flash the zip in lineage recovery and report back.

Greetings, Arian.
modem not work on D6502

exist baseband didnt help
 

NeoArian

Recognized Developer
Nov 25, 2017
1,272
2,906
Sony Xperia Z2
Sony Xperia Z3 Compact
modem not work on D6502

exist baseband didnt help
Did you install the ROM with the recommended recovery and have you not mounted system before installation?
In case you are sure that's the case, can you open a shell with root access on your device (while the system is booted) and send me the output of these commands please?
Code:
# strings /dev/block/bootdevice/by-name/LTALabel | grep MODEL
# sha1sum /vendor/firmware/m*

Additional to this it would be nice if you can grab adb logcat while the device boots up (type "adb logcat > log.txt" in a shell on your computer, hold the power button pressed on your device for 3 seconds and plug your device into the computer and unplug it when it has booted).
 

Y-per25

New member
Jul 16, 2021
2
0
Hi
Using lineage-18.1-20210710 couple of days and never use custom roms for this device before
First of all, I have to thanks @NeoArian for this amazing build. It's so good to see z2 is still alive :cool:

All the basic functions work fine, except for a few defects that we should expect them from Lineage OS and not this one! For example:
-Notification badge number replaced with simple dots.
-Drawer apps list only sorted by name and can't sort by any different order. and other annoying stuff

For minor overheating I selected battery performance profile to Efficiency mode that makes cooler with no noticeable performance loss

Hope to this build goes official soon and get the rid of "this build was signed with public keys" message ;)
If I found any bug, I'll report here
 

Samir2298

Senior Member
Apr 3, 2015
210
20
Thanks for supporting our device. I hope it gets the "Official" label soon.

The only thing pushing me back from installing it is the previously bad experience I had on AOSP roms. They always heated up the device way more compared to the stock ROM. I want to ask is that the case too with this one?
 

Creeper123

Member
Apr 23, 2015
16
2
Canada
Sony Xperia Z2
To test it please use the recommended recovery and do not mount system manually in recovery. Just flash the zip in lineage recovery and report back.

Would flashing this recovery followed by the new build cause any problems with the data partition? Do I need to clear it? Can I still continue using the TWRP that you gave here?

I currently use this phone, with an older build of your custom ROM (which has a few bugs but nothing which makes it unusable), as a daily driver, so I just want to be sure.

Best regards.
 
Hello, I wanted to say thanks for the ROM! I'm currently on day 1 of saying good bye to the stock 6.0.1 Sony ROM and tasting some LOS goodness on this old Z2.

Thanks again!
------------------------
UPDATE: the ROM works very well except for GPS. I'm not sure if it's just my phone, but apps don't seem to even try to get GPS signal, judging by the location icon not staying for longer than a few seconds on the status bar.
Yes, I've explicitly granted location access to the apps I've tested, and none can get a GPS lock.
For the record, I've disabled google's location services and scanning features.
 
Last edited:
  • Like
Reactions: Creeper123

Dred65

Member
Jan 24, 2020
29
1
Good Morning everyone!
I have built a new update for sirius!
Download: https://sourceforge.net/projects/ep...1/lineage-18.1-20210710-UNOFFICIAL-sirius.zip
Recommended recovery: https://sourceforge.net/projects/ephedraceae/files/sirius/lineage-18.1-20210710-RECOVERY-sirius.img

Changelog:
* Fixed regional WiFi issues
* Fixed offline charging (previously the backlight didn't turn off)
* Hopefully fixed modem on D6502
* A lot of lineage changes, including juny 2021 security patch

I plan on shipping official builds of lineage-18.1 for this device as soon as possible, but it would be awesome to get feedback from a D6502 user wether modem works on this build. To test it please use the recommended recovery and do not mount system manually in recovery. Just flash the zip in lineage recovery and report back.

Greetings, Arian.
Ur awesome ty. Can I dirty flash this on my d6503? Any1 know? Already on lineage 17 previous build with trwp. Tx again 🙇‍♀️
 

Dred65

Member
Jan 24, 2020
29
1
Bugger. Tx for reply. I will have to look into to, how to do a clean flash.

#1 Looking at official docs

Just need to in twrp, Factory Reset, then Format data / factory reset, then install zip via twrp?
is this right pls any1?

#2 no I think its,
wipe data, cache and system, then install zip, is this right pls?

#3 https://wiki.lineageos.org/devices/PL2/upgrade
have to use adb etc

🤷🤷
 
Last edited:

@kitokit

Senior Member
Mar 15, 2017
352
66
Bugger. Tx for reply. I will have to look into to, how to do a clean flash.

#1 Looking at official docs

Just need to in twrp, Factory Reset, then Format data / factory reset, then install zip via twrp?
is this right pls any1?

#2 no I think its,
wipe data, cache and system, then install zip, is this right pls?

#3 https://wiki.lineageos.org/devices/PL2/upgrade
have to use adb etc

🤷🤷
I use #2
 
Bugger. Tx for reply. I will have to look into to, how to do a clean flash.

#1 Looking at official docs

Just need to in twrp, Factory Reset, then Format data / factory reset, then install zip via twrp?
is this right pls any1?

#2 no I think its,
wipe data, cache and system, then install zip, is this right pls?

#3 https://wiki.lineageos.org/devices/PL2/upgrade
have to use adb etc

🤷🤷
Wiping /data is often enough.

Some ROMs will fail to install if you wipe /system because their installer scripts look for the model number declared in places such as "/system/build.prop". I'm not saying this is the case for LOS 18.1, but knowing this will probably save you some headaches down the line.


########################

Going back on topic:
- Battery life on this ROM is surprisingly good! I can get a bit over a full day of light use out of this old phone.
- I've given up on the GPS problem and ended up enabling google's location services for the time being. Perhaps the apps I've tried to use are just too old for Android 10 (example: Cycledroid)
- I've experienced some problems related to mobile data last week, which had me rebooting or using airplane mode just to get things to load, but it was probably just my carrier being unstable.
- The camera experience can be hit-or-miss, depending on which app you use. Snap (included with LOS) is downright bad, OpenCamera is pretty good and actually uses the hardware camera button for focusing and shooting, but HDR is out of the question.
- My favorite music player is Sony's Music app, too bad it crashes on Android 10 and there doesn't seem to be a proper port (that I know of) yet. Yes, I've tried the magisk modules that promise compatibility, but no dice.
 
Last edited:

Dred65

Member
Jan 24, 2020
29
1
Wiping /data is often enough.

Some ROMs will fail to install if you wipe /system because their installer scripts look for the model number declared in places such as "/system/build.prop". I'm not saying this is the case for LOS 18.1, but knowing this will probably save you some headaches down the line.


########################

Going back on topic:
- Battery life on this ROM is surprisingly good! I can get a bit over a full day of light use out of this old phone.
- I've given up on the GPS problem and ended up enabling google's location services for the time being. Perhaps the apps I've tried to use are just too old for Android 10 (example: Cycledroid)
- I've experienced a some problems related to mobile data last week, which had me rebooting or using airplane mode just to get things to load, but it was probably just my carrier being unstable.
- The camera experience can be hit-or-miss, depending on which app you use. Snap (included with LOS) is downright bad, OpenCamera is pretty good and actually uses the hardware camera button for focusing and shooting, but HDR is out of the question.
- My favorite music player is Sony's Music app, too bad it crashes on Android 10 and there doesn't seem to be a proper port (that I know of) yet. Yes, I've tried the magisk modules that promise compatibility, but no dice.
Ty 4 reply, did no #2 all went well. So far so good.🤞
Noted to skip wiping system next time 👍
Looking forward for official release now. Awesome work developer. ❤️
 

Dred65

Member
Jan 24, 2020
29
1
@Dred65 no probs, dude.

Is it just my phone, or is the haptic feedback (vibration) from pressing the navigation softkeys really subtle/weak? I went as far as replacing my vibration motor, but the change wasn't very noticeable.
I can't tell much difference in the vibration but my z2 is a backup pH for me. I have realised I don't got no location data. No app can get my location.🤷 yes location toggle are on. All I installed was lineage.
 
I can't tell much difference in the vibration but my z2 is a backup pH for me. I have realised I don't got no location data. No app can get my location.🤷 yes location toggle are on. All I installed was lineage.
Yeah, GPS location is broken. It seems like any app that requests fine location (a.k.a. GPS location) instead of coarse location (a.k.a. network-based location) doesn't work. I'm still on LOS17.1 though, I haven't upgraded to 18.1 yet.

Good to know that I'm not the only one with this problem, I thought my GPS antenna was broken. The vibration problem, on the other hand...
 

Dred65

Member
Jan 24, 2020
29
1
Yeah, GPS location is broken. It seems like any app that requests fine location (a.k.a. GPS location) instead of coarse location (a.k.a. network-based location) doesn't work. I'm still on LOS17.1 though, I haven't upgraded to 18.1 yet.

Good to know that I'm not the only one with this problem, I thought my GPS antenna was broken. The vibration problem, on the other hand...
👍 we must hope and believe the Dev can fix it. You can do it NeoArian!
 

Top Liked Posts

  • 2
    Is there a difference between D6502 and D6503 ROM files? or same file can be used for either?
    No, you can flash the regular sirius builds on Z2 and it will install the D6502 modem firmware if your device is detected as D6502.
  • 2
    Is there a difference between D6502 and D6503 ROM files? or same file can be used for either?
    No, you can flash the regular sirius builds on Z2 and it will install the D6502 modem firmware if your device is detected as D6502.
    1
    Which file inside microSD card exactly?

    The restored twrp backup showed model as d6502. But i want to double check.
    I'm not talking about a file, I'm talking about a physical tag which has a bunch of information that's specific to your phone, such as model number and IMEI, among others. Here's what you should be looking for:
    1.JPG2.JPG3.JPG

    Also, you said...
    Can any of you tell me which version i am using? If it's d6502 or d6503. I had a twrp backup of original firmware but the backup refuses to boot
    You'll need to make sure your backup includes the kernel and recovery. If you're restoring a stock firmware backup which doesn't include these files, use FlashTool (not Emma) to flash just the kernel and fotakernel images by excluding everything else. See the attached pic.
    howto.png
    1
    Thanks man.
    Since this is not my phone. I just wanted to flash custom rom in old phone, i didn't know that.
    I had never pulled out microSD slot.
    Edit: and it is d6502
    I'm always glad to help.

    Hope you get that phone back in working order. I wouldn't bother flashing custom ROMs on other people's phones unless they're so inclined, and I mean that as in: they're curious people who are willing to deal with the ocassional bugs and have their way around them. Stock .291 was pretty damn stable, leave it at that.

    For the heating issue the dev told that its the soc itself and i am not the only one having that issue.
    Trust me, this phone doesn't overheat that much, it could be worse, I have the Z5 Premium which literally becomes unusable unless I use thermal management tweaks haha.
    1
    For the heating issue the dev told that its the soc itself and i am not the only one having that issue.
    Yeah, the SoC can heat up a lot on the Z2. I find that lowering the performance in the Battery settings helps.
    1
    I think we'll need a new thread for 18.1.
    The official website tells us that LineageOS 18.1 has been released for Xperia Z2.
    Check it out here:
  • 46
    2okPze5.png


    Introduction
    LineageOS, an open-source Android distribution, is available for several devices,
    with more being continuously added thanks to the biggest, yet ever growing, Android open-source community.
    Join us and breathe new life in your device, be it old or new.
    If you don't know LineageOS and would like to read about it before installing it you can take a look at the official Website.

    Features
    Individuality
    Customization is paramount to productivity.
    That’s why LineageOS promises to push for user personalization and preference.
    Everyone is unique and your device should be too.
    Security
    Your data, your rules. With powerful tools such as Privacy Guard, you are in control of what your apps can do whenever you want.
    Trust will help you understand the security of your device and warn you about possible threats.
    We take security very seriously: that’s why we deliver security updates every month to all our supported devices.
    And to make your device more secure, lock everything behind an enhanced lock screen.
    Longevity
    LineageOS extends the functionality and lifespan of mobile devices from more than 20 different manufacturers thanks to our open-source community of contributors from all around the world.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.

    Downloads
    Download LineageOS 17.1 for Xpeira Z2.

    Installation instructions
    Prerequisites:
    • Unlocked Sony Xperia Z2
    • Fastboot drivers to install TWRP
    • Micro-USB Cable to connect your phone to your computer
    Install:
    1. Reboot to TWRP. *
    2. Wipe cache, dalvik cache, data and system.
    3. Format data to get rid of encryption.
    4. Install ROM.
    5. Install 10.0 Gapps for ARM. **
    * recommended TWRP: Post #2
    ** optional

    Update:
    • Get the latest build
    • Boot into TWRP
    • Flash the downloaded build
    • Reboot
    Note: If you don't wipe system, backuptool will reapply your modifications that support addon.d, for example: GApps.

    Reporting bugs
    • DO NOT Report bugs if you're running a custom kernel or you installed Xposed
    • Grab a logcat right after the problem has occurred. (Please include at least a few pages of the log, not just the last few lines, unless you know what you're doing.)
    • If it is a random reboot, grab /proc/last_kmsg. (Do not bother getting a logcat unless you can get it just before the reboot. A logcat after a reboot is useless)
    Remember to provide as much info as possible. The more info you provide, the more likely that the bug will be solved. Please also do not report known issues. Any bug not reported in the bug report format below may be ignored.

    Code:
    What is your--
    LineageOS version:
    Gapps version:
     
    Did you--
    wipe:
     restore with titanium backup:
    reboot after having the issue:
     
    Are you using--
    a task killer:
    a non-stock kernel:
    other modifications:
     
    Provide any additional information (observations/frequency of problem/last version it worked on/etc) as needed:


    XDA:DevDB Information
    LineageOS 17.1 for sirius, ROM for the Sony Xperia Z2

    Contributors
    NeoArian
    ROM OS Version: Android 10
    ROM Kernel: Linux 3.4.x
    ROM Firmware Required: 23.5.A.1.291

    Version Information
    Status: Stable

    Created 2020-02-21
    Last Updated 2020-07-30
    22
    Hi everyone :)
    I am working on Android 11 for sony shinano currently and as some of you might know, my Z2 has a broken SIM-card slot. Hence i need your help to test if RIL works fine on this build: https://sourceforge.net/projects/ep...0/lineage-18.0-20201205-UNOFFICIAL-sirius.zip
    This build is NOT ready to use yet, but most stuff should work fine.
    Greetings, Arian.
    20
    Known Issues
    • FM Radio quality is worse then on stock, bit we can't do much without Sony's source probably. I am not working on that right now.
    • Disk Encryption: Disk Encryption is working, however not with the default password (no password). Workaround: Set password first, then start disk encryption, not the other way round!
    • You tell (with logs please)...

    TWRP
    Download TWRP 3.3.1 for Xperia Z2!
    How to install this TWRP
    • Rename the downloaded twrp image to twrp.img
    • Reboot to fastboot by holding volume up while connecting your device to your computer
    • Open a terminal and go to the directory with TWRP in it
    • Type
      Code:
      fastboot flash recovery twrp.img
    • Boot into TWRP; while the device is powered off press the power and volume down button


    A big THANK YOU to @OLDST4R for donating the Xperia Z2 to me!
    14
    Good evening,
    I'm uploading a new build to https://sourceforge.net/projects/ephedraceae/files/sirius/lineage-17.1/ (should be available witin 15 minutes, sourceforge need to mirror it)
    Since it has been a while i don't have a changelog but D6502 should be supported now and the problem about forgetting time should be resolved.
    Please give feedback about D6502 and happy flashing!
    13
    Good evening.
    I have uploaded a new build: https://sourceforge.net/projects/ep...-17.1-20200514-UNOFFICIAL-sirius.zip/download

    Assisted GPS should work now, that means a way faster fix should be available now as long as you have an internet connection, please report back about this.
    Happy flashing