yashsingh1/xdaforums huggingface dataset:
[Xperia Z2 Original Android Development] hamed:
i update twrp (from 3.2.1 to 3.3.1) and install BiTGApps then boot is fixed

with "D6502 Baseband patch" network and modem dosn't work

thanks
[Xperia Z2 Original Android Development] mapelo:
Thanks you, Neoarian. I love Lineage (Lineage is into my other two devices). This Z2 had an very very obsolete stok ROM from Sony. Now it's update. All run perfect. Thanks again.

Manuel
[Xperia Z2 Original Android Development] fertraceur:
Hi, first, thank you so much for keeping alive this phone!!

Second, when we go to the link https://sourceforge.net/projects/ephedraceae/files/sirius/lineage-17.1/

There's a version for Davinci to download by default and Sirius just below.

just saying for someone to not confuse downloading that version because that not for Sirius I suppose. I tried to install and have boot loop
[Xperia Z2 Original Android Development] Aphelion_:
I tried the LineageOS 17.1 version and I have a very strange visual bug. My screen looks like it's broken. (TWRP and the official OS worked fine so it's not my screen) Sometimes I can navigate the menus and stuff, and in the next screen everything breaks down. (image attached)

I also tried to flash the Lineage OS 18 version, but it failed in TWRP with Signal 11.

Update 7.01.2021

Screen was actually broken. I don't know how this happend because I didn't actually used the phone but ok.

I flashed the LineageOS 17.1 Version and it runs great so far. Thanks for supporting an old (but still capable) phone from 2014 :)
[Xperia Z2 Original Android Development] fertraceur:
Does anyone have problems with 4G/3g navigation? I have to switch on and off to work a few minutes

with Wifi works great

and Whatsapp every time I post a photo, the app crashed, enter again pressing button retry to send and it finally sends it
[Xperia Z2 Original Android Development] merchupi:
Look at this https://xdaforums.com/t/dev-wip-brc...ices-like-sony-shinano.4199257/#post-84273495

Perhaps it is useful
[Xperia Z2 Original Android Development] themightydeity:
@NeoArian Could you provide sources for the build. I need to cutomize my build and disable shutdown on battery temp high on my all time on z2 which works as dashboard display. I have removed the battery and solderd the battery board directly to a USB adapter (5v 3a). The phone is shutting down when CPU load warms up the board and the phone mistakenly detects that battery temp is high.
[Xperia Z2 Original Android Development] Pixelado:
I know I'm 3 months late to this, but for anyone who's looking for an answer to this:

I don't think this ROM, or any non-Sony ROM, would benefit from that DRM patch, because AOSP-based ROMs do not expect those keys to exist in the first place, they're specific to Sony devices and mainly affect Sony-specific features.

I know, sad, because the camera quality gets downgraded quite noticeably.

I'd like to give this ROM a try. I now have a spare Z2 to play with.
[Xperia Z2 Original Android Development] Kiranp88:
I have a strange GPS issue - but first many thanks to NeoArian for continuing to work on our devices!

Since updating to the 20200730 from the 20200514 build I simply just cannot get a GPS lock.

Now, I reverted back to the May build to see if it was a hardware issue - but this worked flawlessly with my Tom Tom app. However, reverting back to the July build caused the same issue.

At all times I performed a clean flash (i.e stock rom, then TWRP then Rom, then Gapps).

I really would like to continue using the July build, as I think I see a a nice change in performance and visuals, but I really need the GPS to work. I've tried using various 'GPS fix' apps, but none can utilize the devices signal.

Is there a fix for this? Can I somehow edit the GPS config file / replace it with the one from the May build?

Any help would be greatly appreciated.

Thank you

Edit: think I'll go back to the May build and wait for 18.1, since the July build looks to be focused for the D6502
[Xperia Z2 Original Android Development] Dred65:
Magisk install, probably doing it wrong.

So first I just went to twrp recovery, and flashed the magisk.zip file latest from github, and output on twrp said all good but on reboot. I see nothing.

Then reading install instructions, I extracted boot.img from lineagerom and patched that via magisk manager then twrp, then flash the patched IMG. And same outcome as before.

Output all good but on reboot I see nothing.

🤷‍♂️ help pls
[Xperia Z2 Original Android Development] @kitokit:
Have you tried installing the magisk manager app?
[Xperia Z2 Original Android Development] Dred65:
Tx 4 reply, yes I have the app

Installed via the link DL and then installed it.
[Xperia Z2 Original Android Development] netwave:
Is the latest build the one in the OP ? want to Upgrade from CM 5.1.1
[Xperia Z2 Original Android Development] kgursu:
Magisk Manager app could not process that without patching boot image. So, the result is the same for me. Both ways did not give a positive result.

Remembered the fix: First flash Magisk 20.4 through TWRP, update Magisk Manager (with APK or by updating online), then update Magisk inside Magisk Manager.
[Xperia Z2 Original Android Development] shibi_err404:
Can you send the link of twrp 3.3.1
[Xperia Z2 Original Android Development] o_0mohammad0_o:
https://xdaforums.com/t/lineageos-17-1-for-xperia-z2.4054605/post-81825789
[Xperia Z2 Original Android Development] hamed clayderman:
of course https://www.mediafire.com/file/kvk9xikifduxb1l/twrp-3.3.1-sirius-20200221.img/file
[Xperia Z2 Original Android Development] Vgraev:
hello, dear friends. please help me, i want to do wifi fix in this rom, change wifimanager.smali according to instruction using apktool 2.4.1 ( https://xdaforums.com/t/tut-n-o-wif...ased-on-it-and-cypheros.3738061/post-79258894)

but phone doesn't boot( permanent boot) with patched framework.jar .

firstly i think that i need to sign framweork.jar because apktool doesn't sign, but profi said that system files don't need i sign.

maybe it doesn't work because of odex or deodex version. how do you think? because i break my brain)))
[Xperia Z2 Original Android Development] netwave:
Using this ROM on a Sony Z2 D6503 & like it.

I was on an out dated version of BiTGApps & wanted to put Open Gapps Pico on instead, which meant a fresh install.

When I used flashtool to re-flash the 23.5.A.1.291 I got the error,

"the bundle does not match the connected device"

Is that because this Lineage ROM is for all Z2 Model variants & flashtool could not see my phone as a Z2 D6503

If so how do we make the edit to rid the bundle mismatch?

The only successful method I've found is to Flash stock with Emma , then flash the 23.5.A.1.291 with flashtool, Then again the Lineage procedure from the OP but would be good to bypass EMMA & rectify the bundle mismatch If anyone here knows how that's done.

** GPS does not appear to work lineage-17.1-20200730-UNOFFICIAL-sirius on the D6503

Could be a hardware issue! More testing needed.. anyone else experiencing this?
[Xperia Z2 Original Android Development] shibi_err404:
Camera not working

Jio call not working

Jio app not opening

Hotspot not working

These are the bugs that I encountered
[Xperia Z2 Original Android Development] NeoArian:
Hi everyone.

Thanks for the feedback and reports.

Unfortunately i currently don't have enough time to work on the xperia z2.

That doesn't mean it's deprecated and won't be continued some day.

Please forgive me that i'm not active here.

Greetings, Arian.
[Xperia Z2 Original Android Development] ChevoC:
Thank you my friend for your effort, your time and work. Our device is not dead thanks to your work. Thanks a lot.
[Xperia Z2 Original Android Development] Ghost18_07:
Thanks for the fix, now my Xperia Z2 D6502 is fully working with this build! magic ! i'm very happy with this build ( Android 10 ) , thanks a lot my friend, and i hope you are doing well , btw , about the log cat , will try to do it for you, and if you find some time for it you can find it here , regards.

Edit ( 25 April 2021 ) : After i used this ROM for a while, i can say this ROM is wonderful for daily use, i didn't face any problem yet, thanks again bro.
[Xperia Z2 Original Android Development] Ziiryu:
First of all, I wanted to thank you so much for all of your work on the Z2. been using mine ever since release and your work makes me able to still be able to use it up to this very day - and hopefully much longer. I've been using your Lineage port(s) for over a year now, and I'm very happy with them.

The only bugs I could find(on my end):

-sometimes wifi drops out for a second, but instantly reconnects

-after long runtime (~2weeks+) wifi sometimes seems to stop working and then going to wifi menu crashes the system (is fine again after reboot tho)

-when rebooting, it considers the SD card(64GB) as corrupt, so I have to take the SD card out, reboot and once Its fully booted, reinsert the SD card (this is on every reboot/boot)

-and as others have already reported, in the most recent update (Jul2020) there is a GPS issue, where the location doesnt lock/update

but overall I am very happy and greatful with all you've done for the Z2. Thank you, for all of your work!

(btw. I've noticed the lineage-18.1 folder on your sourceforge, and just wanted to ask, if it is stable/usable yet)
[Xperia Z2 Original Android Development] NeoArian:
Thanks for the nice words.

Regarding the WiFi issues we have a WIP change to align the country code selection with stock, that could help with your issues too. (Talking about this: https://review.lineageos.org/c/LineageOS/android_kernel_sony_msm8974/+/307310)

The 18.1 builds are supposed to be stable, but the latest build is in selinux permissive mode (but it supports both, D6502 and D6503). To fix the regional wifi issues (with the change i linked above applied) you can flash the bootimage i attached to this post.

Greetings, Arian.
[Xperia Z2 Original Android Development] Ziiryu:
Thanks for the quick reply.

Sorry if this question is stupid(I dont have much experience with Android/Linux):

Regarding the WiFi country code selection WIP - the kernel you linked seems to be in the lineage-18.1 branch.

Could I flash the Kernel you just sent over the Kernel Im currently using and then run the currently installed lineage 17.1 off of it? (and then flash your boot image for the wifi fix)

-probably not changing to 18.1 just yet, because "supposed to be stable" does not sound ready to be a daily driver.

or in short: does that kernel also support 17.1?

Best regards
[Xperia Z2 Original Android Development] NeoArian:
The kernel itself would work fine on 17.1 too. However the boot.img from 18.1 would most likely not work fine. I currently don't have the time to pack the kernel as a flashable zip.

18.1 is as stable as 17.1 with 2 exceptions so far: WiFi hotspot does not work correctly and the screen does not turn off while the device is powered off while charging.

Greetings, Arian.
[Xperia Z2 Original Android Development] Worlor:
Hello

I got the same problem with the GPS.

This morning, the GPS wasn't working at all. After a reboot and multiple try, it finally worked (with instant position acquisition). I have used it for 2-3 hour on car. Until I close the GPS app .... Impossible to get a position now :/ Rebooted it multiple times, disabled and enabled the localisation settings. No satellites at all.

I think it's software related
[Xperia Z2 Original Android Development] KazemCodes:
Thanks alot
[Xperia Z2 Original Android Development] RegrettedLeek5:
Hello friends I'm new to the forum more I would like a help with installing twrp on xperia z2 d6543 already done by fastboot also by the official application twrp says it was successfully installed but does not work, the only one that came with it was a version I found on youtube from twrp 2.8.7 more this is not possible to update because only the kernel partition appears in twrp 2.8.7 and if I try the phone turns off and does not turn on and does not turn on again i have to reinstall android 5.1.1 by flashtool for the phone to work again, forgive my English because I am using google translator.
[Xperia Z2 Original Android Development] @kitokit:
Are you trying to install this rom? Or just twrp? Better upgrade to stock mm before you install this rom
[Xperia Z2 Original Android Development] RegrettedLeek5:
yes I am, this device was with version 6.0.1 of android so unlock the bootloader and I put and put customized room 5.1.1 by flashtool I managed to do the root more I could not install any twrp other than version 2.8.7 dual recovery was the only one that worked more does not fit for these rom versions. What would be better?
[Xperia Z2 Original Android Development] @kitokit:
Try to be in stock MM then flash twrp 3.3.1 image in fastboot

Fastboot flash recovery twrp.img or

Fastboot flash FOTAkernel twrp.img

If fastboot says successfully flashed

Try to enter recovery by powering off your device then press power +volume dowm button until you see twrp flash screen
[Xperia Z2 Original Android Development] RegrettedLeek5:
So is it better to return the rom stock and then do the flash for twrp 3.3.1? Forgive me the ignorance but I did not understand this part Fastboot flash FOTAkernel twrp.img I am learning with a bang because I want to give z2 a new life, the times I put the twrp they gave the message that it did successfully but they didn’t enter recovery already with this rom 5.1.1. Thanks a lot for the help.
[Xperia Z2 Original Android Development] @kitokit:
If you are planning to flash this lineage 17.1 you better be in stock MM.

fastboot flash FOTAkernel twrp.img just in case the other command does not work..

There is also an update of this rom lineage 18 based on Android 11..
[Xperia Z2 Original Android Development] ImpriveS:
Hello, I say right away I'm new to this business, so could you help me in installing lineage 17.1 on my sony Z2 D6503 phone. At the moment I have AICP Oreo Edition 13.1. How do I install lineage 17.1? You can give instructions as detailed as possible. Thank you very much in advance.
[Xperia Z2 Original Android Development] RegrettedLeek5:
Anyway I was able to install Android 6.0.1 stock MM and root, now I have to install twrp in the updated version in order to get Lineage 17.1 or 18.1 as you had suggested among those which is the most stable version for use on z2?
[Xperia Z2 Original Android Development] @kitokit:
Both are pretty stable, only problem with lineage 18 is sound its a bit low for me at least..
[Xperia Z2 Original Android Development] RegrettedLeek5:
I understand, still trying to install twrp 3.3.1 more with both commands that passed me does not work in the first reaches the end saying ok making it seem that everything is ok but does not start in recovery since the second FATOkernel informs that not allowed I do not know how to install even with stock MM.
[Xperia Z2 Original Android Development] @kitokit:
Try power off your phone and then press power on + volume down together until you see twrp splash screen...
[Xperia Z2 Original Android Development] ImpriveS:
Hello, please help. Before installing this firmware Lineage OS 17.1, should I first return the phone to the stock firmware? At the moment, I have AICP OREO EDITION 13.1, or can I immediately install Lineage OS 17.1?
[Xperia Z2 Original Android Development] @kitokit:
Yes you should be on stock MM
[Xperia Z2 Original Android Development] RegrettedLeek5:
Unfortunately, there must be another way. Does it have something to do with the kernel?
[Xperia Z2 Original Android Development] @kitokit:
What happen if you hold power on and volume down simultaneously?
[Xperia Z2 Original Android Development] RegrettedLeek5:
Nothing happens, just start the system normally.
[Xperia Z2 Original Android Development] @kitokit:
If you.have telegram, try to search this group

Sony Z2 XDA Community Group.

If you have flashed twrp 3.3.1 successfully in fastboot and still can boot to recovery by pressing simultaneously power button and volume down,....try to ask in that group maybe someone can help you out. I've the same problem but was able to boot in recovery by doing the button combination as I stated above. You should keep pressing it don't let go unless you see the twrp recovery splash screen..
[Xperia Z2 Original Android Development] RegrettedLeek5:
I'm looking for the group you mentioned in the telegram, I found one called Xperia chat, I think so every time I installed it through fastboot in the end it was ok ok according to the images I posted in the previous comment but it doesn't start and even holding power and volume dow and hold after exiting the sony logo follows to load the system. Could you give me all the command lines you used when installing?
[Xperia Z2 Original Android Development] @kitokit:
Fastboot flash recovery twrp.img

Fastboot flash FOTAkernel twrp.img

only this two commands I tried..FOTAkernel didn't also work for me,.giving me the same error like you had.. only the first command worked.. what platform / adb tools did you use..I use version 6..
[Xperia Z2 Original Android Development] @kitokit:
Try this link https://t.me/c/1331957710/512
[Xperia Z2 Original Android Development] RegrettedLeek5:
Yes I used adb, I will do it for this version 6 to see if and it will.
[Xperia Z2 Original Android Development] RegrettedLeek5:
The telegram link is not working is saying that I don’t do it to give you a conversation and will not let me in, just a message appears on the screen and the group user passes me the id t.me / ..... it must be in the group profile .
[Xperia Z2 Original Android Development] @kitokit:
Try to ask @koraymers if you could join the group, I think his the one who created the group..
[Xperia Z2 Original Android Development] RegrettedLeek5:
OK I will send a message to him.
[Xperia Z2 Original Android Development] RegrettedLeek5:
Here is the link https://t.me/joinchat/T2QPznVy6rI-JD1Y the creator of the group told me that he could share here if anyone else wants to participate already helps.😉
[Xperia Z2 Original Android Development] eNKa007:
Great thanks for great work to @NeoArian, @OLDST4R for support all others involved.

I just flashed 17.1-20200730 +BiTGApps-arm-10.0.0-v0.6 with TWRP (salute for your work!) with steps below

unlock with flashtool-0.9.33.0 with it's drivers replacing Sony ones + unlock code from Sony

adb reboot bootloader

fastboot flash recovery twrp.img

fastboot reboot

fastboot boot twrp.img

from SD card step by step as described in initial post. Works great so far.

I would like to suggest to include unique Xperia feature started with Z2 till XZ Premium which is Active Noise Cancellation with 5 pole jack and microphone build in ear buds like MDR-NC31 or MDR-EX750 (HiRes) and Music app from stock FW. This is the feature that keeps me with this phone for over six years.

Do you think it is feasible?
[Xperia Z2 Original Android Development] Mr.Tom_Tom:
Did you try the original Sony Music app? I have never heard of these headsets before, but the device should in general support what is called e.g. "anc-on-hi-res" mixer paths. However, there might be some components missing. Maybe you need the Sony EQ app as well.
[Xperia Z2 Original Android Development] eNKa007:
Thanks for this. Unfo Play says that my device is not compatible with this version so tried with lower versions from apkmirror also no success. In fact, I have also tried with Album, tvout.mhl and dlna but refuses to install. Certainly arch aligned. The only one from original set was home - four static icons on a bottom of every screen.
[Xperia Z2 Original Android Development] Creeper123:
I followed the instructions here to unlock the bootloader. I had to unlock it using Sony's developer website (to get a key) and then, in fastboot:

fastboot oem unlock 0xKEY

(where KEY is the key given)

After that, I was able to flash the recovery with

fastboot flash recovery twrp.img

Before unlocking, fastboot gave me the dreaded error: FAILED (remote: 'Command not allowed') when trying to write the recovery or FOTAKernel.

Hope that helps anyone that had the same problem! Good luck. Now I am off to install Lineage 18.1. Thanks NeoArian for this ROM!
[Xperia Z2 Original Android Development] fracama87:
It took me 2 days to solve the same issue... Did you insert ALL the code you've found on the box as imei? you have to insert it without last digit.

Also with *#*#7378423#*#* code you can check if your bootloader is now unlocked, check, if says "unloked allowed yes" it's still not unlocked... probably for the imei reason.

if says: "unlocked yes" is something else.
[Xperia Z2 Original Android Development] Creeper123:
I inputted the whole number that was given by entering *#06# in the dialer.

I also see that the latest Lineage 18.1 build for this phone has SELinux set as permissive. You can see this when booting up the phone and in LineageOS' Trust settings. This is not what you want for a daily driver. I think that could explain why "Google Play system update" is grayed out in Android version page in settings. Would it be feasible to have an SELinux enforced build?
[Xperia Z2 Original Android Development] fracama87:
You've to insert only 14 digits (that's what I've found and what helped me) for imei on Sony website. So if *#06# give you a 15 digits code just use first 14 digits and try everything again.

Ps. I didn't believe this was my issue either. And this is why I've spent 2 days trying everything else.
[Xperia Z2 Original Android Development] Romiloer:
Appreciate your efforts!I swipde in you 18.1 Version,My Phone D6503 is China Unicom Version,everyting is ok ,except no signal,how to fix it???
[Xperia Z2 Original Android Development] douvers:
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.
[Xperia Z2 Original Android Development] Mathias_:
Hey, I flashed the lineage os 18.1 rom on my device and everything look like it's working fine except for wifi. I flashed the boot.img that the dev gave here but appart from my 2.4ghz windows hotspot my xperia connects to nothing and it's quite frustrating :/
[Xperia Z2 Original Android Development] omgasm:
I've got a bootloop after that, send help
[Xperia Z2 Original Android Development] NeoArian:
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.
[Xperia Z2 Original Android Development] NeoArian:
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.
[Xperia Z2 Original Android Development] thanhdz167:
I have a Sony Xperia Z2 D6503 and this ROM worked for me, great. Really respect the work you are doing.

Thank you very much for this ROM. Keep working!

P/s: Sorry for my bad English!
[Xperia Z2 Original Android Development] cartio:
modem not work on D6502

exist baseband didnt help