[ROM] LineageOS 17/18/19 UNOFFICIAL - (Update: 2023-05-20)

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


  • Total voters
    210
Search This thread

Flamefire

Senior Member
Jul 26, 2013
250
698
Sony Xperia XZ1 Compact
With 17.1:
Camera, if set to SD, takes blank pictures.
I don't get some notifications that I should be getting (text messages)
My VPN randomly disconnects and requires manually turning it off and back on to get it to reconnect.
The pictures are not blank. They just look like that for a bit. I don't know why but after a while the pictures also show up correctly in the gallery app. Also when opening them from the camera app they are shown correctly and when sending them they are also fine. It just seems to be a bug in Android where the file isn't properly updated in the gallery view.
Connection issues are known and seemingly related to IMS. Can't do much here although I (and others) are working to try to resolve this. Try turning off IMS features (in XperiaParts) and see if the issue persists.
I tried at least 2 times reflashing .228 full firmware with newflasher, right after successful boot and basic setup rebooted into fastboot mode, flashed latest official TWRP, format /data, reboot again into twrp as suggested by twrp, wipe /system, /cache, installed this rom with magisk 25.2, again wipe /cache and reboot. I will try again reflash stock .228 but i suppose it will be same.
I don't boot into the stock when trying this so the /data format that newflasher does ("erase user data" option) is enough. I also don't use Magisk especially as last time I tried that it bootlooped. Maybe try again without Magisk. Note that the ROM passes safetynet without any modifications so you don't need Magisk for that.
 
  • Like
Reactions: sieghartRM

asdf2345

Senior Member
Feb 3, 2018
196
20
I disabled IMS and got no signal, also WiFi kept disconnecting every 5-15 seconds. Persisted even after reenabling it. Guess I'll go back to 8.1 tomorrow.
 

foresto

Senior Member
Feb 13, 2010
161
61
Answered there (a link to the issue in your post would be helpful as I don't get a notification on GH, but found it anyway): In short: It does work (I always do clean builds, by now 6 times), check your extracted system image :)

Here's what I found when I dug deeper:


In short: I checked three different system/vendor images, which I have been building from for years, and the file is not in any of them. Unless I'm missing something, it's because your latest lineage-17.1 branch is referencing a file that only exists in your lineage-19.1 branch.

Is it possible that your build environment's android_vendor_sony_lilac checkout was still on the 19.1 branch when you did your latest 17.1 build? That might explain why you didn't encounter the error that I'm seeing.
 

Flamefire

Senior Member
Jul 26, 2013
250
698
Sony Xperia XZ1 Compact
I disabled IMS and got no signal, also WiFi kept disconnecting every 5-15 seconds. Persisted even after reenabling it. Guess I'll go back to 8.1 tomorrow.
This is due to the modem crash issue we have for ages now :/
Switch the network preference to 2G or 3G until you get (data) connection, then you can switch back and connection & wifi will work unless you there is another issue with your device.

Disabling IMS (and rebooting to have it take effect) should avoid this. No idea why it doesn't for you.

In short: I checked three different system/vendor images, which I have been building from for years, and the file is not in any of them. Unless I'm missing something, it's because your latest lineage-17.1 branch is referencing a file that only exists in your lineage-19.1 branch.
The issue is the missing (stock) kernel image files. Seems like this only became an actual problem for you due to a fix/update to the 17.1 branch and there only being few (maybe only this?) file(s) used from the kernel image. That the file is in 19.1 is a mistake on my side, should have been removed already and is now.
 
  • Like
Reactions: sieghartRM

asdf2345

Senior Member
Feb 3, 2018
196
20
This is due to the modem crash issue we have for ages now :/
Switch the network preference to 2G or 3G until you get (data) connection, then you can switch back and connection & wifi will work unless you there is another issue with your device.
I was thinking that since I saw an option to do that at boot, but trying it manually and using the option didn't do anything.

I went to 8.0 stock (for 8.1 firmware) and everything works as it should testing stock ROM.
 

Rataplan626

Senior Member
Feb 7, 2006
390
101
I disabled IMS and got no signal, also WiFi kept disconnecting every 5-15 seconds. Persisted even after reenabling it. Guess I'll go back to 8.1 tomorrow.
I did the same two days ago, I misclicked actually, but got no signal anymore and wifi kept disconnecting too. Looking at the modem logs I saw some file was not found or at least unable to be read. Couldn't fix it. So I cleared cache + dalvic (I always do that before flash), reflashed 18.1 on top (just the same release I was running) and presto. After reboot I got.a message like 'Lineage generic radio in use' and *boom* back was my signal. Better not use that modem toggle switch anymore😳
 
Thanks Flamefire for keeping the device alive.
I am using 19.1 MicroG and getting great battery life.


I did a clean flash of 19.1 2023-02-25 MicroG from stock and I can't seem to find the settings for MicroG and don't see it listed in the system apps.
When I check in /system/product/priv-app I see the folder for GmsCore and the fake store, but there is no apk in it.
Is there additional setup needed in order to get MicroG working?
How About Deep sleep Bro ?
 

foresto

Senior Member
Feb 13, 2010
161
61
@Flamefire I managed to automate the clang download & symlink steps by adding a few lines to the local manifest. This makes building easier, and reduces the potential for mistakes. Pull request 18.

The issue is the missing (stock) kernel image files. Seems like this only became an actual problem for you due to a fix/update to the 17.1 branch and there only being few (maybe only this?) file(s) used from the kernel image.

Aha! Yes, the missing file is indeed buried in the kernel image's embedded ramdisk image. The build has never needed something from there until this month's update, so I didn't have it unpacked. I think that one file is the only one affected, as you guessed. Thanks for the pointer. I got it working.
 
  • Like
Reactions: sieghartRM

Guntram

Senior Member
Oct 30, 2010
121
13
This is due to the modem crash issue we have for ages now :/
Switch the network preference to 2G or 3G until you get (data) connection, then you can switch back and connection & wifi will work unless you there is another issue with your device.

Disabling IMS (and rebooting to have it take effect) should avoid this. No idea why it doesn't for you.


The issue is the missing (stock) kernel image files. Seems like this only became an actual problem for you due to a fix/update to the 17.1 branch and there only being few (maybe only this?) file(s) used from the kernel image. That the file is in 19.1 is a mistake on my side, should have been removed already and is now.

I'm having the same (or similar) issue? After some weeks/month, the SIM isn't recognized anymore. This happens on two different phones with the same operator at different times...
After switching down to 2G I can get it working again! Thanks for the tip!

But I am on 19-20220918 - which version does fix this (or is it something completely different I'm experiencing?)...

Thanks again,
Guntram
 

Flamefire

Senior Member
Jul 26, 2013
250
698
Sony Xperia XZ1 Compact
But I am on 19-20220918 - which version does fix this (or is it something completely different I'm experiencing?)...
There isn't a real fix yet, this happens after reboot or some time without network (e.g. Tunnel or basement)
You can try updating to latest version and enable the reflash-modem option in XperiaParts and see if that helps.
Didn't help for me on 17.1 but 19.1 has stuff that is not possible on 17.1 which may help.
 

hadr1an

Member
Jan 9, 2017
8
0
Just updated to lineage-18.1-20230225-UNOFFICIAL-lilac and eventhough LTE is working fine and WiFi as well, I can't make a call. Any ideas on that? When I change to 3G or 2G, it doesn't register with a network.
 

jurkoman

Senior Member
Oct 24, 2015
91
14
Hello, without magisk latest build of LOS 17 (02/25) works flawlessly. I want to have Viper4android but without root it seems impossible. Any ideas ?
Edit: Stock Sony camera app saving blank photos if default storage is set to external sd card.
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
250
698
Sony Xperia XZ1 Compact
As you may have noticed March updates are late. Besides that the LOS patches are only released last week there are no updates to LOS 17.1 in the "official" LOS repos which means the bug fixes to the (security and other) issues from March in Android 11+ (LOS 18+) are missing in LOS 17. It seems that Google didn't even backport the Android 11 fixes to Android 10 which might be the reason why there are no updates to the LOS 17 branches, which were there until last month.

So over the past days I did that myself: backporting all security fixes done for March in LOS 18 to LOS 17 besides also debugging and fixing a bug introduced in the latest kernel backport (through CIP) used in all branches, which was quite some work in itself.
This also made me postpone my work on some potential performance improvements for LOS 17 which I started working on to (likely) next month.

This looks good so far. When I'm done testing etc. I'll build and release all (6!) versions of LOS as usual in the next few days hopefully before the weekend.

However it seems that Android 10 may now have really reached its end of life with Google stopping to provide even security updates for it which makes the amount of work required to provide the updates unbearable. So if no one else in the LOS community provides backports of the patches then this might be the last update to LOS 17.1 and hence the last version with a working (stock) Sony camera app on our device.
 

7alvoo

Senior Member
Jul 18, 2019
174
56
Hi! The package 18.1 indicates an md5 mismatch, but 7zip does not indicate a zip error.

the attached md5 file:
0d16cfde92016519faa20e7291cdad55 lineage-18.1-20230331-UNOFFICIAL-lilac.zip
the file md5:
efc749545e273bc7bd13a79f27975e13 lineage-18.1-20230331-UNOFFICIAL-lilac.zip
it seems that this is a copy of the microg version:
efc749545e273bc7bd13a79f27975e13 lineage-18.1-20230331-MICROG-lilac.zip

It seems that the same change was made with the 17.1 version as well.
 
Last edited:

decsimon

Senior Member
Aug 12, 2015
70
8
In the new update of 17.1, there are two version as other, but if install unofficial version, microdroid is however present and playstore FC!....
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Yeah imo making 20 and 17.1 builds would make more sense. Android 11 is very similar to 10 but with out stock camera and 13 is basically a better 12.
    Currently derfelot is still providing LOS 20 builds and he recently updated his kernel branch so I guess that's still active and hence I see no need to build that.
    And judging by the download counter of AFH people use all 3 of my versions, i.e. some seemingly prefer A11 over 10&12 so doesn't look like I can drop that.

    Hence I stick to 17, 18 & 19 for now.

    BTW: May updates are out!

    9
    I just want to share some public appreciation for @Flamefire and all the work going into this project. Especially lately, with LineageOS having discontinued Android Security Bulletin patches on the 17.1 branch. Flamefire has been individually evaluating each one, and wrangling the applicable ones into applying on this branch.

    Thank you so much for sharing your work, and keeping this excellent phone viable long after Sony abandoned it (and us). Cheers!
    6
    I have the same problem during calls, even on Discord. It's really annoying.
    Admittedly, some people have written about changing TTY to VC0 in the accessibility options of the dialer, but I have yet to see if that helps on Discord as well.
    And also @DaniJaponezu I have found the issue with the wired headset and will release the fix with the next (June) security updates.
    Funny thing: I had that already fixed (kernel issue) but partially reverted it as CIP released some fixes related to that (based on mine) but not included this part which is actually a bug in a SONY driver which they (the kernel guys) don't want to fix
    6
    What surprised me the most is that suddenly the first check of Play Integrity failed, so Google Pay no longer works. SafetyNet passes all checks. I tried clean reflashing, older builds, different GAPPS. Nothing. It seems that Google has changed something.
    Yep, looks like since Tuesday it is broken.

    However with a bit of research I managed to get a 17.1 and 18.1 version working which passes SafetyNet and Play Integrity. Just uploaded those!
    4
    I think you should consider switching to 18.1, the gallery works well, what you lose is the sony camera app 720p 960fps and the selfie wide-view, but opencamera gives the same beautiful picture as the sony app. Many thanks to flamefire for keeping 17.1 alive, but he wrote earlier that its improvement is finite, so I think sooner or later the wind of change will catch up. I don't know much about Tiktok, maybe try the tiktok lite version.

    I think you should consider switching to 18.1, the gallery works well, what you lose is the sony camera app 720p 960fps and the selfie wide-view, but opencamera gives the same beautiful picture as the sony app. Many thanks to flamefire for keeping 17.1 alive, but he wrote earlier that its improvement is finite, so I think sooner or later the wind of change will catch up. I don't know much about Tiktok, maybe try the tiktok lite version.

    I've just modified some icons and now open camera remember sony camera.
  • 55
    LineageOS 17/18/19 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+)

    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.
    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

    IMPORTANT:
    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

    INSTALLATION

    IMPORTANT:
    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.

    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/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.
    24
    CHANGELOG


    2023-05-19

    • Fix Play Integrity checks --> Google Wallet works
    • Minor improvements that were missed earlier
    2023-05-13
    • May security patches (backports from 18.1 to 17.1)
    • Kernel updates (CIP tag -st40)
    2023-04-30
    • April security patches (backports from 18.1 to 17.1)
    • Kernel updates (CIP tag -st39)
    2023-03-31
    • March security patches (backports from 18.1 to 17.1)
    • Kernel updates (CIP tag -st38)
    • Fix possible camera issues on 18.1
    2023-02-25
    • February security patches
    • Kernel updates (e.g. CIP tag -st37, also add some missing patches to 19.1 kernel)
    • Use newer compiler (Clang 12.0.7) for kernel, possibly improving performance/battery life
    • Add "Re-apply Modem" setting to XperiaParts to help with connection/modem-crash issues
    • Clear some space on /system & /vendor partitions by removing files no longer needed
    • Attempt to fix Android Auto connection (untested)
    2023-01-20
    • January security patches
    • Kernel updates
    • MicroG builds added (build date 31st Jan, but same sources)
    2022-12-27
    • December security patches
    • AGPS fix (using Google servers)
    • Kernel updates (e.g. Wireguard v1.0.20220627, improved security against stack attacks)
    2022-11-15
    • November security patches
    • WLAN driver update
    • Huge APN update
    2022-10-13
    • October security patches
    • Kernel update
    • APN for DIGI HU
    • Option to switch temporarily to 2G on boot
    2022-09-29
    • September security patches
    • Kernel update
    • APN update
    2022-08-12
    • August security patches
    • Kernel update (CIP st20)
    2022-07-25/28
    • July security patches
    • Kernel update
    2022-06-30
    • June security patches
    • Kernel update
    • Backport fix for CVE-2021-39686
    • Workaround fixing bootloop with recent OpenGapps (20220503 tested)
    2022-05-16
    • May security patches
    • Fix mic volume issue with wired headsets
    • Known issue: OpenGapps after 15/2 result in bootloop
    2022-05-03
    • 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)
    2022-03-20
    • 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
    2022-02-20
    • 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)
    2022-01-23
    • January security patches
    • Kernel 4.4.299
    • Wireguard v1.0.20211208
    • Enhanced display brightness range
    • Experimental Ultra-Dim mode
    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
    20
    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!
    17
    April updates are out, enjoy! Again I had to backport every security patch from 18.1 to 17.1 so it really seems to be dying...
    I might switch to building LOS 20 though as derfelot doesn't seem to be providing updates anymore. And especially the battery charge/protection service that might be coming there looks promising...

    Could you provide LineageOS recovery for this device?

    Sorry no. I'd need to research how to create that recovery and maintaining 3/6 different ROM versions is already enough work especially with the hugely increased time/effort to keep LOS 17, so I can't afford to do even more.
    15
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.