[ROM][12L][XZ2C][OFFICIAL] LineageOS 19.1

Search This thread
Jul 23, 2022
9
0
There's no need to flash stock and copy partitions if it was done before installing 18.1 already.
Great! Thank you. The Lineage wiki upgrade page says to downgrade, but I suppose it is referring to firmware (which will never be updated by Sony past Android 10?) and not the ROM?

"If your current installation is newer or older than Android 10, please up- or downgrade to the required version before proceeding"

Also, is there any situation where the partitions would ever need to be copied again? Like say if downgraded firmware to Android 8 or 9, I'd have to then go to Android 10 and copy partitions before installing Lineage 19.1? I don't anticipate doing this but just want to fully understand any potential risk of hard bricking.
 
Jul 23, 2022
9
0
I may have bricked the phone. Was I not supposed to flash Lineage 19 recovery??

I installed the Sony developer drivers, which let 'fastboot devices' work (I am on a new computer since when I installed Lineage 18.

Then "fastboot flash boot lineage-19.1-20220722-recovery-xz2c.img" which said boot_a and Finished. Then it was stuck on Sony logo. I was able to boot back to recovery and retried but then it said boot_b and Finished. After that I got "Your device is corrupt. It can't be trusted and will not boot".

I flashed Lineage 18 recovery and it said boot_b and Finished. And now it is back to stuck on Sony logo.
 
Jul 23, 2022
9
0
Okay I got really lucky and found the old 2021 Lineage recovery img that matches the ROM date. And unlike the newest 18.1 recovery, this one worked and I successfully booted into recovery.

It said the system is corrupted and it let me do a factory reset and successfully boot into Lineage 18.1. Then I tried to flash Lineage 19.1 and it failed saying it package is for product xz2c but expected H8324. I used the system updater app to update to the latest 18.1 (20220610) and am still getting this same error.

So now I'm confused because I'm simply following Step 5 from https://wiki.lineageos.org/devices/xz2c/upgrade
 
Jul 23, 2022
9
0
I tried flashing Lineage 19 recovery again and it said boot_a finished. I had the issue again being stuck on Sony logo but somehow managed to get to recovery. But it said slot b recovery and it had the old December 2021 date even though I updated Lineage 18 to June 2022. It said corrupted and I did a factory reset back to December 2021.

So how do I update to Lineage 19?
 

jan8045

Member
Dec 30, 2011
29
8
Sony Xperia XZ2 Compact
I think I got NFC now working (at least for a couple oft days which was never the case before). Not sure, what exactly the solution was but those were the chaotic steps:
- Copied libpn553_fw.so from here to /vendor/lib64 (version 2nd Jul 2021)
- Copied libpn553_fw.so from here to /vendor/lib64 (version 9th Sept 2020)
- Copied libpn553_fw.so from here to /vendor/lib64 (version 30 April 2020)
- Copied backup of Lineage OS firmware version back to /vendor/lib64
- Again copied libpn553_fw.so from here to /vendor/lib64 (version 2nd Jul 2021)
(after each copying, a reboot)
- Toggled module several time on/off in settings.

During testing, it showed that I'm still affected by the Mifare-issue linked below, but that's OK for the moment for me (I rely on other chips):
After a long time of testing, it turns out, that the setting "SCREEN_OFF_POWER_STATE=0" in libnfc-nci.conf (/vendor/lib) seems nevertheless to be the key to get NFC working in my case (except for the Mirafare-bug mentioned above). However, after each LOS update, the file is overwritten again (SCREEN_OFF_POWER_STATE=1). The consequence: NFC crashes again after some minutes. Is there any chance that the default setting could be set to 0 (also in the file itselft, it is stated that 0 is the default setting)?
 

Edick1337

Member
Dec 10, 2017
15
3
Sony Xperia XZ2 Compact
After a long time of testing, it turns out, that the setting "SCREEN_OFF_POWER_STATE=0" in libnfc-nci.conf (/vendor/lib) seems nevertheless to be the key to get NFC working in my case (except for the Mirafare-bug mentioned above). However, after each LOS update, the file is overwritten again (SCREEN_OFF_POWER_STATE=1). The consequence: NFC crashes again after some minutes. Is there any chance that the default setting could be set to 0 (also in the file itselft, it is stated that 0 is the default setting)?
Make a magisk module which replaces the file?
 
Jul 23, 2022
9
0
Okay after all the trouble I had, the key was to unplug the USB before booting into recovery. Then it successfully booted into Lineage 19 recovery instead of 18 recovery and I was able to install Lineage 19 ROM. My problem is not understanding how slots work. It would also help if the official update wiki said to install Lineage 19 recovery.
 

dtrunk90

Senior Member
Oct 29, 2021
344
157
32
Sony Xperia XZ2 Compact
Xperia XZ2
Great! Thank you. The Lineage wiki upgrade page says to downgrade, but I suppose it is referring to firmware (which will never be updated by Sony past Android 10?) and not the ROM?

"If your current installation is newer or older than Android 10, please up- or downgrade to the required version before proceeding"
Correct. The requirement is that you have latest stock android from sony installed once before installing lineage.
Also, is there any situation where the partitions would ever need to be copied again? Like say if downgraded firmware to Android 8 or 9, I'd have to then go to Android 10 and copy partitions before installing Lineage 19.1? I don't anticipate doing this but just want to fully understand any potential risk of hard bricking.
Only if you're installing older stock firmwares.
I tried flashing Lineage 19 recovery again and it said boot_a finished. I had the issue again being stuck on Sony logo but somehow managed to get to recovery. But it said slot b recovery and it had the old December 2021 date even though I updated Lineage 18 to June 2022. It said corrupted and I did a factory reset back to December 2021.

So how do I update to Lineage 19?
Simply as that: Upgrade recovery to 19.1, directly boot into recovery and follow the upgrade steps at https://wiki.lineageos.org/devices/xz2c/upgrade
Okay after all the trouble I had, the key was to unplug the USB before booting into recovery. Then it successfully booted into Lineage 19 recovery instead of 18 recovery and I was able to install Lineage 19 ROM. My problem is not understanding how slots work. It would also help if the official update wiki said to install Lineage 19 recovery.
That's only a one-time issue since I had to change something. This shouldn't be the case for 20.0/20.1 (or whatever version will be next). So, no need to add this to the wiki.
 

dtrunk90

Senior Member
Oct 29, 2021
344
157
32
Sony Xperia XZ2 Compact
Xperia XZ2
After a long time of testing, it turns out, that the setting "SCREEN_OFF_POWER_STATE=0" in libnfc-nci.conf (/vendor/lib) seems nevertheless to be the key to get NFC working in my case (except for the Mirafare-bug mentioned above). However, after each LOS update, the file is overwritten again (SCREEN_OFF_POWER_STATE=1). The consequence: NFC crashes again after some minutes. Is there any chance that the default setting could be set to 0 (also in the file itselft, it is stated that 0 is the default setting)?
Yeah, a magisk module would be the only solution since you seem to be the only one affected by this and i don't want the controller to be in sleep-state while screen is off. That would mean we all couldn't use NFC anymore when screen is turned off.
 
  • Like
Reactions: Edick1337

jan8045

Member
Dec 30, 2011
29
8
Sony Xperia XZ2 Compact
Yeah, a magisk module would be the only solution since you seem to be the only one affected by this and i don't want the controller to be in sleep-state while screen is off. That would mean we all couldn't use NFC anymore when screen is turned off.
OK, just did that, thanks both of you for the hint. The attached module needs to be manually unzipped in the folder /data/adb/modules.

Contained code:
#!/system/bin/sh # Sets SCREEN_OFF_POWER_STATE=0 in libnfc-nci.conf (/vendor/etc) to enable sleep during screen off. Created module to solve issues of crashing NFC module some minutes after boot. MODDIR=${0%/*} cp /vendor/etc/libnfc-nci.conf $MODDIR/system/vendor/etc/libnfc-nci.conf sed -i 's/SCREEN_OFF_POWER_STATE=1/SCREEN_OFF_POWER_STATE=0/g' $MODDIR/system/vendor/etc/libnfc-nci.conf
 

Attachments

  • NFCSleepModeOverwrite.zip
    2.9 KB · Views: 5

BENETNATH

Senior Member
Jan 7, 2011
1,580
861
Hello,
I'm still on an old H8314 unlocked Android 9 52.0.A.11.3
working quite ok but some bug are there.
I'm looking for a daily driver, seems this one is ok ?

What's the best update option now ?
Using sony EMMA tool in flash mode is ok? Do I need to go to Android 10, then 11, then 12 ?

or just taking the xperiafirm 52.1.A.3.49 and flash it with newflasher ?

thanks for your help
 

dtrunk90

Senior Member
Oct 29, 2021
344
157
32
Sony Xperia XZ2 Compact
Xperia XZ2
Hello,
I'm still on an old H8314 unlocked Android 9 52.0.A.11.3
working quite ok but some bug are there.
I'm looking for a daily driver, seems this one is ok ?

What's the best update option now ?
Using sony EMMA tool in flash mode is ok? Do I need to go to Android 10, then 11, then 12 ?

or just taking the xperiafirm 52.1.A.3.49 and flash it with newflasher ?

thanks for your help
Please read the install instructions in the official wiki
 
  • Like
Reactions: BENETNATH

BENETNATH

Senior Member
Jan 7, 2011
1,580
861
ok, what's the best choice to update to Android 10 ?
I've dowloaded 52.1.A.3.49 rom, can i just flash it with newflasher ?
Or is Sony's Xperia_Flash_Tool a better option ?
 

dtrunk90

Senior Member
Oct 29, 2021
344
157
32
Sony Xperia XZ2 Compact
Xperia XZ2
ok, what's the best choice to update to Android 10 ?
I've dowloaded 52.1.A.3.49 rom, can i just flash it with newflasher ?
Or is Sony's Xperia_Flash_Tool a better option ?
It should be still possible to use the on device OTA updater isn't it? If so, use that! Otherwise it doesn't matter if you use newflasher or flashtool. Since flashtool is windows only you need to use newflasher on linux and on windows i would recommend flashtool.
 
  • Like
Reactions: BENETNATH

BENETNATH

Senior Member
Jan 7, 2011
1,580
861
OTA was not working.
Flash tool saw my phone, I've chosen 52.1.A.0.618
flash went well, not reboot
"Your device is corrupt. It can't be trust and will not boot"
 

dtrunk90

Senior Member
Oct 29, 2021
344
157
32
Sony Xperia XZ2 Compact
Xperia XZ2

DrTrax

Senior Member
Jan 23, 2013
78
17
GT-i9250
Sony Xperia XZ2 Compact
I face an issue with high RAM usage by Android itself...

System takes 1.5GB
Apps also around 1.3GB

I have Magisk installed with ACC, Safetynet Fix and HideProps

Settings take around 200mb, IG 50mb, SmartLauncher up to 500mb (due InAppBillingService by Google) and Play Services up to 300mb...

Cached is Speech Services around 250mb and 400mb (again) by Play Services...

I think that's pretty much in comparison to my BQ Aquaris 5 Plus with LOS 15.1 which haves 3GB and left me around 1.8GB free (Open Gaaps pico installed)
 
Last edited:

BENETNATH

Senior Member
Jan 7, 2011
1,580
861
Hello,
I'm on recovery, flashed lineage 19.1 from 20220722
I now want to add gapps, so I took mindthegapps 12.1.0 but when i try to flash it, it says that this package is for Android 12.1.0 and my system is running Android 10, so Aborting.


So I should take these ones : MindTheGapps-10.0.0-arm64-20220224_161733 ?

About adding magisk, what's the best option as lineage does not provide a boot.img ?
 
Last edited:

VritteKloat

New member
Jul 28, 2022
1
0
I came across Dtrunk's xperiance files on Gitlab to bring back the camera app and a few other apps on xperia devices using Magisk. I would like to try it out but I'm not familiar yet with building the modules myself.
What would be a clear guide to start with?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi! Any chance to find somewhere for download the last LOS18.1 build (and associated recovery)? Thanks.
    Yes, I can upload them later.
    1
    I've applied for dev role at androidfilehost.com. In the meantime it can be downloaded from my GDrive: https://drive.google.com/drive/folders/1SONX9fsCTrcFm2vKjaH4hyB6NX5MMV9D?usp=sharing
    Thank you very much for the effort of maintaining it and now that of posting the files.
    1
    For installing lineageos19.1, I need to install before android 10 stock.

    Unfortunately I installed lineageos17.1 on that device before android10 stock was avaiable.

    Does anyone know where to find android 10 stock.
    I already found the tool xperifim, but it shows different firmwares, and no android version.
    (I am also not sure what region model my xz2c is: german italian or swiss, and I do not know if it is relevant or how I can find out from Lineageos 17)
    With xperifirm simply download the listed firmware for your region and flash with newflasher (search the forum) or flashtool (from sony, windows only).
    1
    Thanks.
    How can I determine the region of my xz2c? It should be german, italian or swiss.
    All tutorials are for the stock android version, in lineageos I did not find the information anywhere.
    Or maybe it is not that relevant if I am going to flash lineageos afterwards?
    Just use the region you live in
  • 8
    2okPze5.png

    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    */
    About LineageOS
    LineageOS is a free, community built, aftermarket firmware distribution of Android 12.x (S),
    which is designed to increase performance and reliability over stock Android for your device.

    All the source code for LineageOS is available in the LineageOS GitHub repo.
    And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

    Official LineageOS website : https://lineageos.org/
    About LineageOS Legal : https://lineageos.org/legal/

    Important Information
    1. This ROM will never work with any versions of Google Camera (GCam)!
    2. You need to flash Stock Android 10 before flashing this ROM.

    Downloads Links
    LineageOS 19.1:
    Official builds:
    Link

    Google Applications (optional):
    MindTheGapps:
    https://wiki.lineageos.org/gapps
    Information: Flash the GApps before the first boot. If not, a clean flash is recommended.

    Flashing and updating
    Please refer to the official installation guide at https://wiki.lineageos.org/devices/xz2c

    Issues and reports
    Report issues only if you are using the ROM kernel
    If an additional mod is installed, make sure it's unrelated, and mention it
    Make sure the issue wasn't discussed earlier in the threads
    Share a log of the error with Logcat for example

    Also thanks to:
    Olivier
    Sjll
    The LineageOS Team
    The CyanogenMod Team
    Everyone involved in working and testing

    XDA:DevDB Information
    Lineage 19.1 for Xperia XZ2 Compact, ROM for the Xperia XZ2 Compact

    Contributors

    dtrunk90, Sjll
    Source Code: https://github.com/LineageOS

    Donation
    https://paypal.me/dtrunk90

    ROM OS Version: Android 12L
    ROM Kernel: Linux 4.9
    ROM Firmware Required: Official Android 10.0 firmware
    Based On: LineageOS

    Version Information
    Status:
    Stable

    Created 2022-05-05
    Last Updated 2022-06-17
    4
    Thanks Dtrunk90 and Lineageos for support our XZ2C device! :)

    I know that in principle I would have to do a clean install to switch from 18.1 to 19.1 rom, but since I have a lot of applications ( 96 piece ) and gmail accounts ( 3 piece ) and email address settings ( 6 ) on my phone, I tried to make it dirty for the first time. A refresh from 18.1 to 19.1, saying if I fail I will do it from the ground up.
    BUT, it worked without any serious error at first try. The process if someone is interested in:

    - Downloaded everything, and put they to my adb folder. The los.zip, the los.recovery.img, and gapps.12.1-arm64.zip ;
    - Booted phone to fastboot mode ;
    - In fastboot " fastboot flash boot lineage-19.1-20220617-recovery-xz2c.img " ;
    - Plug uff USB, then rebooted into recovery with key combo ;
    - In recovery if I choosed the upgrade from adb ( sideloads ) I've got error message, something like: " los recovery error package is for product xz2c but excepted 8324... "
    - after that, In the recovery I enabled adb ;
    - then from pc " adb reboot sideload " ;
    - after it " adb sideload lineage-19.1-20220617-nightly-xz2c-signed.zip " ; <- it went perfectly now
    - rebooted to recovery from recovery ;
    - then " adb sideload MindTheGapps-12.1.0-arm64-20220605.zip " ;
    - rebooted phone once ;
    - made patched magisk boot img file with magisk app
    - rebooted to fastboot, then flash patched magisk boot img ;

    All of my programs, settings, passwords, mail accounts, are remained as they was. What I've looked at so far is all working. The rooting process still good. My Telekom and Bank applications could still hided from they root detection. And what surprised me was, that the poweramp equalizer also works properly, although on my other " gaming " phone on an xperia x compact ( kugo ) also under lineage os 19.1 i can't work it at all. And here is perfect. ( At least in addition to spotify ).

    Thanks again!

    Edit: My phone is a H8324 ( DualSim , EU version )
    4
    Official builds are now available!

    In order to switch from unofficial to official builds a clean flash is required. Please refer to the official installation guide on how to clean flash properly.
    3
    Hi

    I'm looking to flash my phone as I've run into the Stock issue where the secondary mic stops working (annoying.. happened after a factory reset).

    Anyhoo..

    I'm weighing up between Official 18 and Unofficial 19. I saw the Sony camera doesn't work with Unofficial 18. Doe it work with 19?

    Thanks!
    Only as a magisk module but it's not the stock version camera but an updated apk. Check xperiance at gitlab.

    I would suggest waiting for the official 19.1 builds. Everything is in place, just some stuff needs to be merged from someone with write privileges to those repositories.
    3
    Does it support VoLTE and/or VoWiFi for Europe carriers ? For example T-Mobile PL ?
    Or I have to add IMS configs by myself ?
    Yes, orange, play, telekom and many others got added here: https://review.lineageos.org/c/LineageOS/android_device_sony_tama-common/+/327624
    But better wait for the build of tomorrow since SonyOpenTelephony isn't working on latest build right now.