• 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

joska59

Senior Member
Oct 20, 2007
58
6
Next: the now installed LOS 18.1 with Mindthegapps has no play store again.
I could do the same, as before, flashing Mtg, that works, but not gps.

What could be the next step to solve these problems?
I'm interested in doing my own part of finding the faults, may be, my knowledge is to low.
 
Last edited:
Next: the no installed LOS 18.1 with Mindthegapps has no play store again.
I could do the same, as begore, flashing Mtg, that works, but not gps.

What could be the next step to solve these problems?
I'm interested in doing my own part of finding the faults, may be, my knowledge is to low.
TLDR: Flash LineageOS, DO NOT boot into system, reboot directly to recovery, then flash Gapps (MindTheGapps, Nik, etc)

Explaination:
If you flashed Gapps right after flashing LineageOS, you've done it wrong.
This is because, XZ2/C/P/3 has A/B partition, which means, after flashing LineageOS, it will automatically switch to another slot. If you're flashing Gapps at this time, it goes into the slot which you're not gonna boot into. You need to reboot to recovery once to switch the slot (assuming you're using LineageOS Recovery), or switch slot in TWRP, then flash other addons.
 
  • Like
Reactions: farukr1

joska59

Senior Member
Oct 20, 2007
58
6
You need to reboot to recovery once to switch the slot (assuming you're using LineageOS Recovery), or switch slot in TWRP, then flash other addons.
@aaawqw
Thank you for this good explanation. In my mind, Ive thought, that using copy-partion.zip would lead to same result in both slots. My fault. So, I will try again and show my results at this thread.
Joska
 

joska59

Senior Member
Oct 20, 2007
58
6
I did it again;-) Start with installing the LOS-Recovery, factory reset, sideload of LOS-18.1.ZIP, (as I remember, Slot b has been shown before starting sideload), rebooting into recovery, sideload of Mindthatgapps.ZIP, once again reboot into recovery, because Slot a was shown again. After reboot, Slot a was shown further.

At that point, unsure, if I did it correct, I did a reboot and it started up with another login-screen. Now, GAPPS seemed to be installed, but I can't login to playstore.
I'd this problem in the beginning of installing LOS 17.1, I did that in different ways, I probably got the right combination of slots by chance, at some point the problem with the login disappeared. Unfortunately I don't know what the reason was.
So, it is a success, but no solution at all.
 

joska59

Senior Member
Oct 20, 2007
58
6
Another observation: when I connect to the local WiFi, I can't access the Play Store, but when I use a hot spot on my other smartphone, I can access it, but I can't download all the apps I bought. The App Store interface also does not appear identical to that of the other smartphone. Let's see if there are any updates here.
 

joska59

Senior Member
Oct 20, 2007
58
6
I understood it to mean that the boot slot is changed every time I reboot into recovery. I tested this a few times by booting from recovery to recovery several times. However, slot a was displayed to me every time.

What have I misunderstood now?
 

Sjll

Recognized Developer
Jun 4, 2017
496
560
Chongqing
Another observation: when I connect to the local WiFi, I can't access the Play Store, but when I use a hot spot on my other smartphone, I can access it, but I can't download all the apps I bought. The App Store interface also does not appear identical to that of the other smartphone. Let's see if there are any updates here.
Try to feedback to MindTheGapps or NikGapps.
I understood it to mean that the boot slot is changed every time I reboot into recovery. I tested this a few times by booting from recovery to recovery several times. However, slot a was displayed to me every time.

What have I misunderstood now?
No, slot only be changed when your flashable package try to do it. For example, OTA update package.
 

joska59

Senior Member
Oct 20, 2007
58
6
Did this just some minutes ago, but same behavior. There is no probleme to use play store, when connected to my XZ2-Hotspot (1. wifi), but many problems, when connected to fritz.box (2. wifi).
With second wifi, surfin' with browser is possible, but not using play store. I'd remarked this first time, when I installed LOS 17.1 2 month ago. This issue disappaered all of sudden with no obvious reason, I could prove. Maybe some limmitations of wifi (2)?
 

joska59

Senior Member
Oct 20, 2007
58
6
Did this just some minutes ago, but same behavior. There is no probleme to use play store, when connected to my XZ2-Hotspot (1. wifi), but many problems, when connected to fritz.box (2. wifi).
With second wifi, surfin' with browser is possible, but not using play store. I'd remarked this first time, when I installed LOS 17.1 2 month ago. This issue disappaered all of sudden with no obvious reason, I could prove. Maybe some limmitations of wifi (2)?
Seems to be solved :) The DHCP-range was to small, so the new XZ2 got no IP4-adress ;-( My fault. May be, this embarrassing experience will help others in the future. ;-)

That means, IP6 is not enough to use PlayStore.
 
Last edited:

Ecthelion4

Senior Member
Apr 14, 2017
59
25
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
 

joska59

Senior Member
Oct 20, 2007
58
6
Another question; if now LOS 18.1 is installed, is then the recovery part of the ROM, or is installed by this with? Can I also install a TWRP afterwards, if so, which one?
Joska
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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