• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[ROM] [11] LineageOS 18.1 [OFFICIAL]

Search This thread

NextGeneration9501

Senior Member
Aug 18, 2015
56
2
2okPze5.png

Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
About LineageOS
LineageOS is a free, community built, aftermarket firmware distribution of Android 11.x (R),
which is designed to increase performance and reliability over stock Android for your device.

All the source code for LineageOS is available in the LineageOS GitHub repo.
And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

Official LineageOS website : http://lineageos.org
About LineageOS Legal : http://lineageos.org/legal/

Important Information
1. This ROM has nothing related to ODM images! So you don't need to ask/install anything like that, just follow the instructions.
2. This ROM will never work with any versions of Google Camera (GCam)!
3. You need to flash Stock Android 10 before flashing this ROM.
4. For VoLTE, you need to boot into stock firmware and enable it before flashing this ROM!


Downloads Links
LineageOS 18.1:
Unofficial-build:
Link

Google Applications (optional):
OpenGapps:
http://opengapps.org/ (ARM64->Android 10.0->Pico, Nano or Micro)
Information: Flash the GApps before the first boot. If not, a clean flash is recommended.

Flashing and updating
How to flash

Make sure you are upgrade to Official Android 10.0 from Sony
Unlock bootloader is necessary.
To disable AVB 2.0 using fastboot:
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
For vbmeta.img, you can download it anywhere you found.
More steps see wiki

Never flash oem from SODP!!
If you flashed oem and meet any issues, I could only say you are a hanhan.

Root access:
Flash Magisk in recovery.

Twrp:
You could download it here: Link
Code:
fastboot boot twrp.img

Issues and reports

Report issues only if you are using the ROM kernel
If an additional mod is installed, make sure it's unrelated, and mention it
Make sure the issue wasn't discussed earlier in the threads
Share a log of the error with CatLog for example

Also thanks to:
Olivier
Luk1337
The LineageOS Team
The CyanogenMod Team
Everyone involved in working and testing

XDA:DevDB Information
Lineage 18.0 for Xperia XZ2, ROM for the Xperia XZ2

Contributors
Sjll, Olivier
Source Code: https://github.com/sony-sdm845

ROM OS Version: Android 11
ROM Kernel: Linux 4.9
ROM Firmware Required: Official Android 10.0 firmware
Based On: LineageOS

Version Information
Status:
Testing

Created 2020-11-27
Last Updated 2021-01-17

Hi. I got Unsupported SanDisk SD card problem. SD Card uses exFAT. Windows can read my card but not my phone. Tried formatting it to NTFS but to no avail. I cannot format it to FAT32 because of 64GB capacity.
 

Olivier

Recognized Developer / Retired Forum Moderator
Nov 6, 2011
2,662
6,913
So latest build is 18.0 from November?
Seems a big pause in development.
I will try building with the 18.1 sources on Lineage GitHub and see what happens.....

Edit: Fixed the build errors but it wont boot and devs seem to have moved on.
Back to 17.1 nightlies
Hi shoey63, it's been a while :)

we haven't really been able to work on 18.1 due to time constraints (and I'm not sure if this is going to change anytime soon...). There have been several changes since 18.0 -- upgrading the graphics stack makes the system boot, but breaks the camera (as Sjll pointed out).
If you're interested in the details, feel free to join our Telegram channel.
 
  • Like
Reactions: IDariuz and shoey63

Sjll

Recognized Developer
Jun 4, 2017
494
560
Chongqing
Hi, LineageOS 18.1 is not given up,

Here is the rebase kernel for LineageOS 17.1/18.0/18.1, which tag at LA.UM.9.3.r1-01700-sdm845.0. You can try and feedback to us. Some wired issues like TF card reading should be fixed.

Steps: Flash dtbo in fastboot and sideload the Anykernel3 in LineageOS Rec.

Device:
akari > XZ2
apollo > XZ2C
akatsuki > XZ3

 
Last edited:

seilent

Senior Member
Jun 11, 2010
294
232
28
Xperia XZ2
Glad to tell everyone who are waiting for LineageOS 18.1.
I uploaded the 20210515 build for Akari, but I don't have device to test.
From the result on XZ3, everything works fine.
Please test and feedback, if there is no bug, we will get official 18.1 support sson.
Thanks!
gonna try and report after few hours
 

seilent

Senior Member
Jun 11, 2010
294
232
28
Xperia XZ2
Installed and running fine, using gapps from first post

so far compared to previous build
> USB to 3.5mm issue fixed
> USB C DAC also still working fine
> Orientation bug is fixed (where navbar stuck in potrait / landscape sometimes)
> Weird storage bug is fixed (previously some app can't even access their own obb folder)
> Wireless charging works
> Snapcam is working fine, but installing SEMC camera from 17.1 causes bootloop
 

Sjll

Recognized Developer
Jun 4, 2017
494
560
Chongqing
Installed and running fine, using gapps from first post

so far compared to previous build
> USB to 3.5mm issue fixed
> USB C DAC also still working fine
> Orientation bug is fixed (where navbar stuck in potrait / landscape sometimes)
> Weird storage bug is fixed (previously some app can't even access their own obb folder)
> Wireless charging works
> Snapcam is working fine, but installing SEMC camera from 17.1 causes bootloop
Thanks, plz try 0515 Refresh version, which solved the battery drain issue.
 
  • Like
Reactions: seilent

joska59

Senior Member
Oct 20, 2007
58
6
Hello Yesterday I did an update over installed Los 17.1 from original Lineageos-website. I'd used the two files from start-post.
First try, no clean install. Afterwards, the rom didn't start and I got a hint to format data. Did so and flashed los 18.1 again.
Don't remember, of I left Gapps, but in first try, I'd flashed both together.
After secobd flash, Los 18.1 boots up well, but play store was absent. So flashed again and now, all seemed to be fine.
Some minutes later, I recognized that gps failed.

Could this be a consequence of flashing in two steps.

One more question. This rom has no entry for extended reboot-options. Quite right?

Best regards and thanks for your work, Joska
 
Last edited:

joska59

Senior Member
Oct 20, 2007
58
6
Some more info. Tried to flash again LOS and Mindthegapps over installed LOS 18.1. Tage Result is, no more boot into LOS, a long boot animation which ends into a reboot to recovery. Here, I get the same information, data maybe corrupted snd needs to be erased by format data.
I did so, and LOS 18.1 reboots now.

While this hole process, I'd seen, that there are teo kinds auf recovery. After first boot into recovery, flashed from source Lineageos 17.1, I only find one choise to install from adb/sideload.
Now, I can reboot (before flashing) into recory (I am in recovery), and after doing so, the option to install from disk occurs.
What does that mean?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Sorry, I should've been more specific. I do use UAPP for local music playback, and it works fine. I think this is because it uses its own usb dac driver, not the one built into android.

    I'm testing out Apple Music, which has rolled out lossless and High Resolution recently. When testing a 192Khz track, my dac doesnt indicate 192Khz is playing. Note that it just lights up different colors to show what mode it is playing back in, so I can't tell exactly what mode it is since 44.1-96khz use one color. The rest use other colors, so I can confirm 192Khz is not being used

    (deleted below)
    Hello @hotcakes_shinku.
    Although I don't have Xperia's, I made a script to change the USB sample rate (for UAC drivers) on the fly like MacOS or bluetooth LDAC. This script was made for Galaxy S4 (LineageOS 18.1) and GSI's (A10 and A11) for avoiding annoying SRC distortion, but it could work for Xperia.

    Under Magisk environment (changing its root name space mount mode to global needed), expand the attached zip file under "/sdcard" and execute this script.

    Usage: sh /sdcard/USB_SampleRate_Changer/USB_SampleRate_Changer.sh --offload [[44k|48k|88k|96k|192k] [[16|24|32]]]

    I recommend to use Script Manager or something for easiness.

    Enjoy it!

    Edit: almost music streaming apps like Apple music, Spotify, etc. are using a UAC (USB Audio Class) 2.0 driver which usually connects to DACs with 96kHz 32bit mode. My script changes this sample rate and bit depth on the fly. You can see its connected sample rate and bit depth by a command, "dumpsys media.audio_flinger".
    Search "USB HEADSET" in the result of the command.

    Edit2 (fixed): I found XZ2 uses USB audio hardware offloading instead of usual (legacy?) USB audio module. Its sample rate range is 44.1kHz to 192kHz, but XZ2's audio policy fixes its rate at 48kHz (16bit) now. I added its support (experimental) to my script (V1.2.1). Under selinux enforcing mode, this script hadn't been used. This bug was fixed in V1.3.
    1
    Your rom is amazing. Phone not hot while idling, geekbench scores are what to expect from SDM845. But there's one thing bothering me. Is there any way to have stock-like vibration back? Like when typing something in stock ROM, it feels like you're actually pressing a key, not just buzzing. Please let me know whether it's possible or not. Thanks.
    1
    Thanks for the info and links. I just found time to test this out sorry.

    Using the cat /proc/asound/card1/pcm0p/sub0/hw_params from your github page, I can confirm that my usb dac is stuck in 16/48 mode while playback with Apple Music. Using your script and setting to 96khz, it is still stuck in 48khz.

    After installing your unlocker magisk module, tested higher than 96khz reports 96khz lock error, and its still stuck in 48khz when testing 96khz.
    I checked Akari's source codes, and found its /vendor/etc/audio_policy_configuration.xml was a bit bizarre. The sample rate of USB headsets ("USB Headset Out") is fixed 48kHz 16bit or 24bit. But /vendor/etc/audio_policy_a2dp_offload_disabled.xml is common among other Android devices. If you can disable "a2dp_offload", you could use my USB_SampleRate_Changer script. Otherwise you must rewrite the XML file if you need.
    XML:
    From audio_policy_configuration.xml,
    
    ...(deleted)
    <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST">
       <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                       samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
    </mixPort>
       ...(deleted)
    <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
    </devicePort>
       ...
    <route type="mix" sink="USB Headset Out"
      sources="primary output,raw,deep_buffer,compressed_offload,hifi_playback,
      mmap_no_irq_out,voip_rx"/>
       ...(deleted)
    1
    The Disable Bluetooth A2DP hardware offload toggle in Developer options is off by default. Toggling it does nothing, it asks to restart, but stays off after a restart.

    I think I'll refrain from modifying the xml file. It might have been done for compatibility with LOS 18.1, as this wasn't a problem in 17.1.

    Thanks for looking through the source code and confirming my problem.
    In #108, I attached an updated USB_SampleRate_Changer supporting (USB) hardware offloading (44.1kHz to 192kHz 16,24,32bit modes) like XZ2. If you like, try this script with "--offload" option. In details, see README.md in the attached zip. This script never change system files, so you can revert to the state before executing this script whenever rebooting your device or using "--reset" option.
    1
    Which is the best camera app for lineage os?
    Open Camera all the way :) IMHO

  • 17
    Good news, we will go 18.1 official in next week.
    12
    2okPze5.png

    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    */
    About LineageOS
    LineageOS is a free, community built, aftermarket firmware distribution of Android 11.x (R),
    which is designed to increase performance and reliability over stock Android for your device.

    All the source code for LineageOS is available in the LineageOS GitHub repo.
    And if you would like to contribute to LineageOS, please visit our Gerrit Code Review.

    Official LineageOS website : http://lineageos.org
    About LineageOS Legal : http://lineageos.org/legal/

    Important Information
    1. This ROM has nothing related to ODM images! So you don't need to ask/install anything like that, just follow the instructions.
    2. This ROM will never work with any versions of Google Camera (GCam)!
    3. You need to flash Stock Android 10 before flashing this ROM.
    4. For VoLTE, you need to boot into stock firmware and enable it before flashing this ROM!


    Downloads Links
    LineageOS website

    Google Applications (optional):
    MindTheGapps
    Information: Flash the GApps before the first boot. If not, a clean flash is recommended.

    Flashing and updating
    How to flash

    Make sure you are upgrade to Official Android 10.0 from Sony
    Unlock bootloader is necessary.
    To disable AVB 2.0 using fastboot:
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    For vbmeta.img, you can download it anywhere you found.
    More steps see wiki

    Never flash oem from SODP!!
    If you flashed oem and meet any issues, I could only say you are a hanhan.

    Root access:
    Flash Magisk in recovery.

    Twrp:
    You could download it here: Link
    Code:
    fastboot boot twrp.img

    Issues and reports

    Report issues only if you are using the ROM kernel
    If an additional mod is installed, make sure it's unrelated, and mention it
    Make sure the issue wasn't discussed earlier in the threads
    Share a log of the error with CatLog for example

    Also thanks to:
    Olivier
    Luk1337
    The LineageOS Team
    The CyanogenMod Team
    The SODP Team
    Everyone involved in working and testing

    XDA:DevDB Information
    Lineage 18.1 for Xperia XZ2, ROM for the Xperia XZ2

    Contributors
    Sjll, Olivier
    Source Code: https://github.com/sony-sdm845

    Donation
    https://paypal.me/sjllls

    ROM OS Version: Android 11
    ROM Kernel: Linux 4.9
    ROM Firmware Required: Official Android 10.0 firmware
    Based On: LineageOS

    Version Information
    Status:
    Stable

    Created 2020-11-27
    Last Updated 2021-05-26
    5
    Glad to tell everyone who are waiting for LineageOS 18.1.
    I uploaded the 20210515 build for Akari, but I don't have device to test.
    From the result on XZ3, everything works fine.
    Please test and feedback, if there is no bug, we will get official 18.1 support sson.
    5
    If so, why does installation of ROM and gapps in same routine lead to missing gapps? Why is it necessary to reboot after installation of ROM in recovery. Excuse me, but I feal, I'm to sill yto understand ;-(
    The XZ2 is an A/B device, i.e. it has two system partitions (one in slot A, one in slot B). This has the advantage that an update of the system can be done by the user while he is still using his device. No long pause for the update is required. Just a quick reboot at the end of the process to switch slots, and that's it.

    When such an OTA update comes in or a ROM gets installed via TWRP, then the update gets installed on the currently inactive slot. Let's assume slot A is currently active and we want to install a custom ROM, then the new ROM will get installed in the inactive slot B. This slot then gets marked as the one to boot from on the next restart. Now, to my understanding (otherwise people should please correct me), other zips, like GApps, always get installed into the currently active slot. Since slot A is still active, but you want to have the GApps installed for the new system in slot B, you first have to make slot B active. This can be done by a restart into recovery, because slot B was just marked as the one to become active on next boot. After the reboot into recovery slot B will be active and the installation of GApps will then be done for this now active slot B - which is exactly what we wanted.

    Btw., this procedure is this way not only for the XZ2 but for any A/B device.

    Hope this helps
    5
    So latest build is 18.0 from November?
    Seems a big pause in development.
    I will try building with the 18.1 sources on Lineage GitHub and see what happens.....

    Edit: Fixed the build errors but it wont boot and devs seem to have moved on.
    Back to 17.1 nightlies