[ROM] LineageOS 17/18/19 UNOFFICIAL - (Update: 2023-01-21)

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

  • Total voters
Search This thread


Senior Member
Nov 16, 2007
A strange network / SIM card issue: Switching to a German SIM card I've used without problem just 2-3 months ago, the phone shows no service. If I attempt to manually search for a network, I get the error:

"Couldn't find networks. Try again."

The German SIM works in another Android device just fine. I've verified the APN is correct. Switching back to the previous (Spanish) SIM I had in the device, it also works fine. So it's just this particular SIM card that is suddenly not able to connect or find any networks.

I tried enabling the IMS Features which switched to a Germany-specific modem (and rebooted), but this didn't help.

Anyone know why this might be happening? Do I need to try other modems?

Update: Appears to be working after first switching to 2G preferred.
Last edited:


Jun 2, 2015

I have problems with BOTH latest versions of 17.1 and 18.1 (both latest: 20220929)
With 18.1 (installed with TWRP 3.5) I get it started and installed all my apps but when I start "Telegram" for instance, the app exits immediately. Also it tells me that "Google App" was killed many times in a row by a message.
So I tried oout 17.1 (installed with TWRP 3.3.1) but this is a total mess. After installation it doesn't even boot up and only restarts after the Sony logo and goes back to the recovery. First it showd that the checksum verification failed, so I installed it without the md5sum file but with the same result 😐 Also pretty weird is that the TWRP version doesn't remember the checkboxes I set. It wants to install its TWRP app and also always shows the warning message on the start screen.

Anyone of you have a hint, what to do in this case?
Last edited:


New member
Nov 14, 2022
Update: Appears to be working after first switching to 2G preferred.

Facing similiar connectivity issues, albeit with the LineageOS 20 release.

Has this been a one time fix for you and still works? I assume afterwards it could be set back to either 3/4/5G or LTE without crapping itself again, as 2G does not sound particularly reasonable for every day use.


Senior Member
Jul 26, 2013
Sony Xperia XZ1 Compact
if you do anymore apn updates to the rom. here is a new H2O wireless apn settings
Where do they come from? In the November builds I'm including many new APNs from LOS upstream but there they are different.

November updates are out: Again on GDrive as AFH doesn't work for uploading

And yes the network stuff is still sometimes an issue and might not be fixable. Hence the workaround to switch to 2G/3G and back to LTE.
Last edited:


Senior Member
Jul 24, 2015
Where do they come from? In the November builds I'm including many new APNs from LOS upstream but there they are different.

November updates are out: Again on GDrive as AFH doesn't work for uploading

And yes the network stuff is still sometimes an issue and might not be fixable. Hence the workaround to switch to 2G/3G and back to LTE.
Thanks for the update! The november security patch is actually really important, as it fixes a critical vulnerability to bypass the lockscreen on Android 10+ (read more here: https://techcrunch.com/2022/11/14/android-lock-screen-bypass-google-pixel/)
  • Like
Reactions: moofesr


Senior Member
Sep 30, 2017
Where do they come from? In the November builds I'm including many new APNs from LOS upstream but there they are different.

November updates are out: Again on GDrive as AFH doesn't work for uploading

And yes the network stuff is still sometimes an issue and might not be fixable. Hence the workaround to switch to 2G/3G and back to LTE.
east coast usa
i got those settings from a sim card i was using on a samsung s10e before selling it.


Senior Member
Feb 7, 2006
I'm running 18 for about a year now, and just updated to november update without issues. I have never had any connectivity issues. I do notice it connects slower after a reboot, like 15 seconds or so, but when it's there it just works fine. When I make a call while driving, it just roams along all cells without loosing connectivity. I have a Dutch 4G simcard (5G but XZ1c doesn't have that).

I have more issues with WiFi though, when I walk through the house and roam between different access points, it regularly refuses to reconnect. After a minute or two or so it will, but disabling wifi and re-enabling it reconnects immediately. My stock unmodded xz1c (or any other devices) don't have that issue.

I'm still so grateful for this rom, I simply wouldn't know which modern phone could replace the xz1c. I refuse a large phone...
  • Like
Reactions: gladykov


Senior Member
Feb 13, 2010
Is the November update ready? I see the thread subject has changed, but I don't see a git tag yet.


Senior Member
Nov 16, 2017
In latest build 18.1 when i try to explore "Android Data" folder on sd card i don't found classic apps folders,but strange files. It's normal?


Jan 30, 2014
Installed the November build (did a clean re-install starting from stock) and it works a charm. Thanks as ever for your work Flamefire


Senior Member
Dec 12, 2015
Whaley Bridge
Sony Xperia Z3 Compact
Morning @Flamefire

I've been trying to make a build based on your `lineage-18.1` branch. Building from the `v18.1-20221013` tag works fine. Building with the latest in the branch or with the `v18.1-202211115` tag fails with the following error:

FAILED: out/target/product/lilac/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml
/bin/bash -c "(rm -f out/target/product/lilac/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml ) && (python vendor/lineage/tools/custom_apns.py out/target/product/lilac/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml device/sony/yoshino-common/config/apns.xml )"
Traceback (most recent call last):
  File "vendor/lineage/tools/custom_apns.py", line 62, in <module>
  File "vendor/lineage/tools/custom_apns.py", line 50, in main
ValueError: list.remove(x): x not in list

Any ideas how I can go about fixing my build?


Top Liked Posts

  • There are no posts matching your filters.
  • 11
    January updates out. Security updates only, MicroG versios will follow in about a week when I'm back from vacation. Stay safe!
    I uploaded MicroG builds for all 3 versions, they are named e.g. lineage-19.1-20230131-MICROG instead of lineage-19.1-20230131-UNOFFICIAL but are contained in the same folder.

    As they are not compatible with each other (not sure if you can dirty-flash one over the other, at least you need to wipe system) you have to be careful to choose the correct one!
    The 2G setting is gone since 19.1 i believe on derfelot's build as well.
    As for the fingerprint it's been like this on flamefires builds for a while, dunno why, some of his changes broke that functionality because on derf's builds it's working fine.
    I can double-check why the 2G setting is gone but it looks like it was removed upstream. I see if I can patch it back.
    As for the fingerprint: This is not "broken" but working as intended: A lot of people here complained that touching the on/off button immediately unlocks the phone. Hence I decided to follow suit with upstream LOS to disable this if the fingerprint is integrated into the powerbutton and cherry-picked a change used in similar LOS devices: https://github.com/Flamefire/androi...mmit/924352c24a95959941fe5a471741528dc2d87026
    Unfortunately there isn't a user-setting to change this although I was thinking about adding one. I think that the current setting being the default makes sense also from a security perspective as unlocking the phone also enables NFC payments so doing that by accident can be a real problem.

    Anyway: I'm currently very packed with work as I'm backporting security patches to the kernel, incorporating new changes from 19.1 to 17/18.1, updating blobs to hopefully resolve the connection loss issue (has anyone observed those on 19.1?) and just got the MicroG build working on 18.1 so at least that will be there once I'm done
    I wiped all the data and did a clean install, but the system doesn't want to boot.
    You need to format the data partition, not just wipe it. It is usually possible to upgrade to a higher Android version by dirty flashing. but downgrading to a lower version usually requites you to format. The steps I usually follow are
    1. Format data partition
    2. Install the ROM
    3. Boot the system, go through first time setup, setting whatever screen lock (pattern, PIN) you had when you made the backup
    4. Boot to recovery
    5. Restore the backup

    Good luck!
    - 2G is not selectable anymore as preferred network type in Settings (I sometimes need that when I'm in the mountains)
    I found this: "Android 12 users need to go to Settings > Network & Internet > SIMs > Allow 2G"

    However I just quickly checked on the spare phone and I do still have that setting on latest 19.1, although it is more hidden than on 17.1 (which I'm using personally)

    Also switching to 2G is what I do when I have network issues (and done by the switcher service on startup). But I've seen a changeset that might help better here. Will be included in the February builds if that works.

    EDIT: wiped system, reflashed zip and OpenGapps, wiped Dalvik (or rather ART) and cache... and it fixed itself. That's bit odd.

    Wiping dalvik and cache is what I always do. Here I guess there was something on /system which shouldn't be there. Glad you could fix that! The SafetyNet fix is one of the things I do test for every update so I'd be surprised if it doesn't work.
  • 53
    LineageOS 17/18/19 for Sony Xperia XZ1 Compact



    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.

    • 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+)


    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.
    Make sure you download the right version, vanilla LineageOS is named lineage-*UNOFFICIAL-lilac.zip while the MicroG version is named lineage-*-MICROG--lilac.zip

    REQUIRED FIRMWARE: 47.2.A.11.228

    I only test the 17.1 releases myself. The 18.1/19.1 are build from mostly the same sources and hopefully work. I only test them roughly.
    Backup download


    Magisk seems to cause issues (bootloops) on update, so remove it first and reinstall if required. Note that Magisk is usually not required unless you want root.
    1. Put the zip file of the ROM on your SD card or internal store and boot into recovery.
    2. When coming from stock ROM, do a full wipe (i.e. factory reset) via "Wipe". Do not wipe system! When flashing the stock ROM you can select to not keep user data which is equivalent to this step.
    3. Go to "Install", select the zip file and add optionally the gapps zip. Then flash it.
    4. After updates you may now wipe cache&dalvik (option after install)
    I suggest to use modpunks TWRP recovery. Again: Don't forget the md5sum file!
    TWRP 3.3.1-0 by modpunk / derf elot
    Or use the latest TWRP for 17.1/18.1 or TWRP for 19.1.
    3.7.0 Seems to work well with latest updates (decryption working) but LineageOS 19.1 (Android 12) requires the ones with "_12" suffix, e.g. 3.6.2_12.

    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.

    Upgrades between versions​

    Dirty-flashing (e.g. from 17.1 to 18.1) works well but you have to also flash a GApps version matching the Android version or the device will bootloop.
    For the upgrade to 19.1 you may need to fully remove OpenGapps by wiping /system and install e.g. MindTheGapps.


    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.

    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/12
    ROM Kernel: Linux 4.4.x
    Based On: LineageOS
    GApps: None included, except for the MICROG builds. Recommended is OpenGApps for 17/18 and MindTheGapps for 19.


    • January security patches
    • Kernel updates
    • MicroG builds added (build date 31st Jan, but same sources)
    • December security patches
    • AGPS fix (using Google servers)
    • Kernel updates (e.g. Wireguard v1.0.20220627, improved security against stack attacks)
    • November security patches
    • WLAN driver update
    • Huge APN update
    • October security patches
    • Kernel update
    • APN for DIGI HU
    • Option to switch temporarily to 2G on boot
    • September security patches
    • Kernel update
    • APN update
    • August security patches
    • Kernel update (CIP st20)
    • July security patches
    • Kernel update
    • June security patches
    • Kernel update
    • Backport fix for CVE-2021-39686
    • Workaround fixing bootloop with recent OpenGapps (20220503 tested)
    • May security patches
    • Fix mic volume issue with wired headsets
    • Known issue: OpenGapps after 15/2 result in bootloop
    • April security patches
    • Kernel update (CIP st5-tag)
    • Removed LineageOS updater (unused application here)
    • Added Sony identification packages (Compatibility for some Sony apps from other sources)
    • March security patches
    • Updated some carrier configs (mostly Indian&Chinese) for IMS (VoLTE...)
    • Better support for flip covers
    • Allow disabling battery optimizations for the SMS app
    • February security patches
    • Kernel 4.4.302 (final LTS kernel)
    • Re-enable VoLTE toggle switch (there were reports of modem crashes when VoLTE is disabled, can't reproduce this, hence added the setting back)
    • January security patches
    • Kernel 4.4.299
    • Wireguard v1.0.20211208
    • Enhanced display brightness range
    • Experimental Ultra-Dim mode
    • December security patches
    • Kernel 4.4.295
    • QCom driver updates
    • Fix some permission issues
    • Reset phone ID to XZ1C
    • November security patches
    • Kernel 4.4.291
    • Fix IMS on 17.1
    • Fix/enhance Wifi-Display
    • Fix some power hints
    • Update APNs
    • October security patches
    • Kernel 4.4.288
    • 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
    • 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
    • July security patches
    • Kernel 4.4.275
    • June security patches
    • Update to Linux Kernel 4.4.272
    • Updated APNs
    I'm happy to announce the June update. Took a lot more work as I backported quite a bit to our kernel to fix CVE-2021-39686 although I'm not sure we were ever really affected by that. Anyway the backport fixes that hole and a few potential others making the device a bit safer!
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.
    I updated the ROM with the January security patches. I also included the "Ultra Dim" QuickSettings tile to reduce the screen brightness (overall). But that is experimental. I'm thinking about including that in the range of the brightness, i.e. make the lowest brightness levels less. Problem is that there are only 255 values possible so I have to define a switch-over point somehow and distribute those 255 values over effectively 2 distinct ranges. Let's see...

    I also added Google Drive downloads temporarily as a backup if AFH fails again...