[ROM] LineageOS 17/18/19 UNOFFICIAL - (Update: 2023-02-25)

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


  • Total voters
    199
Search This thread

fenamori

New member
Dec 21, 2022
2
0
Sony Xperia XZ1 Compact
Heya, i'm having no luck with getting GPS to work on my G8441 running the 11-15 build of LOS 18.1. I've tried clearing AGPS with GPS test and leaving that running outside for a while, but i'm still unable to get a consistent signal. Maps will pick up an accurate signal about once every 30 minutes, and then nothing. GPS test gets a lock fairly quickly, between around 5 seconds to a minute or so, if not instantly. Anything else that uses GPS (Pokemon GO, some restaurant apps) just doesn't work at all. Any ideas?
 

Flamefire

Senior Member
Jul 26, 2013
240
618
Sony Xperia XZ1 Compact
(Late) Merry Christmas! 🎄

December updates are out including the first 19.1 release. In a quick test I was able to upgrade from 18.1 to 19.1 without loosing data. However the issue is OpenGApps which isn't available for Android 12 (yet?). So you need to wipe /system before flash 19.1 from 18.1 to remove OpenGApps and then install another GApps (e.g. MindTheGApps) in a matching version.
Of course the 19.1 version contains all the goodies I added to my other builds including passing SafetyNet and enhanced brightness control (Ultra-Dim)

I was working very hard to get another major change set into this release both to kernel and vendor files but decided to delay that to next year for proper testing etc. although a lot of time was already spent on that.


Thats great news! I wonder how did you decide to add 19.1?
I asked before if there was any interest since derf elot discontinued building it. There was so I added it especially as I'll backport what I can to especially 17.1.
Additionally if I was to choose between 18.1 and 19.1 I'd go for 19.1 especially due to finally being able to use BLE without location permissions. Generally I see 18.1 as only minor improvement over 17.1 not worth loosing the Sony camera app but 19.1 has enough new stuff to consider switching
Should I run `applyPatches.sh` to apply all the patches, or just the `fix-custom-apn-script` patch?
You should only apply the patches you really want. Some of them do major changes so check their very descriptive names and the changes done. A lot of work went into those patches alone so I'd consider them my (not-so-)secret sauce.
Heya, i'm having no luck with getting GPS to work on my G8441 running the 11-15 build of LOS 18.1. I've tried clearing AGPS with GPS test and leaving that running outside for a while, but i'm still unable to get a consistent signal. Maps will pick up an accurate signal about once every 30 minutes, and then nothing. GPS test gets a lock fairly quickly, between around 5 seconds to a minute or so, if not instantly. Anything else that uses GPS (Pokemon GO, some restaurant apps) just doesn't work at all. Any ideas?
It looks like Sony turned off their AGPS server (supl.sonyericsson.com) so in the December builds I switched back to the Google servers. Give that a try
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
240
618
Sony Xperia XZ1 Compact
Please be aware that SafetyNet has been replaced by Play Integrity

More information here
Thanks for the info. I just tried: The ROM passes the 2 lower levels of Play Integrity the same way it passes SafetyNet, i.e. only failing the "Strong integrity"/hardware-based attestation. This is expected as I'm using a version of the USNF.
 

V0latyle

Forum Moderator
Staff member
Thanks for the info. I just tried: The ROM passes the 2 lower levels of Play Integrity the same way it passes SafetyNet, i.e. only failing the "Strong integrity"/hardware-based attestation. This is expected as I'm using a version of the USNF.
Correct. Strong integrity should always fail on an unlocked bootloader.
 

victor126

Senior Member
Sep 30, 2017
64
15
(Late) Merry Christmas! 🎄

December updates are out including the first 19.1 release. In a quick test I was able to upgrade from 18.1 to 19.1 without loosing data. However the issue is OpenGApps which isn't available for Android 12 (yet?). So you need to wipe /system before flash 19.1 from 18.1 to remove OpenGApps and then install another GApps (e.g. MindTheGApps) in a matching version.
Of course the 19.1 version contains all the goodies I added to my other builds including passing SafetyNet and enhanced brightness control (Ultra-Dim)

im guessing your 19.1 has the same big icons for the pulldown quick setting ?
 

Flamefire

Senior Member
Jul 26, 2013
240
618
Sony Xperia XZ1 Compact
Where can I download 2022-12-27 update?
Download link for all versions is in the initial post. It leads to a folder on AFH containing subfolders for the versions.
Thanks!
Can I dirty update from twrp on the existing 17.1 version?
Dirty flash is possible staying on the same version (I.e. 17 to newer 17) and also to higher versions (17 to 18) but you need to have twrp decrypt data (if that fails then the upgrade may not work) and make sure the gapps matches the Android version (when upgrading to a newer major version) so you may need to flash that too
im guessing your 19.1 has the same big icons for the pulldown quick setting ?
I avoid modifying stuff if I don't have to so I'd guess yes although I don't know what you are comparing them to
 

victor126

Senior Member
Sep 30, 2017
64
15
Download link for all versions is in the initial post. It leads to a folder on AFH containing subfolders for the versions.

Dirty flash is possible staying on the same version (I.e. 17 to newer 17) and also to higher versions (17 to 18) but you need to have twrp decrypt data (if that fails then the upgrade may not work) and make sure the gapps matches the Android version (when upgrading to a newer major version) so you may need to flash that too

I avoid modifying stuff if I don't have to so I'd guess yes although I don't know what you are comparing them to
just wondering. samsung android 12 still has the small icons when you pull down the notifications. and so far all android 12 los based roms use the new big ones
 

petefoth

Senior Member
Dec 12, 2015
219
175
Whaley Bridge
Sony Xperia Z3 Compact
December updates are out including the first 19.1 release. In a quick test I was able to upgrade from 18.1 to 19.1 without loosing data. H
I tried making my unofficial and custom lineageOS for MicroG builds from your repos (previous builds are based on whatawurst's) but I'm stumped by the fact that most vendor blobs aren't in the vendor/sony/lilac repo. I usually build on cloud servers, and I don't have an image on hand to extract the files. I've been round this loop before when tryong to make up-to-date /e/OS builds, but the process of extracting blobs from an image and putting them in my own repo is too fiddly and error prone.

So I'll stick with making v20.0 builds :(
 

Flamefire

Senior Member
Jul 26, 2013
240
618
Sony Xperia XZ1 Compact
I tried making my unofficial and custom lineageOS for MicroG builds from your repos (previous builds are based on whatawurst's) but I'm stumped by the fact that most vendor blobs aren't in the vendor/sony/lilac repo. I usually build on cloud servers, and I don't have an image on hand to extract the files.
I build everything locally as I need to debug stuff etc. And as Git isn't particularly suited for binary blobs I avoid having them in the repo.

If there is interest in MicroG builds for 17-19 I can try to integrate them as separate builds. IMO it should be possible by having a Makefile/env variable switch. Would you mind sharing your changes/build script for the MicroG build? I remember doing a quick test based on their Docker image recipe natively but must have missed something as it failed.
 
  • Like
Reactions: sieghartRM

petefoth

Senior Member
Dec 12, 2015
219
175
Whaley Bridge
Sony Xperia Z3 Compact
I do (mostly) use a build script, but that's because, as well as the 'standard` LineageOS for MicroG builds I make a 'custom' build with some apps added and removed to make it more like /e/OS. To do that I use this project and my scripts are structured to fit in with that. All the scripts I use are here and an example of how I use them is in my project Wiki.

If you build the normal way (`repo sync, lunch, mka`) then you really only need some of what is in my `before.sh`, specifically lines 55-87 which Get and apply the restricted signature spoofing patches from the L4M docker-lineage-cicd repo. That logic was pulled from their `Dockerfile` -lines 110-143, and 204-214 (or 204-238 if you want full signature spoofing rather than the recommended restricted spoofing).

However, for what you are thinking of doing it's probably easier to stick with Docker...
I remember doing a quick test based on their Docker image recipe natively but must have missed something as it failed.
Building with the Docker image as described here should be working now for 18.1 and 19.1 builds. You need

1. a manifest with the following line
Code:
    <?xml version="1.0" encoding="UTF-8"?>

    <manifest>

        <project path="vendor/partner_gms" name="lineageos4microg/android_vendor_partner_gms" remote="github" revision="master" />

    </manifest>
2. A manifest pointing to your files (including vendor blobs, or have them in place in `vendor/sony/lilac`)
3. Set the environment variable `WITH_GMS=true` in your `docker run` command

With those in place the following `docker run` command should "just work"
Code:
docker run \
  -v "/srv/src:/srv/src" \
  -v "/srv/zips:/srv/zips" \
  -v "/srv/logs:/srv/logs" \
  -v "/srv/cache:/srv/ccache" \
  -v "/srv/keys:/srv/keys" \
  -v "/srv/local_manifests:/srv/local_manifests" \
  -e "BRANCH_NAME=lineage-18.1 \
  -e "DEVICE_LIST=lilac" \
  -e "SIGN_BUILDS=true" \
  -e "SIGNATURE_SPOOFING=restricted" \
  -e "WITH_GMS=true" \
  lineageos4microg/docker-lineage-cicd

Building for 17.1 is more complicated: the method described in the L4M Readme doesn't work in my experience for 17.1. You have to do it the old way, with the manifest pointing to the deprecated `android_prebuilts_prebuiltapks` repo rather than the `vendor_partner_gms` repo, and you need to list the Microg packages in the `CUSTOM_PACKAGES` variable. Even then it doesn't always work, and I haven't built for 17.1 for some time.

I hope all / some of that is helpful / useful, and happy to help out more if required (either here or by PM)
 
  • Like
Reactions: sieghartRM

7alvoo

Senior Member
Jul 18, 2019
163
52
There is a small privilege revocation bug in version 18/19 of com.android.dialer. The first time you start a call recording it asks for approval which works fine but sometimes 'failed to start recording' which can be fixed by restarting the phone in safe mode and clearing the com.android.dialer cache and data - don't worry it doesn't clear the call log. The subject of the bug is that unfortunately sometimes you have to do this because 'failed to start recording' returns and only clearing in safe mode helps. Never had this in the 17 package the 18 one started I guess the automatic revocation of rights can interfere.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    I uploaded the new updates yesterday. Took a bit longer than usual especially due to some tricky updates to the kernel and XperiaParts
    3
    can confirm android auto is working with the latest update
    2
    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.
    2
    Hello, now in latest update of LOS 17.1 for lilac 02/25 (clean install) I am experiencing random UI reboots and one bug:
    If i turn off device and turn on (no reboot), system sounds arent working, freeze and FC when i want to set an alarm in clock app or play music, no flashlight, camera cannot start and maybe something else which i havent noticed.
    [...]
    I dont know if someone has similar problems, but this is strange.
    I'm using that ROM (17.1) myself on my daily device and haven't encountered any issues at all. So looks like something with your device, not the ROM itself.
    Now battery lasted 3 days +20% with 5hrs SOT, very nice ! No gapps.
    2 more bugs:
    Camera taking blank photos if default storage is set to sd card.
    Front camera gives white screen, freezes, FC and then i cant open camera when is flashlight turned on.

    Maybe it is related only to Sony camera app, i havent tested other camera apps.
    I assume you are (still) using 17.1 as you mention the Sony camera app. I'm a bit confused: Above you said that the camera cannot start.

    I just tried to reproduce the other issues: Camera works fine for me, I've always had the default set to SD and front camera does also work. I can imagine issues with camera and the flashlight feature as the former may want to access the light which may be already in use in that situation but it also does work fine for me.
    In fact the camera is one of the things I test on a spare device for a new ROM before even installing that on my own phone as a working camera is a good hint that a big part of the system works.

    So I can only imagine that there is still something left on your device interfering with the current ROM. If you don't mind loosing your data reflash the Stock firmware with newflasher, TWRP and then this ROM making sure to wipe /data, /cache and dalvik in the process. Or if you don't want to flash stock wipe /system, /cache & dalvik and format /data, then reinstall the ROM (without rebooting TWRP) which might help.
    At the very least try wiping /cache & dalvik (keep your data)

    This update seems to have broken extract-files.sh, preventing a clean build from source. Reported on github as issue 13.
    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 :)
    2
    First, my TWRP backups were all done from within TWRP with the phone running in Recovery, not using `adb backup --twrp` so I don't know if they two methods are functionally equivalent.
    Thanks for the reply! I actually think they use slightly different storage formats, so next time backing up to the SD card may be worth a try.

    Are you able to get back to your original setup (i.e. your custom ROM, with your backup restored?
    Maybe I'm misunderstanding the question, but my problem is exactly that I can't boot the restored backup unless I format the restored data partition... at which point it wouldn't be my original setup anymore. (The backup I created covers all partitions, and adb does not support partial restores)

    My '"if all else fails" backup' is to backup using Android Backup and Restore Tools project. You need rooted debugging enabled, and access to a Linux machine (real or virtual). I have used these scripts to backup my apps and data and then to
    1. Restore to the same device, running the same or different custom ROM
    2. Restore / migrate to a completely new / different device
    Not everything gets retored - any apps whose account data is handled by Accuont Manager (e.g DAVx5, NextCloud) will lose the account settings, as will K-9 Mail (though you can export your settings before the backup, and re-import them after the restore). See this post in the /e/OS community forums for more information on my experiences with this.
    Yeah I've read about this project after the failed backup as well. Looks like another good line of redundancy in addition to SeedVault and partition backups.

    For now I've come to accept that the original data partition is just lost forever despite my best attempt at creating a proper backup. I was kinda hoping there'd be some takeaway lesson here like "If you format Data once, restoring old backups won't work anymore [for some reason]" to explain what went wrong. But it looks like my best bet is trying to back up to SD card rather than through adb in the future and cross fingers that'll work better 😬
  • 54
    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.
    22
    CHANGELOG


    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!
    15
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.
    14
    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...