FriendlyNeighborhoodShane / MinMicroG

Sources and scripts for MinMicroG installers. You shall find no prebuilt releases here.
GNU General Public License v3.0
306 stars 30 forks source link

[Question] Reflash required after OTA update? #34

Closed mad73923 closed 2 years ago

mad73923 commented 2 years ago

Hi,

thanks for your awesome project!

I'm currently using it in HavocOS on my Xiamo A2 Lite (daisy) and wounder if its nessecary to reflash minMicroG after doing a OTA update of HavocOS 4.14 to 4.16? Any hints for that? Cheers

FriendlyNeighborhoodShane commented 2 years ago

Depends on many things.

If you've installed MinMicroG in system mode, then it also installs an addon.d OTA script that should take care of keeping everything across updates (assuming your ROM's addon.d mechanism is working fine).

The addon.d script has had a lot of issues in the past because of ROMs recently changing everything about how it works (the addon.d specification went from v1, which has existed ever since the first custom ROMs have, to v3 in a span of ~2 years) to cope with A/B systems, dynamic partitions, etc. But it should be working fine now. If it doesn't properly preserve MinMicroG across OTAs on your setups, you can get a recoverly log of the OTA install and we can take a look at the problem.

If you've installed MinMicroG as a Magisk module, however, it is entirely Magisk's responsibility to migrate itself over on the OTA. As long as it does that successfully, you'll still have MinMicroG on your next boot.

Unfortunately, I hear Magisk has recently been having issues restoring itself after OTAs on certain setups, something about recoveries being unable to decrypt data, which makes magisk unable to persist across updates. Unfortunately, if this happens to be the case with you, there's not much I can do, obviously. I'd just recommend you to switch to a system mode installation, or reflash Magisk + MinMicroG after every OTA, if that works for you.

mad73923 commented 2 years ago

Hi @FriendlyNeighborhoodShane,

thanks for your profound answer! I installed via recovery.

I'll check for the addon.d in HavocOS. And come back with the logs if something goes wrong.

FriendlyNeighborhoodShane commented 2 years ago

Even if you flashed MinMicroG from recovery, if you already had Magisk installed at that time (and /data mounted and decrypted), it will automatically install itself as Magisk module. You can just check if MinMicroG appears in your installed Magisk module list. As it says in the README.md, you will need to add system to the name of the MinMicroG zip before flashing to force it to install as system.

The documentation is likely not very exact about this behaviour, will need to be improved.

mad73923 commented 2 years ago

I flashed MinMicroG after clean install and installed - uninstalled Magisk in the meantime. I guess in this case, MinMicroG supposedly shouldn't have turned into a Magisk module?!

FriendlyNeighborhoodShane commented 2 years ago

Yep, nothing changes if you flash Magisk afterwards.