yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] vaibhavdangayachvd:
So you're using TWRP ? If yes then is it possible that something which is retaining your TWRP also letting you update seamlessly? I think people with lineage recovery are facing problems
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] enapah:
I'm not using TWRP, just plain Lineage updater for the OTA.

I did my first flash with TWRP though, but haven't installed it or used it since (and it would likely not work that well, since the TRWP I've used for the first flash does not support the user data encryption of this ROM).
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Shotg1:
[MENTION=3839575]mikeioannina[/MENTION] pls fixed otg and wired headset
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Sam7a2:
[MENTION=3839575]mikeioannina[/MENTION] and pls increase the max call volume to 100, I mainly switched to LOS to be able to have this tweak. So, if u did, u'll be a lifesaver.

---------- Post added at 02:04 PM ---------- Previous post was at 02:03 PM ----------

Why did u switch slot after flashing the ROM and before flashing magisk?!!

---------- Post added at 02:05 PM ---------- Previous post was at 02:04 PM ----------

Why did u switch slot after flashing the ROM and before flashing magisk?!!
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] enapah:
That's how the A/B system works. Your ROM is always flashed to the inactive slot, so that your phone can recover seamlessly from a bad flash, while the applications/addons are flashed to the active slot like usual.

Thus, on the very first flash, you need to make the inactive slot active before flashing the apps. Selecting the inactive slot and rebooting back into recovery does that trick flawlessly.

Edit: if you just want magisk in a gappless system, then you may get away without switching slots because the magisk installer will flash into all slots.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Sam7a2:
Ah, I see. I kind of assumed this is already handled in the installation scripts, which btw seems more logical to me.

Thanks for the info.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
I tried this, and it never booted (stuck on the boot animation).

I found that the wired headset still doesn't work - the bug is the same as before. Tried with both clean and dirty flashes.

But indeed, we have the FP notification gesture now, which is great. To be honest though, the swipe to dismiss is very finicky, and most of the time I dismiss notification while trying to close the notification shade. I won't miss the feature.

Regarding the complaints about GApps, I decided to investigate:

- I clean-installed the 0620 build. Rebooted to switch active slot and flashed Magisk followed by OpenGApps (with custom config)

- Signed in during the setup wizard, went straight to the OTA app and updated to 0704 (I did not re-flash Magisk)

- Rebooted after install completed, and GApps are still there and signed in.

You guys reporting problems with missing GApps should probably post what exact GApps package you use and the exact steps you're following to update.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Lurensu:
I've always used the nano Gapps package suggested in the OP and I've always installed Magisk after the Gapps. I use Magisk in Core Mode only and I have completely disabled the option to grant SU privileges to ADB/apps. I've already tried updating through the OTA 2 times, simply letting the installer do its own things and then rebooting (without re-flashing Magisk), but both times my Gapps stopped working after the reboot.

Have you wiped both slots through TWRP before the LOS installation? I think I'll try this approach the next time, my theory is that the inactive slot is not clean and so it can cause issues after the update, but I'm not sure.

BTW I'm not complaining, I really love this ROM and it's definitely much better than the piece of garbage that Xiaomi provides!

I can only express gratitude to the maintainer
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] umeshbluezzz:
Safetynet failed on latest version.cant use any gcam force closes.any help?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
I tried replicating your scenario:

- Boot TWRP 3.3.1-5 (unofficial 4pda build)

- Wipe->Factory reset (default wipe, I did not wipe /system on either slot)

- ADB sideload 0620 build

- Change slot, boot TWRP again

- ADB sideload latest OpenGApps nano, followed by Magisk

- Reboot and go through setup wizard (but I didn't bother signing in to save time)

- Enable Magisk core only, reboot again

- Update using OTA app, do not flash Magisk to inactive slot

- Reboot after update

- It works, GApps are still there.

So obviously there's some other factor to it. Could you try these exact same steps from a clean install and test if they work? Maybe there's something else about your setup that's causing problems?

(Note: I had encryption disabled for this experiment for simplicity, but I have updated previously with encryption enabled as well and it works fine)

SafetyNet failed on the previous build as well, and will probably never pass again on custom ROMs due to changes on Google's end.

The latest GCam apk from here works okay. You need to have GApps installed for GCam to work (or possibly MicroG).

I tried this out myself, and strangely, when the official LOS is installed, the latest TWRP 3.4.0-0 freezes on boot logo.

However, with the unofficial LOS installed, 3.4.0-0 works just fine. No idea why. Same situation with OrangeFox.

I'm using the unofficial 4pda build of 3.3.1-5 because it works reliably.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] UltraTheAlpha:
Have you tried "fastboot -w"?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
Obviously that works, that formats the data partition and is the same as a clean flash. The question was about a dirty flash.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] umeshbluezzz:
Yes i have gapps installed.does any kernel work in this rom?

Safetynet passes with magisk hide prop fingerprint model change
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] androshanki:
Why so complicated ? Why it can't be like other roms (PE, Havoc etc )
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] vaibhavdangayachvd:
It's not complicated but it's just one simple extra step just to ensure that we don't lose gapps or corrupt data after ota

I also don't know why for some people ota are smooth and for some there are so many issues so better be safe.

As per my observation I can say that people who have problems are those who installed los through los recovery and installed open gapps nano followed by magisk.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] jskeletti:
Hey, it's just only the official way, documanted in LOS wiki... So what, let's **** up everyone's phones. I'm pissed to set up my phone again everytime LOS on Xiaomi gets an OTA Update. Other ROMs get this together, even unofficial LOS ROMs. Where is the problem to look into their sources? What is this? Pride?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] drt1:
I second the ones having no problems with gapps after update. Been on the rom since June 6 build and have updated every week (thus, three times). Followed installation instructions on los page verbatim, using nano gapps. Have updated all three times just by downloading, installing and rebooting. Smooth and no headaches every single time.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Ulver:
Same here
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] caio.cobucci:
To install the update via OTA should I do something in magisk? Like turn on the core mode or turn off all the modules? For what I can understand I should not uninstall Magisk, right?

Thanks!
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] carlosm182:
Same here.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Lurensu:
Did you wipe everything on both slots with TWRP before the first flash?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] drt1:
I used lineage recovery, not twrp. Every single step as per official installation instructions.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] enapah:
Correct. AFAIK, you only need to uninstall Magisk when using the stock ROM.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Lurensu:
Well, I did the same and I lost the Gapps every time I updated. Quite curious..
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Sam7a2:
I maybe missed doing that when I'd first installed los. :(
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] archienesss:
thank you for the feedback, sir! May I please know if you installed magisk or not?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] chrome6boy:
Except for flashing Magisk, which I assumed you did and which was not in the official instructions.

I followed the official instructions (with the addition of Magisk installation before OpenGapps Nano) and everything is great so far. I don't use OTG or wired headphones. All is good.

Many thanks to the devs for their hard work and detailed instructions. I would recommend they add the necessity to flash Magisk with Gapps to the instructions.

Lineage rules!
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Shotg1:
Im looking for changelog comes with update but i haven't see any changelog fixing otg and headphones (wired) i dont know if this will be fixed or it stay like that, looks like there's no plan fixing major bug
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Ifaisalabid1:
Just boot into fastboot mode once and restart. Wired headset will work. Not sure about OTG as I haven't tested
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Shotg1:
Yeah so Everytime wired headset not working need to do that, i dont think its ok. Think its kernel issue, aosip they used los 17.1 official sources but they fixed the otg and wired headset issue
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] drt1:
I did, seems like without that gapps will not be retained. Haven't tested myself, but everyone who tried and reported here said it didn't work.

Yes and no. Instructions are there, but guess you meant that it doesn't say you must install Magisk to retain gapps. To which I'd reiterate what I already wrote above in reply to someone else. I see no obligation on the side of Los to tell us how to install gapps, the guide is meant for lineages, not potential add-ons. If you start going down that path, why not include in guide instructions for every possible add-on?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
The LOS wiki entry for jasmine_sprout includes the following line:

It is not a stretch to imagine that it might be changed to this:

Or, to follow your logic, Google Apps should not be mentioned at all.

Why mention Google Apps? Why add further instructions that you should pick the arm64 architecture?

They could just say:
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] archienesss:
My apologies, sir but I have a few more questions since this is my first time flashing on a phone with a/b partition :D

1. do you wipe both partitions first before flashing los and other apps?

2. the step to reboot after flashing los to install gapps, will it automatically switch to the other partition reserved for gapps, magisk etc.?

thank you again, sir!
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] evertonjcorreia:
Today was my first OTA in the rom, it fails, after the updater asks me to restart, the phone restarts it won't even go to recovery and will just blink that "unlocked" awareness screen a couple of times and just boot into the old release again. Is anyone aware what could be the problem? Using adb to update the rom from LOS Recovery worked, but I lost gapps and magisk.

EDIT:

Ok, I'm starting to see somewhat of a pattern here, would you guys care to respond some question?

Is your OTA working for you?

Did you use the official guide to install your rom followed by flashing magisk to prevent OTA?

Do you lose gapps or magisk after update?

What version of gapps are you using?

My theory is that the size of the gapps package is messing with the OTA updates, as most people having sucessfull OTA updates are the ones using the smaller zips, like gapps pico. I'm using mini.

Let's be a community and try to raise some information for the devs, *****ing, demanding and complaining helps with nothing (apart from driving developers away ofc).
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
I updated my wife's phone to the latest build as well - straight from 0606 to 0711.

The update over OTA went smoothly as expected. LOS + OpenGApps Nano + Magisk. I did not flash Magisk to inactive slot, just plain vanilla OTA and reboot.

I heartily second this. Please, for heaven's sake, post all the details of your setup if the update fails!

- What steps did you follow exactly?

- What GApps package do you use?

- Did you flash Magisk?

There's no point in saying "it didn't work" and expecting everyone else to figure it out.

1. It is sufficient for you to wipe data (there is only one /data). You don't need to wipe the internal storage. The /system partitions will be wiped by the ROM package when it is flashed.

2. There are two /system partitions - slot A and slot B.

- When you are on slot A and flash a ROM, it gets flashed to slot B (opposite slot)

- When you are on slot A and flash an addon (GApps, Magisk), it gets flashed to slot A (same slot)

- When you are on slot B and flash a ROM, it gets flashed to slot A (opposite slot)

- When you are on slot B and flash an addon, it gets flashed to slot B (same slot)

There is no slot reserved for GApps and Magisk. In order to have a working ROM, you need to flash both the ROM and the addon to the same slot.

If you're on slot A and flash the ROM, it goes to slot B, so now you have to switch to slot B in order to flash GApps and Magisk, and you do this by rebooting.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Lurensu:
The latest OTA failed again for me, I don't really understand why.

I'm doing exactly what's descripted in the official guide (+ Magisk to retain Gapps) and I still haven't managed to update through OTA even once.

Very weird

EDIT:

I've tried again flashing Magisk to the inactive slot before rebooting and it worked! So I probably had some issues with Magisk only and not with the ROM :)
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
Previously, I tried LOS + OpenGApps Nano + Magisk using TWRP followed by an OTA update and it worked fine.

Today, I tried the same thing with LOS recovery instead, and... it didn't boot. It says "Your data may be corrupt" and asks me to factory reset.

What was the exact problem you had when you updated through the OTA? Did you have the data corrupt error, or did GApps simply disappear?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Lurensu:
Today I had the "data may be corrupt" error (while the previous two time I only lost the Gapps).

You can change the active slot to the previous one, re-apply the update and than flash Magisk to the inactive slot, it worked for me
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
Could you try with TWRP next time? I've been using the unofficial 4pda TWRP with consistent results.

To test this theory, I did a clean flash of LOS + OpenGApps Stock + Magisk (using TWRP 4pda version linked above), and it works fine.

I didn't have time to test with OpenGApps Super (the largest package).

I think it might have something to do with the recovery.

For me, OTA works when I clean flash with TWRP, but fails when I clean flash with LOS recovery.

So, here's a list of bugs in this ROM so far (as far as I know, anyway)

1. USB wired headset and OTG don't work (confirmed by multiple people on this thread)

(workaround: power off and power on every time it stops working)

2. Very soft and poor quality audio while recording video

(I reproduced it on a clean flash with LOS camera, GCam (the_dise) and Open Camera)

3. ROM does not boot if you flash GApps but no Magisk (can anyone else confirm?)

4. OTA doesn't work properly for some people (data corruption error or GApps disappear)

(For me it works consistently when I first flash the ROM with TWRP but not with LOS recovery - can anyone else try different recoveries and confirm?)

5. The latest official TWRP (3.4.0-0) and OrangeFox (R10.1_1) don't boot when LOS is installed with encryption. (using fastboot boot recovery.img)

(These recoveries work with every other ROM I tried, including unofficial LOS, Havoc, PE, AICP, Carbon, Syberia etc)

Did I miss anything?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] evertonjcorreia:
Yeah, I think we can rule out the gapps being too big theory.

Anyways, here are the tests I've run:

LOSRecovery tests:

wiped everything

booted into LOSRecovery, flashed 20200704

rebooted recovery

flashed gapps mini and magisk right after

booted into rom, everything is fine (got encrypted by default) and working as expected, skipped google configs

downloaded and installed 20200711 OTA, phone rebooted

RESULTS: OTA didn't work, got the same behavior as before: after the reboot, the "android one screen with the unlocked text" flashed some 3 or 4 times and the phone eventually rebooted into 20200704 again, no update applied.

Since I was already at this point, I rebooted into LOSRecovery, changed to the correct slot and tried flashing the 20200711 from there using ADB. sideload.

RESULTS: same as before, update can be applied by flashing the zip manually, but I lose gapps and magisk.

TWRP tests:

Booted into unofficial 4pda TWRP (didn't flash it)

Wiped everything

Flashed rom on slot A using ADB sideload

Changed to slot B, reboot bootloader, booted TWRP from .img again (didn't flash it)

Flashed gapps mini, flashed magisk

Rebooted into rom, had to change to slot A manually with fastboot for the rom to boot, but after that everything was fine and working as expected (didn't got encrypted by default tho)

Skipped google configs and downloaded and installed 20200711 OTA, phone rebooted

RESULTS: OTA worked, phone booted almost instantly and update was applied, neither lost gapps nor magisk.

My tests reproced your results pretty precisely, so IMO it's very safe to say the OTA problem comes from doing the initial flash with LOSRecovery, I'm not sure if encryption plays a role here, but acording to your tests you did in fact managed to OTA from an encrypted phone, so I doubt it's that.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] drt1:
1. Factory reset in lineage recovery

2. Just rebooted to recovery

My fourth update today, just five mins ago. Everything smooth again. My two cents: are you guys who have issues on the recommended firmware? By the way, I came to Los directly from stock rom, was on stock until that point and have thus not tinkered with the phone at all. That might be a variable to factor in too.

---------- Post added 13-07-2020 at 12:37 AM ---------- Previous post was 12-07-2020 at 11:44 PM ----------

Um, not on my experience. I wrote several times in the thread that I followed official instructions to the letter ( that means lineage recovery usage) and no problems. Couple other people seem to have confirmed that too (check thread). Probably more, but I guess who doesn't have problems visits the thread less often if at all.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] evertonjcorreia:
Sure, keep in mind not every mi A2 is made the same, I'm not claiming LOSRecovery won't work for everyone, I'm just saying people that for people with models that are facing OTA problems, this could be the cause.

Now if you're having OTA problems and even doing this procedure you're not getting OTA to work, call me debunked.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] drt1:
Zero interest on debunking you, not debating or trying to prove a point. Just offering my experience and trying to be helpful. If a certain procedure helps people, that's great.

My advice to anyone having issues would be to try to go back to stock (recommend firmware) and take it from there. Might be a pain in the ass and I can't guarantee it'll solve the problem/s, but if it does sounds like a well spent hour to me.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Lurensu:
I came to LOS from the Stock June update, clean installed through fastboot.

In my case, it looks like Magisk doesn't manage to properly flash itself to the inactive slot after an OTA and so I have to do it manually.

I'll try this way again next week, if it works, then I'm 100% happy
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] drt1:
Stock June is V11.0.11.0 if I'm not wrong, not the recommended one. I doubt that might make such a huge difference, but who knows. :confused:
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] enapah:
[MENTION=8697535]drt1[/MENTION] No issues there, I always flash the latest stock ROM before doing a new clean flash of a 3rd-party ROM.

I flashed jasmine_global_images_V11.0.10.0.QDIMIXM_10.0 before going to this ROM, so I can confirm those firmwares work just fine.

EDIT: I misread and now I look silly -- that was the recommended stock ROM.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
I found another bug!

When recording video with an external USB microphone, the audio track is higher pitched than it should be.

It is very noticeable - voices are high pitched and music recordings are completely unusable.

Tested with GCam (many different versions), Open Camera, and Cinema FV-5 Lite. Using a Zoom H1 (audio recorder device) in USB mode.

The stock LOS camera does not seem to support external mics, so I couldn't test that. For what it's worth, HavocOS has the same issue.

With regards to the OTA issue, my tests were done with the latest firmware. (V11.0.11.0)

(OTA failed with first flash by LOS recovery, worked with first flash by TWRP-4pda)
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] vaibhavdangayachvd:
Many people are losing their data just cuz some of you are posting about smooth ota without mentioning your installation details.

If it works for you it's fine but please recommend everyone to flash magisk to inactive slot so that we all can get smooth updates.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] Shotg1:
Question since force encryption is present in official los, then if i flash dm verity to disable encryption, then update tru ota will my device remain unencrypted or it will be force to encrypt?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] evertonjcorreia:
Found another bug: AudioFX sometimes will stop working and will only work again by disconecting the bluethoot headphones or rebooting the system.

---------- Post added at 05:38 PM ---------- Previous post was at 05:33 PM ----------

Best chance you have is trying it. Things are kinda crazy so much we can't even agree a universally good way to install this ROM, what works for one might not work for you and you might actually lose your data.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] 1l9muhammad:
New update give me some times screen freeze and phone restart... Twice and more in a day... Please help
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] evertonjcorreia:
July 11? Working fine here so far, been using since release and didn't have these problems. I came from a clean flash tho.
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] devilsworkshop:
Interestingly, I was able to replicate this behaviour even on the stock ROM, so it's not an LOS bug.

Tried on V11.0.10.0 with Open Camera and GCam (the_dise v4.4). Could it be a bug with Xiaomi's implementation of the Camera2 API?
[Xiaomi Mi A2 ROMs, Kernels, Recoveries, & Other De] androshanki:
Each time the installation methods differs for me.. don't know what's going on with lineage rom installation