[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

Flamefire

Senior Member
Jul 26, 2013
211
450
Sony Xperia XZ1 Compact
@ortizjammet is this correct now?
IMG_20211108_003046.jpg
 

jmbattle

Member
Jul 3, 2015
18
3
@Flamefire regarding your request, would a Japanese (Docomo) SO-02K variant be acceptable?
I live in Japan, so can probably pick-up a second hand device for a relatively low price.
 

Flamefire

Senior Member
Jul 26, 2013
211
450
Sony Xperia XZ1 Compact
yep, now thats perfect as a DAP. ;)

how did you fix this? maybe i can make it work on other devices that didnt have working 24/192 on LOS yet it worked on stock rioms. is this a build.prop edit or something?
Adjusted the audio_policy_configuration.xml.
However: Do you know if this worked on stock? Can't really see how it would have but TBH I did the modifications mostly by trial & error
 

FFW

Senior Member
May 24, 2020
72
46
Hi all, just a quick info from me and a question: As I already wrote I'm still using LOS 17.1/Android 10 as it allows using the Sony camera which Android 11 does not and the benefits of Android 11 compared to 10 are not worth the switch for me.
However with the recent release of Android 12 switching to that becomes worth it due to various improvements over those 2 versions.
However porting a new LOS to a that device isn't easy and requires quite some testing (and I can't even promise I'll succeed)
So in order to keep supporting multiple LOS/Android versions I'd need a spare device for testing.

Hence I'm asking if anyone would be able to donate an XZ1C to me for that. Maybe someone knows someone who has an unused phone, maybe with cracked screen but otherwise working or one which isn't used anymore. Again: I can't promise anything in exchange and I know the XZ1C is still such a good phone that prices aren't exactly low. So this is really meant as an outreach to the community in case anyone has somehow access to an unused phone which I can use for testing and see what I can do with that.
Of course you can tell me which LOS version you use yourself and I'll try and take a bit of extra effort to support that as long as I can.

Thank you all for your support and the nice words here which motivate me to put in that extra effort to provide you with a ROM that works on more than only my device and even one I don't even use myself!
sorry for the late reply. While I don't have a second XZ1 Compact, I have sent you a donation. Maybe that might help for buying one on Ebay or somewhere if you don't have one yet :cool:
 

Flamefire

Senior Member
Jul 26, 2013
211
450
Sony Xperia XZ1 Compact
sorry for the late reply. While I don't have a second XZ1 Compact, I have sent you a donation. Maybe that might help for buying one on Ebay or somewhere if you don't have one yet :cool:
Much appreciated! I might be getting one in the next couple of days hopefully (courtesy of @landsome), but donations are always welcome. Just had to spend a (low) 3 digit amount of €s to upgrade the build machine in preparation for LOS 19. But seems LOS itself isn't yet ready. So got time :)
But yeah, having a 2nd device I can e.g. revert to stock to compare reception or features would be very handy.
 
Last edited:
  • Like
Reactions: sieghartRM

babastutz

Member
Dec 27, 2010
24
2
Hello, hope you're all fine :)

I have some issues here.
I had lineage 18.1 (20210918) working well. I decided to install magisk and pico openGapps. Just for trying, curiosity :)

I installed Magisk 23. No problem here. All worked nicely.
Then, I went back to TWRP to flash openGapps (open_gapps-arm64-11.0-pico-20211111). Now, impossible to boot my system. The phone boots, gets to the lineage boot animation and reboot to TWRP.

Any ideas ? I don't know what to do.

TWRP : 3.5.2
Lineage 18.1-20210918
Magisk : 23
OpenGapps : open_gapps-arm64-11.0-pico-20211111
 

Flamefire

Senior Member
Jul 26, 2013
211
450
Sony Xperia XZ1 Compact
Hello, hope you're all fine :)

I have some issues here.
I had lineage 18.1 (20210918) working well. I decided to install magisk and pico openGapps. Just for trying, curiosity :)

I installed Magisk 23. No problem here. All worked nicely.
Then, I went back to TWRP to flash openGapps (open_gapps-arm64-11.0-pico-20211111). Now, impossible to boot my system. The phone boots, gets to the lineage boot animation and reboot to TWRP.

Any ideas ? I don't know what to do.
I had issues with magisk too, see the open issue in their github. So uninstall magisk. If that doesn't help, reflash the rom. If that doesn't help wipe system before flashing which gets rid of gapps too.
If you can get some log output (adb logcat) it would also help. Run the command on pc, plug the phone in and start it until it reboots. Hopefully there is some log info
 

babastutz

Member
Dec 27, 2010
24
2
I had issues with magisk too, see the open issue in their github. So uninstall magisk. If that doesn't help, reflash the rom. If that doesn't help wipe system before flashing which gets rid of gapps too.
If you can get some log output (adb logcat) it would also help. Run the command on pc, plug the phone in and start it until it reboots. Hopefully there is some log info

Hello and thank you for your answer :)

Finally, I wiped system+cache+data, and installed only "lineage-18.1-20211019-UNOFFICIAL-lilac.zip". So my phone boot again. Great !!
But it seems that magisk, gapps and TWRP are gone. I can't explain for TWRP. Is it normal ? I tried to install it back but have issues with adb now. "device is offline" message...

What a great day hahaha!!
 

jimmygumble

Senior Member
Nov 26, 2016
62
19
Upgraded to lineage-18.1-20211019 build from previous version

Everything works well. Thanks for keeping 'er going!
 

JDC2389

Senior Member
Apr 3, 2011
204
45
Performance is amazing, having periodic signal issues and wifi calling/volte not working, the signal issues tend to happen when in low signal areas and more often when the screen is off. The wifi cuts off sometimes more rarely. Oh right, November security patches are out, update pretty please? <3
 

ezdi

Senior Member
Dec 14, 2010
94
42
Any chance you can update the APNs? On 17.1, the defaults for my carrier (T-Mobile US) include a bunch of irrelevant MVNOs, one of which includes a DUN profile so it can't be edited or deleted. Because that also claims to be an IMS profile, it was overriding the proper one. So the radio would just reset repeatedly if WiFi or LTE was available.

I eventually flashed this and got VoLTE working if I force a 3G connection first. I still end up with radio resetting if I lose signal or the only connection is WiFi (have never successfully established a VoWiFi connection). I totally understand if you want to minimize out-of-tree patches though.

I'm still trying to figure out why it requires the modem switcher in xperia parts and I have to do it manually if I lose signal. Could that be related to the bug you found? Unfortunately, needing to manually re-establish connection after going in a big building is kinda a deal killer...
 
Last edited:

Flamefire

Senior Member
Jul 26, 2013
211
450
Sony Xperia XZ1 Compact
Any chance you can update the APNs? On 17.1, the defaults for my carrier (T-Mobile US) include a bunch of irrelevant MVNOs, one of which includes a DUN profile so it can't be edited or deleted. Because that also claims to be an IMS profile, it was overriding the proper one. So the radio would just reset repeatedly if WiFi or LTE was available.

I eventually flashed this and got VoLTE working if I force a 3G connection first. I still end up with radio resetting if I lose signal or the only connection is WiFi (have never successfully established a VoWiFi connection). I totally understand if you want to minimize out-of-tree patches though.
Can you specify which profiles are invalid?

I can add those APNs. What is your MCC/MNC? https://android.googlesource.com/device/sample/+/refs/heads/master/etc/apns-full-conf.xml contains many entries fir T-Mobile US
 
Last edited:

ezdi

Senior Member
Dec 14, 2010
94
42
Can you specify which profiles are invalid?

I can add those APNs. What is your MCC/MNC? https://android.googlesource.com/device/sample/+/refs/heads/master/etc/apns-full-conf.xml contains many entries fir T-Mobile US

I feel it was one of the Ting Data profiles. It looks like it could cause a problem, but I don't see IMS on it like I thought it did.

I thought it was 310/260, but now that I look, I'm not seeing anything in the diff that would explain why it isn't getting loaded any more.

So something in my report is wrong. Sorry, I will investigate more and take notes. Or I wonder if I somehow carried over something from Sony or there's something in that zip I installed that did more than just update the file.
 

Flamefire

Senior Member
Jul 26, 2013
211
450
Sony Xperia XZ1 Compact
Updates will be there as soon as I got time. Likely in the next 2 days as usual ;)
Sorry guys the updates will take a bit longer after a very unpleasing experience with bootloops and the need for a partial reset of my phone during the tests of the latest update.
As I'm currently quite busy and really need my phone I got to be careful with experiments so either I find enough spare time to test it again to find the cause or I'll likely wait for the test phone which @landsome shipped 3 days ago, so it should be here anytime soon.

@ortizjammet and anyone who wants to play with HD audio:
I attached 2 files which you can try: 1 is the original (renamed as you can see) one the modified one I used to get PA to recognize HD audio. You can try those with:
-
Bash:
adb root
adb shell mount -o remount,rw /vendor
adb push ./audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml

Then reboot. To go back to original reflash LOS or repeat the above with the original file
 

Attachments

  • audio_policy_configuration.zip
    6.6 KB · Views: 12

rez78

Senior Member
Nov 16, 2017
135
27
Sorry guys the updates will take a bit longer after a very unpleasing experience with bootloops and the need for a partial reset of my phone during the tests of the latest update.
As I'm currently quite busy and really need my phone I got to be careful with experiments so either I find enough spare time to test it again to find the cause or I'll likely wait for the test phone which @landsome shipped 3 days ago, so it should be here anytime soon.

@ortizjammet and anyone who wants to play with HD audio:
I attached 2 files which you can try: 1 is the original (renamed as you can see) one the modified one I used to get PA to recognize HD audio. You can try those with:
-
Bash:
adb root
adb shell mount -o remount,rw /vendor
adb push ./audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml

Then reboot. To go back to original reflash LOS or repeat the above with the original file
But if i move this file with root explorer (my device is rooted) it will the same? Will work? Thanks
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.
    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 ;)
    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 ;-)
    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
    I went back to 19.1 in the meantime, but yesterday I also tried 18.1, and it had the same issue. Can I test the same thing by flashing the boot.img from 18.1 on 19.1?
    I can at least reproduce the "hearing own voice", will check if it happens on the older version too and then try to find what caused it. Not sure if that is possible though.
    Anyway: The 18.1 kernel does not work on 19.1, so NO don't try ;-)
  • 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...
    13
    @MarkMRL Update 20220516 is out which should also fix the headset issue. Reproduced, found and fixed it as far as I can tell.
    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!