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

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


  • Total voters
    160
Search This thread

victor126

Member
Sep 30, 2017
39
11
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...
i ended up up going back to havoc due to the missed calls issue coming back

is this the correct steps to try your 17 rom again

flash stock .228
flash latest twrp
boot into twrp
wipe data and cache
reboot twrp
flash your 17 rom
flash gapps
reboot to system

thank you for your dedication to this phone
 

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
flash stock .228
flash latest twrp
boot into twrp
wipe data and cache
reboot twrp
flash your 17 rom
flash gapps
reboot to system
Yes.
The wipe is not really required after a stock flash because that does a wipe (there is an option in newflasher) But it doesn't hurt, especially if you accidentally boot stock. Also rebooting twrp is not required. Doesn't hurt either but only wastes time ;)
 
  • Like
Reactions: sieghartRM

babastutz

Member
Dec 27, 2010
24
2
another idea:
install the twrp-3.6 image within the twrp-3.5 (destination: recovery) and restart recovery

Hello and thank you for your help. Just tried this and it worked 🎉🎉 Thank you very much
I did :
Code:
adb reboot bootloader
fastboot boot twrp-3.5.0-0-20210117-lilac.img

Then I installed "twrp-3.6.0_9-0-lilac.img"
It worked !

I was able to install the latest rom (20220123) with pico opengapps. After the update, I was stuck again with lineage recovery. But I did the trick again and it works like a charm 😁🤘
 

paulquappe

Member
Apr 24, 2018
21
2
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...

I just updated to the newest version of 17.1 by dirty flashing and got somehow stuck in a bootloop. Don't know why... The backup I made just before with TWRP didn't work too. Now I had to make a clean install to get the phone back to live. Maybe I did something wrong? Actually I have updated like this many times before...
 

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
I just updated to the newest version of 17.1 by dirty flashing and got somehow stuck in a bootloop. Don't know why... The backup I made just before with TWRP didn't work too. Now I had to make a clean install to get the phone back to live. Maybe I did something wrong? Actually I have updated like this many times before...
No idea either. Worked for me on the test phone and my personal phone. I always wipe cache&dalvik on updates though, but nothing else
 
  • Like
Reactions: sieghartRM

Nonononoki

Senior Member
Jul 24, 2015
138
40
Unfortunately the latest update doesn't work with my large SD card (200GB, 190GB filled), saying that it needs to be formatted. Card is still readable on my PC.
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
Unfortunately the latest update doesn't work with my large SD card (200GB, 190GB filled), saying that it needs to be formatted. Card is still readable on my PC.
Sorry no idea, my 128GB card works and I don't have any other to test. Maybe some support was dropped?
I'd suggest to save your data on PC, format the card with the phone and restore the data. That should make sure the card is formatted with something the phone can handle.
Out of curiosity: What filesystem does the PC show for the card?
 
  • Like
Reactions: sieghartRM

7alvoo

Senior Member
Jul 18, 2019
155
50
I'm wipe the system partition befor flash the new (this is not absolutely necessary) and the cache/dalvik after.
128GBSD ExFat (Samsung)
twrp-3.6.0_9-0-lilac
lineage-17.1-20220123 -
open_gapps-arm64-10.0-nano-20220122

All perfect!

The "Ultra Dim" Quick Settings did very well, I wouldn’t integrate deeper I think this way in Quick Settings form is most ideal.
 
Last edited:

Nonononoki

Senior Member
Jul 24, 2015
138
40
Sorry no idea, my 128GB card works and I don't have any other to test. Maybe some support was dropped?
I'd suggest to save your data on PC, format the card with the phone and restore the data. That should make sure the card is formatted with something the phone can handle.
Out of curiosity: What filesystem does the PC show for the card?
It's exfat. I believe that the issue is about the number of files, as I have over 120,000 pictures stored on the SD card. I actually have to remove the SD card each time the device boots because LineageOS is getting overwhelmed and just reboots the device, but this time it also refuses to read it.
 

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
It's exfat. I believe that the issue is about the number of files, as I have over 120,000 pictures stored on the SD card. I actually have to remove the SD card each time the device boots because LineageOS is getting overwhelmed and just reboots the device, but this time it also refuses to read it.
Hmm. Can you attach a logcat? Maybe something there hints at the issue. But I have not much hope. The exfat driver was tricky before IIRC some of derfelots posts
 
  • Like
Reactions: sieghartRM

Nonononoki

Senior Member
Jul 24, 2015
138
40
Hmm. Can you attach a logcat? Maybe something there hints at the issue. But I have not much hope. The exfat driver was tricky before IIRC some of derfelots posts
Here's the logcat when the OS fails to read the SD card. I'm in the process to backup my card and format it, but AFAIK Android only supports exfat for those, or am I wrong?
 

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
Here's the logcat when the OS fails to read the SD card. I'm in the process to backup my card and format it, but AFAIK Android only supports exfat for those, or am I wrong?
Can you edit the post with a working link? Even the file.io one is "deleted"

TBH: No idea what android supports. The idea was to let Android format the card to make sure it is whatever it prefers. As Android is a whole OS a single dev like me can't do much. I have to rely on others (like the upstream kernel devs and the LineageOS guys) to do their stuff and only pull that together into a ROM for a specific phone adding some customizations.
 
  • Like
Reactions: sieghartRM

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
Haven't found any error except a "state=UNMOUNTABLE" message. Also checked the kernel changes and none look remotely related to the filesystem stuff. So can't imagine how the last update could have caused this.

Is this still an issue? What exactly happens? Can you insert the SD when LOS runs? If not what happens? Can you attach the output of `adb logcat -b all` after you inserted the SD card?
I've also seen a few (possible) issues with magisk, gapps and fdroid in the log, not sure if related.
 
  • Like
Reactions: sieghartRM

Nonononoki

Senior Member
Jul 24, 2015
138
40
Haven't found any error except a "state=UNMOUNTABLE" message. Also checked the kernel changes and none look remotely related to the filesystem stuff. So can't imagine how the last update could have caused this.

Is this still an issue? What exactly happens? Can you insert the SD when LOS runs? If not what happens? Can you attach the output of `adb logcat -b all` after you inserted the SD card?
I've also seen a few (possible) issues with magisk, gapps and fdroid in the log, not sure if related.
I gave up and ended up formatting my SD card to ext4. Anyway, thanks a lot for your help and for supporting this amazing device!

EDIT: Looks like you need to mount ext4 cards manually with root for proper permissions, but I don't know how

EDIT2: Apparently LOS17 does support ext4 formatted SD cards (https://review.lineageos.org/c/LineageOS/android_system_vold/+/258169), looks like this is a problem with the ROM?
 
Last edited:

drspinderwalf

Senior Member
Mar 13, 2012
50
14
I have also had bootloop issues for the past two updates after I flash. I use Magisk as well and suspect that was the issue. In both cases, it appears that some combination of reboots, re-flashes, and safe mode fixes them.
 

Flamefire

Senior Member
Jul 26, 2013
209
445
Sony Xperia XZ1 Compact
I have also had bootloop issues for the past two updates after I flash. I use Magisk as well and suspect that was the issue. In both cases, it appears that some combination of reboots, re-flashes, and safe mode fixes them.
Thanks for the info.
I added a hint to the top of the installation instructions to uninstall Magisk before updating.

Another info: The 4.4 Linux kernel used by this phone probably reached its EOL (end of life). I don't know yet what this means for our device, but it is possible that there won't be any kernel updates anymore (for us) and maybe some Android update will be incompatible with this kernel. I doubt the latter for the foreseeable future but in that case I likely won't be able to provide any more updates.

It might be possible to switch to another kernel, e.g. 4.14 as done by Sony Open Devices repos. But I don't know if this is feasible due to e.g. changes made by Sony or if the EAS features contributed by @linckandrea will continue to work.
TBH: I don't know much about kernel dev and configuration. Just enough to verify updates and resolve conflicts. But switching to a new kernel and making sure all required modifications survive is over my head. So I'll need help there.

Time will tell more. I guess we could manage even without a (further) updated kernel.
Anyway so far the heads up.
 

Top Liked Posts

  • 8
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.
  • 8
    @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 ;)
    3
    That my friend is exactly want I want to hear
    Oh sorry, missread your question. Yes, the data partition itself is encrypted and decrypting it is not yet possible on TWRP.

    Apparently, someone made stock sony cam for Los18/19.1. https://gitlab.com/xperiance
    Check his other mods too!
    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
  • 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.