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

[ROM] LineageOS 17.1/18.1 UNOFFICIAL - (Update: 2021-12-19)

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


  • Total voters
    122
Search This thread

Flamefire

Senior Member
Jul 26, 2013
177
322
Sony Xperia XZ1 Compact
Just a quick update: November build is working! Currently just working on some patches like updated APNs and the usual safetynet fix before I push it out. And I want to make sure it works flashing over the October build.
It will have the fix for IMS for the 17.1 build.
So won't be long. Sorry for the delay, currently a bit more busy due to health issues...
 

rez78

Senior Member
Nov 16, 2017
111
22
Just a quick update: November build is working! Currently just working on some patches like updated APNs and the usual safetynet fix before I push it out. And I want to make sure it works flashing over the October build.
It will have the fix for IMS for the 17.1 build.
So won't be long. Sorry for the delay, currently a bit more busy due to health issues
Great! Please give me istructions to make a donation for your work! :-D
 

Flamefire

Senior Member
Jul 26, 2013
177
322
Sony Xperia XZ1 Compact
Currently uploading the new builds. Gonna take a bit...
The 18.1 version seemingly works, passes SafetyNet etc. but as usual, I don't really test that version although I can now say that it flashes clean over the previous release and boots fine. Thanks to the test phone by @landsome
I tested the 17.1 version the same way: Flash over previous release, boot and SafetyNet is working. However I'll flash that on my own phone tomorrow and test it a bit more "in production". Hence you'll find that in the "Testing Only" folder on AFH until I verified it a bit more. No time left for that today but if you want to give it a try feel free.
As mentioned I fixed the IMS bug on 17.1 and on my phone (October build with only that patch applied) VoLTE and VoWIFI work fine.

As for GPS: The XZ1C has known hardware issues with the GPS antenna. The ROM if flashed correctly works ok although I noticed that GPS is shaky too. Some users reported that squeezing the left edges often helps...

I'll tackle the HD audio stuff later. That needs some more work to do it properly.

Donations: See the initial post and my profile (About section). Always welcome and keeps me motivated to put in a bit of extra effort :) Please note that I often integrate changes from others, like modpunk/derfelot, linckandrea etc. On Github you can usually see that as "authored by X, committed by Flamefire" as I try to keep the author unchanged. So others deserve credit (and donations) too.
 
Last edited:

ezdi

Senior Member
Dec 14, 2010
94
42
I feel it was one of the Ting Data profiles. It looks like it could cause a problem, but I don't see IMS on it like I thought it did.

I thought it was 310/260, but now that I look, I'm not seeing anything in the diff that would explain why it isn't getting loaded any more.

So something in my report is wrong. Sorry, I will investigate more and take notes. Or I wonder if I somehow carried over something from Sony or there's something in that zip I installed that did more than just update the file.

I had remembered correctly. Ting Data was the one I couldn't delete, but I guess it could be a hidden APN as well. The garbage APNs don't even show up after flashing that APN update.
I re-installed stock Pie, verified VoLTE worked, then reset and flashed the v17 Oct build I used before. It forced me to reboot to switch modems to the non-ims, after switching back to ims, VoLTE still didn't work until that APN update.

Saw the new Nov build. With it, VoWiFi can be enabled and works as soon as the ims modem is enabled. VoLTE still didn't work without the APN update. Still having the issue where it needs to be forced to 3G every time it loses signal.

Worth noting that, once I do have an LTE connection, incoming and outgoing calls work and it successfully hands off a VoWiFI call to VoLTE.
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
177
322
Sony Xperia XZ1 Compact
I had remembered correctly. Ting Data was the one I couldn't delete, but I guess it could be a hidden APN as well. The garbage APNs don't even show up after flashing that APN update.
I re-installed stock Pie, verified VoLTE worked, then reset and flashed the v17 Oct build I used before. It forced me to reboot to switch modems to the non-ims, after switching back to ims, VoLTE still didn't work until that APN update.

Saw the new Nov build. With it, VoWiFi can be enabled and works as soon as the ims modem is enabled. VoLTE still didn't work without the APN update. Still having the issue where it needs to be forced to 3G every time it loses signal.

Worth noting that, once I do have an LTE connection, incoming and outgoing calls work and it successfully hands off a VoWiFI call to VoLTE.
Which APN update do you exactly mean? Basically all APNs from that Google APN list you mentioned are included in the ROM. I don't understand what you mean exactly by APNs you can't delete or are "hidden". But to be honest I don't really understand that APN stuff anyway...

E.g. for your mentioned 310/260 MCC/MNC there are many APN configs: https://github.com/Flamefire/androi...da/config/telephony/apns-conf.xml#L1457-L1489
The "Ting Data" one you mentioned is there twice for some reason which I think is a bug. Maybe you have to delete it twice? Will fix that anyway for the next build.
The APN config list is there, maybe you can help me fix it or provide some information on what is "correct". E.g. the Ting Data stuff looks correct: https://help.ting.com/hc/en-us/articles/205428698-APN-setup-guide So I'm inclined to keep it.

I've noticed the issue about sometimes not being able to get a signal again, and even WiFi seems to be affected by that at times. Not sure how to exactly reproduce this and where that problem could be. Might be deep in Android.
 
Last edited:
  • Like
Reactions: sieghartRM

jmbattle

Member
Jul 3, 2015
18
3
Just a quick update: November build is working! Currently just working on some patches like updated APNs and the usual safetynet fix before I push it out. And I want to make sure it works flashing over the October build.
It will have the fix for IMS for the 17.1 build.
So won't be long. Sorry for the delay, currently a bit more busy due to health issues...
Thanks for updating us on your progress. Are you able to share why the previous builds were unsuccessful, and the steps you had to take to get it working correctly?

I'm very grateful for your continued work on this brilliant little device - keep up the good work!

Cheers,
James
x

ps. Sorry to read about your health issues. I hope you can stay strong, but please don't push yourself too much, or worry about delays. We are just happy that someone is continuing to update LOS for our favourite phone.
 

jmbattle

Member
Jul 3, 2015
18
3
By the way, what do "Fix/enhance wifi display" and "fix some power hints" mean in the November changelog?
 

Flamefire

Senior Member
Jul 26, 2013
177
322
Sony Xperia XZ1 Compact
Thanks for updating us on your progress. Are you able to share why the previous builds were unsuccessful, and the steps you had to take to get it working correctly?
Basically a failed cherry-pick of the WFD changes from 18.1 to 17.1 branch. It simply does not apply there and leads to bootloops for reasons I didn't further investigate. As derfelot confirmed that those are not required for 17.1 I stopped there.
The other issue was caused by my patches for SafetyNet which lead to a mismatch of the security dates leading to the system unable to decrypt data which made it stop booting.
By the way, what do "Fix/enhance wifi display" and "fix some power hints" mean in the November changelog?
On 18.1 there were issues with WFD on yoshino-phones which derfelot fixed. Also the EAS sheduler relies on "power hints" to know how much power for which information is required. Some of those were decimal instead of hexadecimal, i.e. to high maybe leading to slightly higher battery consumption.
 

susetoyix

Member
Aug 17, 2019
14
2
Hello there. I have a quite unique request. I'm still hoping to still use my phone.

LineageOS by Flamefire 2021-10-19
TWRP latest

1. My phone's LCD ribbon cable got ripped at the middle.
2. I still have adb shell with root (Magisk), recovery and unlocked bootloader. Phone is encrypted and I'm using pattern lock
3. Using scrcpy I found that the phone is stuck on the LOS boot logo loop.
4. Further investigation shows a lot of stacktraces, exited pid's and errors showing on dmesg. Probably because of the missing LCD I have already removed.

Can I make changes to the system to ignore the missing LCD?

I did not anticipate this at all. I thought I was prepared to lose the LCD. Keeping my adb keys backed up.

I'm looking for a replacement LCD as well if there is no other choice.
 

landsome

Senior Member
May 4, 2015
443
114
I have just discovered that the newest version of modded Gcam Go (by Darkness, available on celsoazevedo) works pretty well with LOS17.1 and - judging by my XZ2c - probably with 18.1 as well. So if I decide to make the jump to 18.1 on XZ1c, are there still clear benefits?

I remember battery was palpably better on 18 (and that's important to me), but what about the rest of the benefits? Conversely, any things I will miss (except for the stock camera).
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
177
322
Sony Xperia XZ1 Compact
I remember battery was palpably better on 18 (and that's important to me), but what about the rest of the benefits? Conversely, any things I will miss (except for the stock camera).
Only reason I stick to 17.1 is the stock cam. Besides that newer android should be better in any case and from mod site specific to my releases both are as far as possible the same.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    The value is not persistent, though, and resets after reboot. @Flamefire do you have an idea how to set it at boot time? (I used to run a script as root, but since my banking app disallows root I don't use Magisk anymore).
    I'm adding a quick settings tile for that. This will basically toggle between normal brightness and reduced brightness (basically scaling the value of the brightness slider)
    I found Android 12 has a similar setting called "Extra Dim" which basically applies a filter to reduce brightness. So I'm reusing their icon and calling it "Ultra-Dim" ;-) If you got a better name, tell me. Will be in the next release together with a self-written LED driver that uses the whole range of the LCD brightness, i.e. it can go lower than stock even without that setting. But not as much as Ultra-Dim does (which likely also saves more battery than the "Extra Dim" from A12)
    4
    Getting the device officially supported comes with a few rules. Eg a commitment to support it for a while and not messing with stuff related to eg safetynet.
    As I initially wrote I can't promise how long I'll be able to support it and for me being able to use GPay is a must as I guess is for quite some others too. Official LOS will never pass safetynet without extra tools. And I think they will only build one version anyway... So likely only 18.1. Also some of my patches to fix a few tricky things will likely also not be accepted.
    So just having the In-build updater and the entry in some list isn't really worth giving up the freedom (and features) I have now ;)
    So yeah, manual download and install via twrp. If you flashed twrp then this is really easy. :)
    4
    The shasum - a 256 I calculate is:
    3d3dc994bb6737d6f91323f5b0929ca9ff831ce5e52d95dbade59283eef2d69b

    The shasum from the checksum file is:
    fcd5329a5f5ba87104657d4cd65b2544f6d6b8ed59d1b9ec8db3f330d557e6c5
    Must have uploaded the wrong checksum file. the 3d3d checksum is correct. Reuploaded the checksum file. Thanks for letting me know!

    Edit: Some more good news: Seemingly the issue that the phone is unable to reconnect to any network after being without connection for a while seems to be fixed. At least it didn't happen for me now in a situation it usually did. Not exactly sure what the exact cause was as I changed a few related things in search of this bug, but anyway: Fixed :cool:
    4
    Let us know if you manage to work this into the ROM. It seems weird to me that you have a maximum setting that also changes the lower value, since everything is proportional to the max value. Maybe you can set currentStepPercent to go over 100%, or so some other hack so the whole range can be set by the slider. (If I understand this correctly.)
    Checked everything and I don't really see a way. It is quite complicated already. What I found: `echo 1 > /sys/class/leds/wled/brightness` can set the brightness lower than android, which for some reason uses 34 as the minimum but I can't find where this comes from. The config files and everything look good.
    This is still brighter than with fs_curr_ua=5000, but at least doesn't limit the max brightness. And no, fs_curr_ua is a hardware maximum. So no way to turn it to 11 ;) I see if I can add an option to turn down overall brightness, but I don't think it is a good idea.
    Also, I actually found a bug I think, because the reader is also activated on pressing the power button to turn OFF the screen. Just before turning off the display it activates the fingerprint reader, seeing by all kinds of messages from libfingerprint_core.
    I think this is caused by the setting which is left to "on". I guess one of the potential issues of having this enabled (and in the kernel) could be that locking the phone with the power button could unlock it again. Another reason not to do that...
    3
    Sorry to bother again, but I found this regarding the Fingerprint Wake and Unlock issue:

    So, this can be implemented by a change in the SystemUI apk and recompile.
    Is it possible you do this, @Flamefire, since modpunk doesn't support 17.1 anymore?

    EDIT: Since I just realised you said you like the way it works now and this is the build you use on a daily basis, is it possible you create a setting to adjust this behaviour for ourselves?
    I still don't understand your issue. Touching the fingerprint sensor while the lockscreen is shown will unlock the phone. This totally makes sense to me.
    For some reason you want to see the lockscreen without unlocking the phone. So why doesn't one of the proposed alternatives work for you? E.g. using the camera button or a non-registered finger or not touching the sensor "to long".

    I don't really understand the mentioned setting: "Should we listen for fingerprints when the screen is off?"
    If I touch the sensor with the screen off nothing happens. However I guess it makes sense to disable this setting anyway. I just doubt it will change anything as it seemingly only applies when the screen is off, not when it already is on, i.e. you already pressed the power button. Will check though...

    Edit: I checked back with stock, specifically "G8441_Customized DE_47.2.A.11.228-R3C". If I press the power button with a registered finger the phone basically immediately unlocks. It does not (and shows the clock) if I use my fingernail or press the power button and lift the finger fast enough. Short pressing the camera button does nothing, long pressing starts the camera. I didn't find any setting to change that.
  • 39
    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.

    For ease of use I suggest to flash this recovery (only required once):
    1. Boot in Fastboot mode: Hold "Volume Up" while connecting the USB cable to phone and PC
    2. Flash TWRP by running this on the PC: fastboot flash recovery twrp-3.3.1-0-lilac-android10-1.img
      (adjust the filename if necessary)
    3. From now you can boot TWRP by turning on the phone with "Volume Down" + Power
    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 much testing.
    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, linckandrea
    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

    Special thanks to landsome for donating a test phone for bug hunting and development.

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

    Version Information
    Status:
    Stable
    Stable Release Date: 2021-12-19
    16
    CHANGELOG


    2021-12-19

    • December security patches
    • Kernel 4.4.295
    • QCom driver updates
    • Fix some permission issues
    • Reset phone ID to XZ1C
    2021-11-29
    • November security patches
    • Kernel 4.4.291
    • Fix IMS on 17.1
    • Fix/enhance Wifi-Display
    • Fix some power hints
    • Update APNs
    2021-10-19
    • October security patches
    • Kernel 4.4.288
    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
    12
    Updates are out!
    Gabeldorsche seemingly works on my test phone, so maybe some upstream change already fixed it.

    Anyway, wish you all an (early) Merry Christmas and Happy New Year!
    11
    Currently uploading the new builds. Gonna take a bit...
    The 18.1 version seemingly works, passes SafetyNet etc. but as usual, I don't really test that version although I can now say that it flashes clean over the previous release and boots fine. Thanks to the test phone by @landsome
    I tested the 17.1 version the same way: Flash over previous release, boot and SafetyNet is working. However I'll flash that on my own phone tomorrow and test it a bit more "in production". Hence you'll find that in the "Testing Only" folder on AFH until I verified it a bit more. No time left for that today but if you want to give it a try feel free.
    As mentioned I fixed the IMS bug on 17.1 and on my phone (October build with only that patch applied) VoLTE and VoWIFI work fine.

    As for GPS: The XZ1C has known hardware issues with the GPS antenna. The ROM if flashed correctly works ok although I noticed that GPS is shaky too. Some users reported that squeezing the left edges often helps...

    I'll tackle the HD audio stuff later. That needs some more work to do it properly.

    Donations: See the initial post and my profile (About section). Always welcome and keeps me motivated to put in a bit of extra effort :) Please note that I often integrate changes from others, like modpunk/derfelot, linckandrea etc. On Github you can usually see that as "authored by X, committed by Flamefire" as I try to keep the author unchanged. So others deserve credit (and donations) too.
    9
    I'm writing this from my phone updated to 17.1 November build. Hence I consider it stable :)

    December update will be there mid December, I'd say. Not sure if I manage to fix HD audio till then

    So far, wish you a nice Advent season!