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

[ROM] LineageOS 17.1/18.1 UNOFFICIAL - (Update: 2021-09-18)

Shall F-Droid be included in the ROM(s)?


  • Total voters
    77
Search This thread

Flamefire

Senior Member
Jul 26, 2013
110
167
Sony Xperia XZ1 Compact
Im confused so u continue with updating the security patches every month correct ?
Im confused about the 18.1 u also only update it with securitypatches or also other stuf like making stable and fixing problems orwhatnot ?
I'm using an XZ1C with 17.1 myself and am keeping that updated as much as possible. This includes security patches and kernel patches and updates. I also included some stuff I need for myself (e.g. the SafetyNet fix w/o Magisk to use GooglePay) But I'm not really doing any development, e.g. adding new features beyond that.
What I do for 17.1 I also add to 18.1 but I have no way to test that myself as I only have that one device, hence the disclaimer at the top. Adding stuff or fixing bugs in 18.1 is hence to dangerous for you guys, as I won't know if that bricks your phones. So I really only add what I tested in 17.1 and assume to be fine in 18.1

TLDR: 99.9% security patches only. The ROM is already stable enough thanks to the original authors.
 
Hello, i'm a new owner of the xz1 compact... My phone is the japanese versione so-02k (it cost much less then global one) and I tun Android 9. I read that unlocking the bootloader to flash a custom rom or anything else will erase the TA partition and losing the DRM keys will compromise some features like the camera or the audio driver/software. In the features of this rom it's listed the stock camera for the 17.1 version only, I wondered if also the other stuff that will break by the bootloader unlocking work in this rom. Thanks for the answer and thanks for the rom !
 

jmbattle

Member
Jul 3, 2015
11
2
@Flamefire

Many thanks for updating this rom!

I recently bought an unused XZ1C after several years with the Samsung S4 Mini.
The S4 Mini suffered a cracked screen in a recent fall, so it was time to retire this little beast and transition back to Sony (my first smartphone was an Xperia Ray!).

Earlier today I visited my provider to change some contract details, and am now on a cheaper plan with a nanosim (previously used a microsim in the S4 Mini), so the XZ1C is now my daily driver. I've not experienced any issues so far, and stability/speed feels great.

Thanks again!
 

mstrnemo

Senior Member
Feb 1, 2021
129
14
Hello, i'm a new owner of the xz1 compact... My phone is the japanese versione so-02k (it cost much less then global one) and I tun Android 9. I read that unlocking the bootloader to flash a custom rom or anything else will erase the TA partition and losing the DRM keys will compromise some features like the camera or the audio driver/software. In the features of this rom it's listed the stock camera for the 17.1 version only, I wondered if also the other stuff that will break by the bootloader unlocking work in this rom. Thanks for the answer and thanks for the rom !

There is a way to back up the ta partition but is pretty advanced stuf atleast thats how i saw it might as wel been in chinese didnt understand anything hahaha

u dont have much to worry about forexample in android 11 u cant have a sony camera app so u will get a alternative as for the others u mention not really that i found everything works fine with custom roms as far as i can tell.
 

Dean F

Senior Member
Sep 12, 2016
170
80
Taipei
Sony Xperia XZ1 Compact
Hello, i'm a new owner of the xz1 compact... My phone is the japanese versione so-02k (it cost much less then global one) and I tun Android 9. I read that unlocking the bootloader to flash a custom rom or anything else will erase the TA partition and losing the DRM keys will compromise some features like the camera or the audio driver/software. In the features of this rom it's listed the stock camera for the 17.1 version only, I wondered if also the other stuff that will break by the bootloader unlocking work in this rom. Thanks for the answer and thanks for the rom !
Docomo's SO-02K cannot be unlocked or rooted.

Btw, where did you buy it? And was is actually brand new? (some shady dealers seel refurbished and brand new)
 
Last edited:

babastutz

Member
Dec 27, 2010
17
2
Hey! Thank you for keeping this alive :)

I tried to install the 18.1 one. I currently have TWRP 3.5.2 (last update) and my phone runs the 18.1 version from January 20th.

I downloaded the 18.1 zip + md5 but always get the "Zip signature verification failed!" I tried to download the files many times, always with the same result. Any ideas ?

Since only the 17.1 version is tested, is there a way to dirty flash 17.1 over 18.1 without too much risk ?

Thank you ! (y)
 

[email protected]

Senior Member
Jul 26, 2019
64
57
Hey! Thank you for keeping this alive :)

I tried to install the 18.1 one. I currently have TWRP 3.5.2 (last update) and my phone runs the 18.1 version from January 20th.

I downloaded the 18.1 zip + md5 but always get the "Zip signature verification failed!" I tried to download the files many times, always with the same result. Any ideas ?

Since only the 17.1 version is tested, is there a way to dirty flash 17.1 over 18.1 without too much risk ?

Thank you ! (y)
Wouldn't recommend downgrading by dirty-flashing.

I can confirm 18.1 (including the latest builds) actually works fine.
 

banana(x)

Member
Jul 4, 2021
8
1
As far as I know, the ZIP verification in TWRP is not related to your download verification md5-file but to the keys with which the ZIP package has been signed.
So, in twrp, just deactivate the ZIP verification check box.
Hey! Thank you for keeping this alive :)

I tried to install the 18.1 one. I currently have TWRP 3.5.2 (last update) and my phone runs the 18.1 version from January 20th.

I downloaded the 18.1 zip + md5 but always get the "Zip signature verification failed!" I tried to download the files many times, always with the same result. Any ideas ?

Since only the 17.1 version is tested, is there a way to dirty flash 17.1 over 18.1 without too much risk ?

Thank you ! (y)
As far as I know, the ZIP verification in TWRP is not related to your download verification md5-file but to the keys with which the ZIP package has been signed.
So, in twrp, just deactivate the ZIP verification check box.
 

[email protected]

Senior Member
Jul 26, 2019
64
57
@Flamefire interesting detail: My friend used to run your first 17.1 build without issues and then switched from some german provider to a swiss one. That resulted in a huge increase in energy drain. 8 hours in airplane mode took 30% of battery at least.

Upgrading to later 17.1 builds with EAS kernel made no difference. Then I removed the SIM card and voila - energy drain back to normal. Reinserting the SIM card made it again drain much energy, the phones back usually being somewhat warm.

Thought some process might be using a lot of CPU resources, but running top as root did not reveal any.

Eventually I flashed your latest 18.1 build over and the issue was gone at all. Now, with the same SIM card, battery life is extraordinary well.
 
Last edited:

babastutz

Member
Dec 27, 2010
17
2
As far as I know, the ZIP verification in TWRP is not related to your download verification md5-file but to the keys with which the ZIP package has been signed.
So, in twrp, just deactivate the ZIP verification check box.

As far as I know, the ZIP verification in TWRP is not related to your download verification md5-file but to the keys with which the ZIP package has been signed.
So, in twrp, just deactivate the ZIP verification check box.
Hey thank you for your answer. I hear you but in the 1st post, it says :
Put the zip file of the ROM on you sdcard or internal store and boot into recovery.
I suggest to use modpunks TWRP recovery. Make sure you select Zip signature verification. This will make sure the zip file has not been altered!
I just have to ignore that ?
 

banana(x)

Member
Jul 4, 2021
8
1
Hey thank you for your answer. I hear you but in the 1st post, it says :

I just have to ignore that ?
At least you could try ;-)
I did remove the check myself too since I had the same issues times ago and found a thread in which it was said that twrp checks the for test keys but the ZIP may not be signed with test keys but with dev keys... @Flamefire maybe you can clarify that and correct me if I am wrong :)
 

banana(x)

Member
Jul 4, 2021
8
1
At least you could try ;-)
I did remove the check myself too since I had the same issues times ago and found a thread in which it was said that twrp checks the for test keys but the ZIP may not be signed with test keys but with dev keys... @Flamefire maybe you can clarify that and correct me if I am wrong :)
I just read the text again and to me it still makes sense as you are using official TWRP and not modpunks?!?
At least you could try ;-)
I did remove the check myself too since I had the same issues times ago and found a thread in which it was said that twrp checks the for test keys but the ZIP may not be signed with test keys but with dev keys... @Flamefire maybe you can clarify that and correct me if I am wrong :)
Also, after reading the header again, it recommends modpunks TWRP which may be modified/adapted to develeopers keys... Anyway, if you checked that downloaded md5sum fits to ZIP md5 calculation, it should be save to install that :)
 
There is a way to back up the ta partition but is pretty advanced stuf atleast thats how i saw it might as wel been in chinese didnt understand anything hahaha

u dont have much to worry about forexample in android 11 u cant have a sony camera app so u will get a alternative as for the others u mention not really that i found everything works fine with custom roms as far as i can tell.
Can you link some guide about it ? I'm not a noob... Anyway, is not there a sony camera porting for custom rom ?
 
Docomo's SO-02K cannot be unlocked or rooted.

Btw, where did you buy it? And was is actually brand new? (some shady dealers seel refurbished and brand new)
I bought it brand new on ebay for 170€ and it was new or if they refurbished the phone, they did a great work (I read a post that said new brand phone are refurbished or they buy old phones or pieces with a low price and then they rebuild the phones to sell them like news on ali express or ebay).

Anyway, the phone was sim unlocked but the bootloader unlock allowed status is set to NO. I'm looking a way for unlock the bootloader and then put an updated rom on it. Actually I downgraded the firmware with newflasher and if I'll reach my goal I'll post a guide here.
 

Flamefire

Senior Member
Jul 26, 2013
110
167
Sony Xperia XZ1 Compact
At least you could try ;-)
I did remove the check myself too since I had the same issues times ago and found a thread in which it was said that twrp checks the for test keys but the ZIP may not be signed with test keys but with dev keys... @Flamefire maybe you can clarify that and correct me if I am wrong :)
Yeah true. Didn't really take care of the zip signing stuff yet.

When you copy the zip and md5sum files to the phone TWRP will verify the integrity using that at least by default (not the zip signature which is for authenticity)
So yes, just disable the zip sig verification for now
 

babastutz

Member
Dec 27, 2010
17
2
Yeah true. Didn't really take care of the zip signing stuff yet.

When you copy the zip and md5sum files to the phone TWRP will verify the integrity using that at least by default (not the zip signature which is for authenticity)
So yes, just disable the zip sig verification for now
Great thank you for your answer. It did alright. Perfect !
 
Anyway, the phone was sim unlocked but the bootloader unlock allowed status is set to NO. I'm looking a way for unlock the bootloader and then put an updated rom on it. Actually I downgraded the firmware with newflasher and if I'll reach my goal I'll post a guide here.
Please will you post your experience, even if it doesn't work? I have a new Z3 Compact with Bootloader unlock allowed showing No. It would be great to know whether or not it's worth trying to downgrade the firmware on that device. Thanks
 
Please will you post your experience, even if it doesn't work? I have a new Z3 Compact with Bootloader unlock allowed showing No. It would be great to know whether or not it's worth trying to downgrade the firmware on that device. Thanks
changing the stock firmware is allowed even if the bootloader is locked because you do that from the sony flash mode instead of the fastboot. In the case oh the xz1 compact when you enter in the fastboot mode the blue light led will turn on, if you enter in the sony flash mode the green light led will turn on
 
changing the stock firmware is allowed even if the bootloader is locked because you do that from the sony flash mode instead of the fastboot. In the case oh the xz1 compact when you enter in the fastboot mode the blue light led will turn on, if you enter in the sony flash mode the green light led will turn on
Thanks. I've flashed a couple of other devices using FlashTool. What I'm interested in is whether the downgraded firmware will allow the bootloader to be unlocked. I suspect not, but ....
 
Thanks. I've flashed a couple of other devices using FlashTool. What I'm interested in is whether the downgraded firmware will allow the bootloader to be unlocked. I suspect not, but ....
Downgrading the firmware allow you to put Android 8 into the phone to exploit the security flaw and get rooting. With the root you can backup the TA partition that hold DRM keys, but downgrading the firmware will overwrite the TA partition... Need to found out a way to restore DRM kays and I was reading this article https://www.xda-developers.com/restore-lost-functionality-unlocked-xperia/
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    @Flamefire Can you explain why you changed our device's build description to make it look like a Google Pixel device?
    To pass safetynet.

    And the other question: using clang 11, especially for the kernel
    2
    In my 18.1 i see screen record,i see restart option and open camera work fine. I've tried both and prefer 18.1. With magisk,on 18.1,work perfect sony album and sony music,but not on 17.1!
    1
    What benefits do you see for 18.1 ?
    - no sony camera app
    - no screen record
    - no restart options
    - limited sharing options
    Just camera, in my case. It is enough. But I have a partly broken second xz1c for 18.1, just for testing, and battery is clearly better.
    1
    Currently working on an attempt for a major performance improvement and Bugfix on the 17.1 issue (under the hood, found some potential security issues)
    :)
  • 26
    LineageOS 17.1/18.1 for Sony Xperia XZ1 Compact

    logo.png


    RELEASE

    This is an alternative ROM for the Sony Xperia XZ1 Compact.

    Creating this to honor the great work of modpunk and derf elot from https://forum.xda-developers.com/t/rom-lineageos-18-1-unofficial-2-0-update-2021-01-20.4047763/ which seems to be discontinued. Posting an own thread to keep the latest versions visible, I'm NOT claiming authorship over the ROM.
    I basically just build the ROM using the latest changes from upstream LineageOS/Google and kernel updates (usually incorporated by derf elot ) See my post.

    FEATURES
    • Signed with dev keys
    • EAS kernel
    • Passes SafetyNet out of the box (thanks Rooted_Ansh, Havoc-OS Team and kdrag0n)
    • Seedvault (Video)
    • IMS support (thanks to Rooted_Ansh and also Shujath)
    • 17.1 has stock Sony camera (not possible on 18.1)

    DOWNLOAD

    You can download the latest release here.
    HINT: Download both the ZIP and md5sum file so TWRP can check the consistency of the upload/download.
    REQUIRED FIRMWARE: 47.2.A.11.228

    IMPORTANT:
    I only test the 17.1 releases myself. The 18.1 are build from mostly the same sources and hopefully work.

    INSTALLATION

    Put the zip file of the ROM on you sdcard or internal store and boot into recovery.
    I suggest to use modpunks TWRP recovery. Again: Don't forget the md5sum file!
    TWRP 3.3.1-0 by modpunk for LineageOS 17.1
    TWPR 3.5.0-0 by derf elot for LineageOS 18.1
    Or use the latest TWRP from https://twrp.me/sony/sonyxperiaxz1compact.html.

    I heavily recommend to make a full backup before any installation so you can go back in case of issues. Flashing an older ROM usually helps to recover bootloops etc.

    KNOWN ISSUES
    • UnifiedNlp doesn't work with LineageOS 18.1 yet
    • Spell checking doesn't switch if you change keyboards
    SUPPORT

    There is NONE. If you have any issues or question ask in the thread so maybe someone else knows the answer.
    I'm just providing the ROM (Lineage 17.1 variant) I use myself for others to try to and just build the Lineage 18.1 ROM without any chance to actually test it myself.
    If you prefer to use a more well-tested Android 11 ROM, I suggest to look at Havoc-OS.
    Contributions to the sources are welcome and likely get integrated into the next release.

    Contributors
    modpunk, derf elot, Rooted_Ansh, Flamefire
    Source Code: https://github.com/Flamefire/android_device_sony_lilac, Original: https://github.com/whatawurst/

    If you want to buy me a coffee/beer, I'll appreciate it but it is not necessary.
    Also please consider donating to the original authors too or to local charities as requested by @modpunk

    ROM OS Version: Android 10/11
    ROM Kernel: Linux 4.x
    Based On: LineageOS

    Version Information
    Status:
    Stable
    Stable Release Date: 2021-07-20
    9
    CHANGELOG

    2021-09-18

    • September security patches
    • Include some more security patches from AOSP
    • Clang 11 for LOS 17.1 version (same as 18.1, improved optimizations)
    • Misc bugfixes backported from Android 11 to Android 10
    • Kernel 4.4.283
    2021-08-11
    • August security patches
    • Fix bug with switch 3G->4G in XperiaParts not working on slow boot
    • Include some more security patches from AOSP
    • Kernel 4.4.279
    2021-07-20
    • July security patches
    • Kernel 4.4.275
    2021-07-03
    • June security patches
    • Update to Linux Kernel 4.4.272
    • Updated APNs
    6
    Updated with the July security patches.
    Note: AndroidFileHost was quite quirky today, so use the md5sum files to verify the integrity of the files
    6
    "Major performance improvement" sounds great!

    This would be for both 17.1 and 18.1, yes?

    By the way, would it be worthwhile donating a device to allow you to develop and test both 17.1 and 18.1 simultaneously?
    No only 17.1. Basically building with the same compiler as 18.1 which has better optimizations (3 versions difference) and found a few bugs through that...

    This is a kind offer but no. I don't really have time to do much dev on this. When building the 17.1 I use it myself and see that works. Then I provide this here for others to benefit too. The 18.1 is just a bonus as changes to 17.1 usually work on 18.1. But as mentioned I don't have time for dev or testing on something I don't use myself anyway :)
    6
    Im confused so u continue with updating the security patches every month correct ?
    Im confused about the 18.1 u also only update it with securitypatches or also other stuf like making stable and fixing problems orwhatnot ?
    I'm using an XZ1C with 17.1 myself and am keeping that updated as much as possible. This includes security patches and kernel patches and updates. I also included some stuff I need for myself (e.g. the SafetyNet fix w/o Magisk to use GooglePay) But I'm not really doing any development, e.g. adding new features beyond that.
    What I do for 17.1 I also add to 18.1 but I have no way to test that myself as I only have that one device, hence the disclaimer at the top. Adding stuff or fixing bugs in 18.1 is hence to dangerous for you guys, as I won't know if that bricks your phones. So I really only add what I tested in 17.1 and assume to be fine in 18.1

    TLDR: 99.9% security patches only. The ROM is already stable enough thanks to the original authors.