[ROM] LineageOS 17.1/18.1 UNOFFICIAL - (Update: 2022-05-05)

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


  • Total voters
    161
Search This thread

babastutz

Member
Dec 27, 2010
24
2
Hello! I hope you're all fine and safe 😊

I have a XZ1 Compact with lineage 18.1 (20211019) installed. Last time I updated my phone, I tried to install pico Open GApps and Magisk and had issue with my install. I managed to install lineage (not Open GApps, not Magisk), my phone works fine but for some reason, I loose TWRP on my phone. 😐😐

Now I would like to install TWRP again to be able to update my phone and why not, retry to install pico Open GApps. I have ADB and fastboot installed on my computer. ADB is working fine. I can do the commands "adb devices" -> show my phone. And the command "adb reboot bootloader" -> working fine. But I am unable to make fastboot work. I read so many articles and forum posts 😅 When I try the command "fastboot devices", it just doesn't find anything. It seems to be a driver issue. I tried these drivers with no success :

I hope someone will find a way to help me 😬😬

Have a nice day 😉
 

[email protected]

Senior Member
Jul 26, 2019
71
62
Hello! I hope you're all fine and safe 😊

I have a XZ1 Compact with lineage 18.1 (20211019) installed. Last time I updated my phone, I tried to install pico Open GApps and Magisk and had issue with my install. I managed to install lineage (not Open GApps, not Magisk), my phone works fine but for some reason, I loose TWRP on my phone. 😐😐

Now I would like to install TWRP again to be able to update my phone and why not, retry to install pico Open GApps. I have ADB and fastboot installed on my computer. ADB is working fine. I can do the commands "adb devices" -> show my phone. And the command "adb reboot bootloader" -> working fine. But I am unable to make fastboot work. I read so many articles and forum posts 😅 When I try the command "fastboot devices", it just doesn't find anything. It seems to be a driver issue. I tried these drivers with no success :

I hope someone will find a way to help me 😬😬

Have a nice day 😉

To enter fastboot mode, turn your phone off. Attach USB cable while holding volume up key.

 

toejam119

Senior Member
Hello! I hope you're all fine and safe 😊

I have a XZ1 Compact with lineage 18.1 (20211019) installed. Last time I updated my phone, I tried to install pico Open GApps and Magisk and had issue with my install. I managed to install lineage (not Open GApps, not Magisk), my phone works fine but for some reason, I loose TWRP on my phone. 😐😐

Now I would like to install TWRP again to be able to update my phone and why not, retry to install pico Open GApps. I have ADB and fastboot installed on my computer. ADB is working fine. I can do the commands "adb devices" -> show my phone. And the command "adb reboot bootloader" -> working fine. But I am unable to make fastboot work. I read so many articles and forum posts 😅 When I try the command "fastboot devices", it just doesn't find anything. It seems to be a driver issue. I tried these drivers with no success :

I hope someone will find a way to help me 😬😬

Have a nice day 😉
I also had initial problems getting fastboot drivers to work, so here is my guide how to make them work on Win10 machine (this is an excerpt from my own guide):
Make sure you have installed the latest Sony Xperia Companion and Emma (previously known as only Flash Tool) software to your Windows 10 to have the correct drivers so Windows 10 recognizes your phone when plugged to the USB port (I used USB 2.0 ports, the black ones, not blue, and they worked). These will not, however, provide the fastboot drivers. These you have to manually install. I used these drivers https://forum.xda-developers.com/showthread.php?t=2588979 and they worked. You need fastboot to install TWRP recovery.

Quick rundown how to get fastboot drivers to work in Windows 10 IF they do not automatically work as was the case with me:
1. when you boot into fastboot (power down device, press vol up, press power putton)
2. blue light appears
3. you are now in fastboot
4. if your device manager doesn't recognize your fastboot android device
5. install adb-setup-1.4.3.exe (from xda)
6. select no on "install adb?" assuming you already have ADB installed
7. select yes on "install drivers?"
8. then go to device manager, you see your android device with a question mark, right click it
9. go to update drivers, select browse for drivers, let me pick from a list, select Android device, select the bootloader interface, select yes to install drivers
10. Now the drivers should be installed
 

babastutz

Member
Dec 27, 2010
24
2
To enter fastboot mode, turn your phone off. Attach USB cable while holding volume up key.

Thank you for your answer. I know how to reboot in fastboot. My device is in fastboot (blue led, etc.). It's just not recognised by my computer.

I also had initial problems getting fastboot drivers to work, so here is my guide how to make them work on Win10 machine (this is an excerpt from my own guide):
Thank you for these details ! I tried to follow your guide, I also tried to install the universal ADB Drivers from this link (find them here : https://twrp.me/sony/sonyxperiaxz1compact.html) : https://adb.clockworkmod.com/

But I always have exclamation mark in device manager.
Screenshot 2022-01-21 175258.png


The command fastboot devices still doesn't return anything.

I don't understand where I am wrong.
 
Last edited:
Hello! I hope you're all fine and safe 😊

I have a XZ1 Compact with lineage 18.1 (20211019) installed. Last time I updated my phone, I tried to install pico Open GApps and Magisk and had issue with my install. I managed to install lineage (not Open GApps, not Magisk), my phone works fine but for some reason, I loose TWRP on my phone. 😐😐

Now I would like to install TWRP again to be able to update my phone and why not, retry to install pico Open GApps. I have ADB and fastboot installed on my computer. ADB is working fine. I can do the commands "adb devices" -> show my phone. And the command "adb reboot bootloader" -> working fine. But I am unable to make fastboot work. I read so many articles and forum posts 😅 When I try the command "fastboot devices", it just doesn't find anything. It seems to be a driver issue. I tried these drivers with no success :

I hope someone will find a way to help me 😬😬

Have a nice day 😉
...look here!
 
  • Like
Reactions: DoorOfTime

babastutz

Member
Dec 27, 2010
24
2
...look here!

Wow !!! It works ! And so easily 😱 Thank you 🙏

So now I am able to use fastboot. Awesome !!
But there is a new problem 😅😅

I did the "fastboot flash recovery" command with the recommanded 3.5.0.0 TWRP :
Screenshot 2022-01-21 190013.png


It seems to be ok.

But then, I am stuck with this "strange" recovery (sorry for the poor quality) :
Untitled.png


There is a lineage logo but that should be TWRP right ? 🤯

[EDIT]
I tried this method : https://www.getdroidtips.com/replace-lineageos-recovery-twrp/
I can boot in twrp, I can flash the img file on recovery but same result. I still have the lineage thing recovery.
 
Last edited:

7alvoo

Senior Member
Jul 18, 2019
155
50
the latest twrp:

normal istall with fastboot:
fastboot.exe flash recovery twrp-3.6.0_9-0-lilac.img

or 'forced' istall with fastboot:
adb reboot bootloader
fastboot flash recovery twrp-3.6.0_9-0-lilac.img
fastboot reboot
 

Hornelen

Member
May 23, 2019
34
14
Has anyone tried this ROM with microG?
Can you flash the zip that enables signature spoofing?
Do hardware buttons work here?
I had Havoc 4.12 but i will switch to this one because no hardware buttons with this small screen sucks...
 
Wow !!! It works ! And so easily 😱 Thank you 🙏

So now I am able to use fastboot. Awesome !!
But there is a new problem 😅😅

I did the "fastboot flash recovery" command with the recommanded 3.5.0.0 TWRP :
View attachment 5514603

It seems to be ok.

But then, I am stuck with this "strange" recovery (sorry for the poor quality) :
View attachment 5514605

There is a lineage logo but that should be TWRP right ? 🤯

[EDIT]
I tried this method : https://www.getdroidtips.com/replace-lineageos-recovery-twrp/
I can boot in twrp, I can flash the img file on recovery but same result. I still have the lineage thing recovery.
Just to be sure: flash REQUIRED FIRMWARE 47.2.A.11.228 (newflasher) and then follow the described "normal" procedure
 

Trigger1112

Member
Jan 27, 2016
13
4
That app works fine with Flamefire's LineageOS 17.1 without any magisk shenanigans. Just make sure after you install the ROM and before you open the Santander app you delete the "TWRP" directory in your phone's internal memory and/or SD card.

If you stored any backups there just move them to some other dir before you delete it.

Every time you update by booting into TWRP the dir will be re-created so make sure you always delete it after an update before opening santander app.
Thanks! I didn't delete the TWRP directory the first time but after performing a factory reset the app works fine now.
 
Has anyone tried this ROM with microG?
Can you flash the zip that enables signature spoofing?
Do hardware buttons work here?
I had Havoc 4.12 but i will switch to this one because no hardware buttons with this small screen sucks...
I'm interested in using it (LOS 18.1 prefered) with microG too. Any feedback? And how to enable signature spoofing?
I use "old" Havoc 4.3 so far with included signature spoofing.
 
I'm interested in using it (LOS 18.1 prefered) with microG too. Any feedback? And how to enable signature spoofing?
I use "old" Havoc 4.3 so far with included signature spoofing.
OK, I was anxious and installed new twrp, LOS18.1, MinMicroG and Magisk v23.0.
Signature spoofing was not enabled and I patched it according those instructions: https://forum.xda-developers.com/t/signature-spoofing-on-unsuported-android-11-r-roms.4214143/
I flashed the patched AVDapi30.zip, MinMicroG Standard Edition and Magisk again in twrp. Now MicroG settings show working signature spoofing :)
Let's see how it works ;)
 
  • Like
Reactions: fr_jr

Flamefire

Senior Member
Jul 26, 2013
209
448
Sony Xperia XZ1 Compact
@Flamefire thank you for supporting this!
Does RCS work on this rom(reactions)?

Does mms work with data off?
The RCS thing seems to be something (Google-)App specific. As LOS is without Google stuff you likely have to follow the linked instructions if RCS doesn't work for you. I never used them and don't even really know what it is.

The MMS toggle switch is there, yes. It appears when you disable mobile data but have a connected SIM card.
 

babastutz

Member
Dec 27, 2010
24
2
the latest twrp:

normal istall with fastboot:
fastboot.exe flash recovery twrp-3.6.0_9-0-lilac.img

or 'forced' istall with fastboot:
adb reboot bootloader
fastboot flash recovery twrp-3.6.0_9-0-lilac.img
fastboot reboot

Hello and thank you for your message 🙏
I tried both with the img of the link you provided.
Screenshot 2022-01-23 150945.png


Same result. I still have the lineage recovery installed, not TWRP. This is sorcery 😅

you have an installed LOS-recovery! you can continue with that tool by "apply update" and install the latest LOS using "adb sideload". perhaps "factory reset" may be necessary....

Thanks for your message. I don't know how lineage recovery happened to be installed on my phone. So strange 🤯 I managed to install updates by using twrp with the command "fastboot boot twrp-3.5.0-0-20210117-lilac.img". It's fine but not ideal. Is there no way to have twrp installed without a factory reset ?

Just to be sure: flash REQUIRED FIRMWARE 47.2.A.11.228 (newflasher) and then follow the described "normal" procedure

Thank you for your message. How can I verify my firmware version ? I managed to install lineage os 18.1 20211129 and opengapps via the "fastboot boot twrp-3.5.0-0-20210117-lilac.img" to run twrp. Not ideal but it works.


I tried to download lineage-18.1-20211219 but got the "no mirrors found" error systematically. Is there an issue with this update ?
 
install and run xperifirm:
download and extract your latest stock rom
download and install newflasher:
copy the newflasher stuff into the stock rom folder
run newflasher v52 and skip userdata (not sure that it is possible because you are already on LOS)
go on and good luck.....

you find your actual build number under settings > about phone
 
Last edited:
install and run xperifirm:
download and extract your latest stock rom
download and install newflasher:
copy the newflasher stuff into the stock rom folder
run newflasher v52 and skip userdata (not sure that it is possible because you are already on LOS)
go on and good luck.....

you find your actual build number under settings > about phone
another idea:
install the twrp-3.6 image within the twrp-3.5 (destination: recovery) and restart recovery
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
209
448
Sony Xperia XZ1 Compact
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...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.
    4
    @MaRtYy01 As for the driver: Yes it seems we have one with OpenGL [email protected] from 2018. I found some v9a binary blobs directly from Sony (for their open-source efforts) with [email protected] from Sept. 2019. Not sure if a newer driver is worth risking issues. I mean: What could be gained by that? But I may try that for the May builds if I got time.
    I finally got around to do the April updates and am uploading them now. So not changing that ;-)
    4
    I noticed that the gpu driver which the rom comes with it is fairly old- version 332(or somewhere around these numbers) from 2018. Is there any reason why it comes with that exact version? I manually updated it to 472 and it seems to work normally(also tried 490 but screen recording was broken on it).
    TBH: Not really sure which driver you refer to. Where did you get the version from and how exactly did you update it?

    I mostly rely on the LineageOS stuff and previous work by modpunk (list of proprietary blobs...) and just keep an eye on the ASBs to make sure at least the open-source patches are included. Hard enough already ;)
    2
    From here, installing it is systemless with magisk so it was worth a shot I guess. Tried all 4 versions for sd835 and none works without bugs so yeah.. it was worth a shot I guess. Idk, maybe the sony camera requires the driver that comes with the rom.
    It probably has something to do with the stock sony camera. Im using 19.1 and have no issues with the latest driver.

    Edit:taking photos doesnt work
    1
    for people interested to Sony Camera Magisk Module working on xz1 compact running lineage 18.1 / 19.1 ....
    download "camera-0.3.0-tama.zip" and install via magisk.
  • 49
    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. 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 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.

    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
    19
    CHANGELOG


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