• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM] LineageOS 17.1/18.1 UNOFFICIAL - (Update: 2021-11-29)

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


  • Total voters
    105
Search This thread

Flamefire

Senior Member
Jul 26, 2013
147
239
Sony Xperia XZ1 Compact
I tried that months ago and it worked flawlessly (also re-installed gapps on top). But no dirty downgrade.
@lossen1 I'd also think it should always work to upgrade and that likely gapps is the only issue, as there are different versions for Android 10 and 11, so maybe that (and something similar) are the only difficulties.
If I get really bored I'll try a dirty downgrade with reinstall of gapps and see if that works on the test phone (and also verify the dirty upgrade, but yeah, that seems to work).
But well, HD audio is next on my list first.
 

gladykov

Member
Jul 12, 2010
30
3
Dirty flashed latest 18.1 and works nicely, thank you! But since 18.1 Gabeldorsche bluetooth stack from Developers options is not working for me (I said once it worked, but I lied by accident). Could someone try it out ? It gives faster connections.

Pasting here stack trace, as didn't found anything related in Google:

Code:
[12-07 20:22:12.874 5603:5645 F/libc]
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20 in tid 5645 (bt_stack_manage), pid 5603 (droid.bluetooth)

pid: 5603, tid: 5645, name: bt_stack_manage  >>> com.android.bluetooth <<<

      #02 pc 0000000000677830  /system/lib64/libbluetooth.so (bluetooth::os::Handler::Post(base::OnceCallback<void ()>)+36) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #03 pc 000000000066b824  /system/lib64/libbluetooth.so (bluetooth::security::pairing::ClassicPairingHandler::NotifyUiDisplayYesNo()+232) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #04 pc 0000000000672860  /system/lib64/libbluetooth.so (bluetooth::security::pairing::ClassicPairingHandler::OnReceive(bluetooth::hci::UserConfirmationRequestView)+3872) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #05 pc 000000000063bb4c  /system/lib64/libbluetooth.so (void bluetooth::security::internal::SecurityManagerImpl::HandleEvent<bluetooth::hci::UserConfirmationRequestView>(bluetooth::hci::UserConfirmationRequestView)+1524) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #06 pc 000000000063519c  /system/lib64/libbluetooth.so (bluetooth::security::internal::SecurityManagerImpl::OnHciEventReceived(bluetooth::hci::EventPacketView)+2564) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #07 pc 000000000066b464  /system/lib64/libbluetooth.so (bluetooth::security::channel::SecurityManagerChannel::OnHciEventReceived(bluetooth::hci::EventPacketView)+272) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #08 pc 000000000066ae40  /system/lib64/libbluetooth.so (void base::internal::FunctorTraits<void (bluetooth::security::channel::SecurityManagerChannel::*)(bluetooth::hci::EventPacketView), void>::Invoke<void (bluetooth::security::channel::SecurityManagerChannel::*)(bluetooth::hci::EventPacketView), bluetooth::security::channel::SecurityManagerChannel*, bluetooth::hci::EventPacketView>(void (bluetooth::security::channel::SecurityManagerChannel::*)(bluetooth::hci::EventPacketView), bluetooth::security::channel::SecurityManagerChannel*&&, bluetooth::hci::EventPacketView&&)+164) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #09 pc 000000000066ad64  /system/lib64/libbluetooth.so (base::internal::Invoker<base::internal::BindState<void (bluetooth::security::channel::SecurityManagerChannel::*)(bluetooth::hci::EventPacketView), base::internal::UnretainedWrapper<bluetooth::security::channel::SecurityManagerChannel> >, void (bluetooth::hci::EventPacketView)>::Run(base::internal::BindStateBase*, bluetooth::hci::EventPacketView&&) (.cfi)+60) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #10 pc 00000000005140c4  /system/lib64/libbluetooth.so (void base::internal::FunctorTraits<base::RepeatingCallback<void (bluetooth::hci::EventPacketView)>, void>::Invoke<base::RepeatingCallback<void (bluetooth::hci::EventPacketView)>, bluetooth::hci::EventPacketView>(base::RepeatingCallback<void (bluetooth::hci::EventPacketView)>&&, bluetooth::hci::EventPacketView&&)+176) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #11 pc 00000000006776e0  /system/lib64/libbluetooth.so (bluetooth::os::Handler::handle_next_event()+276) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #12 pc 0000000000678b08  /system/lib64/libbluetooth.so (bluetooth::os::Reactor::Run()+536) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #13 pc 00000000006795b8  /system/lib64/libbluetooth.so (bluetooth::os::Thread::run(bluetooth::os::Thread::Priority)+176) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

      #14 pc 000000000067962c  /system/lib64/libbluetooth.so (void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (bluetooth::os::Thread::*)(bluetooth::os::Thread::Priority), bluetooth::os::Thread*, bluetooth::os::Thread::Priority> >(void*) (.cfi)+68) (BuildId: a4dab97adc9f09d6aff0e7f11bca33ab)

uid=1002(bluetooth) crash_dump64 identical 2 lines

[12-07 20:22:13.513 861:861 E/Diag_Lib]
BluetoothDeathRecipient: Calling HAL close

[12-07 20:22:13.513 861:861 W/[email protected]_hci]
BluetoothHci::close()

[12-07 20:22:13.514 1455:3166 W/BluetoothManagerService]
Profile service for profile: ComponentInfo{com.android.bluetooth/com.android.bluetooth.hfp.HeadsetService} died.

[12-07 20:22:13.515 1455:1774 I/ActivityManager]
Process com.android.bluetooth (pid 5603) has died: psvc PER

[12-07 20:22:13.515 1455:1455 D/BluetoothManagerService]
BluetoothServiceConnection, disconnected: com.android.bluetooth.btservice.AdapterService

[12-07 20:22:13.515 1455:1455 D/BluetoothManagerService]
BluetoothServiceConnection, disconnected: com.android.bluetooth.gatt.GattService

[12-07 20:22:13.515 1455:1500 E/BluetoothManagerService]
MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED(1)

[12-07 20:22:13.516 1455:1774 W/ActivityManager]
Scheduling restart of crashed service com.android.bluetooth/.gatt.GattService in 1000ms for connection
 

Top Liked Posts

  • 1
    .
    If I get really bored I'll try a dirty downgrade with reinstall of gapps and see if that works on the test phone (and also verify the dirty upgrade, but yeah, that seems to work).
    Dirty downgrade failed for me.
  • 10
    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.
    7
    I'm writing this from my phone updated to 17.1 November build. Hence I consider it stable :)

    December update will be there mid December, I'd say. Not sure if I manage to fix HD audio till then

    So far, wish you a nice Advent season!
    5
    Updates will be there as soon as I got time. Likely in the next 2 days as usual ;)
    5
    Next update to keep you guys posted and tell a bit where the donations go:
    I was successfully able to reproduce a working ROM at the state of the October build. This is good news because it means at least I'm able to publish a fixed 17.1 version where IMS (VoLTE, VoWifi) works again if the November sources really don't work anymore and more importantly also means I have a starting point to bisect which changeset breaks the boot process. This is still VERY cumbersome but at least something.

    This trial&error method would NOT be possible without the test phone, as a failed attempt (soft brick) means I have to completely reset the phone, flash stock etc. which I obviously can't do on my own phone (which I especially now really rely on)
    The donations allowed me to upgrade my build machine with more RAM and SSD memory. This was still expensive but due to the donations it wasn't that much any more and at least the RAM (but not the SSD) is also useful for myself as I have my games on another partition on the same PC ;-) The SSD(s) were required as LOS (especially multiple versions) takes a lot of space and having that and the extended RAM allows for faster turnaround times in building making testing a bit easier. For comparison: A full LOS build from scratch on my old machine took ~8hrs, now on my new PC with the extended RAM and SSD I'm down to about 2hrs.

    So far... Now comes the painful work of figuring out what breaks the boot.
    Still: If anyone has information on how to debug such soft bricks that would help a lot!
    4
    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
  • 33
    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.

    INSTALLATION

    Put the zip file of the ROM on you sdcard or internal store and boot into recovery.
    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.

    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.

    KNOWN ISSUES
    • UnifiedNlp doesn't work with LineageOS 18.1 yet
    • Spell checking doesn't switch if you change keyboards
    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

    Version Information
    Status:
    Stable
    Stable Release Date: 2021-10-19
    12
    CHANGELOG


    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
    10
    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.
    7
    I'm writing this from my phone updated to 17.1 November build. Hence I consider it stable :)

    December update will be there mid December, I'd say. Not sure if I manage to fix HD audio till then

    So far, wish you a nice Advent season!
    6
    "Major performance improvement" sounds great!

    This would be for both 17.1 and 18.1, yes?

    By the way, would it be worthwhile donating a device to allow you to develop and test both 17.1 and 18.1 simultaneously?
    No only 17.1. Basically building with the same compiler as 18.1 which has better optimizations (3 versions difference) and found a few bugs through that...

    This is a kind offer but no. I don't really have time to do much dev on this. When building the 17.1 I use it myself and see that works. Then I provide this here for others to benefit too. The 18.1 is just a bonus as changes to 17.1 usually work on 18.1. But as mentioned I don't have time for dev or testing on something I don't use myself anyway :)