Today I have made the switch from LOS4uG+Magisk to LOS + Magisk + uG.
I did not want to do a factory reset (as I would have lost my work profile, where I put all the apps from Aurora Store), so I had tried the “dirty” install with LOS recovery.
Unfortunately when I had booted into fastboot and run
fastboot boot lineage-17.1-20210614-recovery-FP3.img the phone first booted as usual. Then I rebooted it and it went into a bootloop. Eventually LOS recovery started on its own but the only thing I could do was a factory reset.
I did the factory reset, and again booting with LOS recovery did not work. I therefore booted with the
twrp-3.5.2_9-0-FP3.img and I could sideload LOS, and that was no problem at all. Of course since I had already done a factory reset, I did a clean install.
I will share here my experience with the process (after having backed up my
storage partition and having run a SeedVault backup):
- reboot into bootloader
adb reboot bootloader;
- boot into twrp:
fastboot boot twrp-xxxxx-FP3.img
- tap Advanced > ADB sideload, select “wipe cache” and “wipe Dalvik cache” swipe
- from terminal:
adb sideload lineage-17.1-xxxxx-nightly-FP3-signed.zip
- reboot and boot into LOS
- finish the initial setup, do not restore the Seedvault backup;
- from terminal:
adb sideload Magisk-xxxxx.zip. It is preferable to first flash Magisk and then the signature spoofing patch, so that it is installed as a Magisk module, and not “in the system”, and thus it can be preserved during OTA updates (thanks, lost_geographer).
- reboot after having flashed Magisk, open the launcher and click on the Magisk app (it will download and install itself). It may ask you to reboot again. Reboot and then repeat again steps 1-3.
- from terminal:
adb sideload NanoDroid-patcher-xxxxx.zip, go back and do the same for
NanoDroid-fdroid-xxxxx.zip (both downloaded from here). If everything was done correctly, during the flashing of the NanoDroid patcher you will see the following string:
Installation mode: MAGISK, otherwise it will say
SYSTEM. If this is the case there is no problem: reboot to LOS (this will change slot), reboot to fastboot, boot into TWRP and repeat the flash.
- Boot into LOS, open Magisk, search for “microG Installer Revived” module, tap for more info, at the “Installation” chapter, click on the “GmsCore apk” link, download and install
- install the Magisk “microG Installer Revived” module and reboot. If you didn’t install the apk first some authorizations (in my case SMS and accurate location) can’t be provided.
- fulfill all of the uG self-check
- from terminal run
adb shell am start-activity -a com.stevesoltys.seedvault.RESTORE_BACKUP to start the procedure to restore the seedvault backup. I have found out that if you mistake the 12-word recovery then it is not possible to try again. My workaround was to do a factory reset and try again.
- install your favourite work-profile app (I am using Inslanded) and check again the uG ticks over there.
Last time I had tried to do a SeedVault backup of my work profile (on a separate Nextcloud account since the work profile can not access the uSD card), but while restoring it would crash, resulting in a very incomplete restoration.
I don’t know if this behavior is expected or not. I would like very much to be able to backup my work profile too.
Now everything works fine, uG is working (even though for the first 1-2 hours the Device registration of my work profile was deactivating on its own, and when it were not, the GCM was), apps are registered and finally I can have an updated device. Haven’t tested yet VoIP calls (Whatsapp, Telegram, Signal): with LOS4uG the phone was crashing almost all the time, now I hope everything will work.
I hope this will be useful to not-so tech-savy people like me!