My First Degoogling: All Steps and Snags

Search This thread
Nov 4, 2020
7
4
This is an entertaining and educational review of degoogling my first android device.

The Goal: A LineageOS device without GAPPS, with TWRP, Magisk, and MicroG

Finding a phone that is available new in Australia, has a decent camera, and supports both TWRP and LineageOS officially is a suprisingly hard ask. After a couple of days of cross-referencing and researching I found one device: the Xiaomi Redmi Note 8.

In the days before the delivery of this new phone, I pieced together a guide for installing everything I needed in nice step by step order, I downloaded everything I thought I would need, TWRP, LineageOS, Magisk both apk and zip, MicroG, and the SmaliPatcher, as well as the Mi Unlocker and USB Drivers, and I made a Mi account hooked up to an email address. I was prepared, everything was set up for smooth sailing.

As we all know, things rarely turn out so easy.

The first hurdle was unlocking the bootloader. In order to unlock the bootloader, you have to unlock Developer Options and enable OEM Unlocking, USB Debugging, and USB Debugging (Security Settings). I'm not stuttering, there are two USB Debuggings. I had unlocked Developer Permissions on my Smart E9 before, but that runs Oreo Go edition, and in that one you have to go Settings -> About and tap the build version 7 times. In a Xiaomi, you have to tap MIUI version 7 times. This is not obvious, as 'build version' is also visible in 'About'.

Quick Guide: Go to Settings -> About and tap MIUI version 7 times to enable Developer Options

Enabling the correct permissions was also not so simple. Enabling OEM Unlocking and USB Debugging was as simple as tapping the switches, but USB Debugging (Security Settings) has three seperate warning popups and only lets you know you NEED a Sim card AFTER you've tapped through.

The Redmi Note 8 takes Nano Sims. I only have my regular sized Sim. So, on the phone with my carrier I go to order a replacement Nano Sim. After a frustrating conversation online in which they tell me to ring my local branch and won't give me the number, I ring my local branch. Who then won't replace it unless I come in, which I point blank refuse to do due to the whole plague situation. I decide to phone the main branch, who tells me they'll send a replacement out right away free of charge. Okay then.

To insert the Sim (And a MicroSD if you want) there's a small hole in left the side of the phone, where you stick the little pokey key thing that comes with the phone (A paperclip is too thick), and the Sim tray pops out. The Sim and SD card just sit on the tray, balanced precariously, as you gently stuff that tray back where it came from.

Quick Guide: Argue with underpaid customer service reps for an hour to get your Nano Sim card

Sim inserted successfully, so now I try to enable USB Debugging (Security Settings) again. Tap through the three warning popups and success! All permissions were now set, and it was time to unlock the bootloader!

Quick Guide: After inserting a working Nano Sim, go to Settings -> Developer Settings, and enable OEM Unlocking, USB Debugging, and USB Debugging (Security Settings)

I turn off the phone, boot into fastboot, log into the Mi Unlock App on the PC and...

Turns out: You have to have a recovery phone number for the Mi Account before you can see any unlocking options on the PC App. I guess the chinese government has my phone number now.

Quick Guide: Set up a Mi Account with both an email address and a phone number

So, after setting up that recovery phone number on the website I tried again, log the phone into fastboot, log into the Mi Unlock App, plug in the phone and...

I get told to use the Mi Unlock Status option on the phone to unlock the option to unlock. Huh. Fine then.

This is where things get a little bit more ring around the rosy, because I had already hooked the Mi Account up to the phone and logged in, for some reason the Mi Unlock Status option in the phone point blank refused to log in using mobile data. I logged out of the Mi Account on the phone, rebooted the phone, and then tapped straight through to the Mi Unlock Status, logging in there using Mobile Data. It worked this time!

Quick Guide: Choose Mi Unlock Status and tap through, turn off Wi-Fi and turn on Mobile Data, log into the Mi account, then go back a screen and press the button

NOW it was time to use the Mi Unlock App. I opened it up, signed in to the Mi Account, and received a verification SMS on the phone. Verification dealt with, I turned off the phone, logged it into fastboot, use the USB to connect to the PC, and press Unlock. Success! Well, sort of. I get told I need to wait 168 hours before I can unlock the bootloader, but progress is progress.

Quick Guide: Open up the Mi Unlock App and sign in, shut down your phone, hold Volume Down + Power to enter Fastboot. Then connect your phone to PC using USB cable and click "Unlock"

Waiting 168 hours (7 days) to play with a new toy is difficult. I also had to make sure I kept using the device during this time. I browsed reddit and mi community for a few minutes a day and played a bit of tetris. Other than that the phone was left on but idle. This is an example of bare minimum usage because A: I'm not really a phone person, I'm a PC person, and B: At this point I am referring to my phone as 'the spy machine' due to just how utterly violating of privacy I know this thing to be. Thus the degoogling.

After waiting the requisite amount of time it was time to ACTUALLY unlock the bootloader. At this point I was regretting not buying a Motorola G7, but I couldn't have purchased one new anyway.

So again, I open the Mi Unlock App, sign in, boot the phone into fastboot, and plug that sucker in. Press Unlock. Success! Actual success this time, bootloader is unlocked. It reboots and has a little unlock symbol at the bottom of the screen. When the phone boots up, it asks for my Mi Account password before it will set up the OS again. No problem.

Quick Guide: Repeat the previous Unlocking procedure, then enter your Mi Password into the phone if it asks

Now it was time for TWRP. Developer Options and both kinds of USB Debugging had been reset after unlocking the bootloader, so they all had to be enabled again.

I copy the TWRP recovery image into my platform-tools folder and open a command prompt in said folder. I connect my phone to the PC, and in the command window I type
Code:
adb devices
. It lists the devices, which is to say none. Freaking what.

I read a couple of guides. Okay, drivers are needed. The Mi Unlock App straight up came with the necessary drivers so, double clicky the USB drivers exe and boom. All fixed.
Code:
adb devices
now lists my phone and it's unauthorized. Back to the phone, allow this computer and press the checkbox for always allow it. Now it's authorized.

Quick Guide: Install your goddamn USB drivers

Now that ADB is working it's time to install TWRP. I reboot the phone into fastboot using the command window with
Code:
adb reboot bootloader
. I'm not sure its actually necessary to boot into fastboot this way, I'm pretty sure doing it manually while it's plugged in works just fine, but that's what the guide said and at this point I am too nervous to deviate.

Alright, now the phone is in fastboot and I still have a command window up. I make sure the device is still connected with
Code:
adb devices
Nothing. Okay what now, oh, oopsie. Turns out that's the wrong command when in fastboot. Okay
Code:
fastboot devices
That's much better.

Now I type
Code:
fastboot flash recovery twrp-3.4.0-1-ginkgo.img
Successfully flashed, now to boot into it.
Code:
 fastboot boot twrp-3.4.0-1-ginkgo.img
The phone booted into TWRP! I am excited, I'd never gotten this far before.

Quick Guide: Boot into fastboot. Check the connection with
Code:
fastboot devices
Flash the recovery with
Code:
fastboot flash recovery <yourrecoveryname>.img
Boot into the recovery with
Code:
fastboot boot <yourrecoveryname>.img

With TWRP flashed it was time for LineageOS. This was a little odd because to install it, the guide said to 'sideload' the zip file, and I had no idea what this actually meant. But, it had step by step instructions, and you don't learn unless you try. Onwards I went.

First, I move the LineageOS zip file to my platform-tools directory. Then I use TWRP to make a backup, then I head back to the home screen, press wipe, and format data. Don't ask me why I did this, it was in my guide and I'm pretty sure a youtube video told me to. I don't think this step is necessary, and quite frankly the_weird_aquarian's guide says it's not recommended.

Now it was time to actually sideload the LineageOS zip. On the TWRP home screen, I choose Advanced -> ADB Sideload and swipe the little slider. On the command window I type
Code:
adb sideload lineage-17.1-20201026-nightly-ginkgo-signed.zip
I didn't actually type out that whole zip name by hand, that'd be ridiculous, I pressed tab to autofill it after typing "lin". This step took a while to finish.

Quick Guide: Choose Advanced -> ADB Sideload, then in the command windows type
Code:
adb sideload <customromname>.zip

After it was done, it offered to reboot. This was it. I rebooted and there it was, the LineageOS system. I had done the bulk of it!

(I had not done the bulk of it)

One thing I immediately noticed was that the little triangle and little square symbols for navigation were reversed from what they were in MIUI (original xiaomi phone OS).

I played with the device for a while, installed F-Droid and a few apps, made sure I could still make phone calls, that sort of thing.

Next it was time to install Magisk. First I needed to set the permissions again. This time 'build number' is the thing to tap, right at the bottom of the About page.

Quick Guide: Go to Settings -> About -> tap Build Number 7 times

Developer Options are in a different spot in LineageOS, this time they're under Settings -> System -> Advanced, and now I enable Android Debugging, which is the same as USB Debugging but everyone needs their own name for it.

Quick Guide: Go to Settings -> System -> Advanced and enable Android Debugging

Now I transfer the Magisk apk and zip file onto the phone and install the apk. Opening up the app, I notice that it says "ramdisk: no". The Magisk Wiki says that if my device’s boot partition does not include ramdisk, I have to patch Magisk into the TWRP recovery, and it has instructions on how to do that.

I grab the TWRP image and copy it onto the phone, then go back into the Magisk Manager app and press 'Install' on the Magisk card. I make sure 'Recovery' is checked, choose the 'Select and Patch a File' option and pick said recovery image.

After it finished patching, I pull it back to the computer with
Code:
adb pull /sdcard/Download/magisk_patched.img
Then I reboot the phone into fastboot and flash this patched recovery with
Code:
fastboot flash recovery magisk_patched.img

After rebooting I check the Magisk Manager app, which reports that Magisk was NOT installed. Okay, so the Wiki says that in order to boot into the Magisk system I have to hold down Volume Up + Power just like I would if I was booting into recovery, but then let go of everything after the splash screen. Okay, I do that.

It boots to fastboot. Huh, odd. Okay, I turn the phone off and try it again. It boots normally this time, but Magisk is still not installed. I looked up the problem, Magisk Manager didn't install twice, it wasn't installed to external storage, I reinstalled the Manager and it didn't help.

I had nothing. No idea at all. I gave it a break for a day.

Quick Guide: Don't do anything that I did in the above section

This was when I encountered one thing I really didn't like about LineageOS: the Camera.

The default LineageOS Camera is not great. The pictures are fine, but the Redmi Note 8 comes with a macro lens, an ultrawide lens, and the ability to do panorama shots. None of these were accessible in the default camera.
I tried Open Camera and FreeDCam, I didn't like either of them. Camera MX wasn't available on Aurora Store.

So after some googling I came to what was to be my saviour: ANXCamera. It's the MIUI Camera App, retrofitted for Custom ROMs.

There was one problem: It needed Magisk.

Back to XDA I go, back to the beginners guides. Specifically the_weird_aquarian's guide. Here, the instructions for Magisk were different. These said to just install the zip from inside TWRP. The Wiki said this was not recommended. I do it anyway.

I rebooted, crossing my fingers. It booted, a good start. I tapped into the Magisk App and... "Installed". I had done it!

Quick Guide: Boot into TWRP, press install, pick the Magisk zip, and reboot

Now I had to figure out how to install the two modules I had downloaded: ANXCamera and ANXFramework. It's simple after Magisk is actually installed, there's a little puzzle piece logo on the bottom right for AddOns. Next, I install both modules and reboot, excited for a new camera.

Then, disaster struck. I bootlooped.

The first step was obviously to panic, which I did with great diligence and enthusiasm. Then I boot into the recovery and try to restore from the backup I made. Only to discover that there was no backup there. It had gotten deleted when I wiped the device the first time.

Quick Guide: Save a copy of backups externally just in case

I googled and found a bootloop hotfix addon for ANXCamera, listed in bold right on the page where I downloaded the other modules. But it needed to be installed in Magisk, and I didn't have access to Magisk.

Next, I tried to 'reinstall' LineageOS by sideloading it again. This did absolutely squat diddly.

Factory reset came to the rescue.

It was only after this that I found that the ANXCamera wiki straight up tells you that if you bootloop you should use the recovery file manager to remove '/data/adb/modules/ANXFramework' and '/data/adb/modules/ANXCamera'. Oh well.

My phone was working again, but all my apps and contacts had been deleted. Strangely, all the pictures I'd taken and all the files I had transferred to the phone were untouched. I wasn't about to look a gift horse in the mouth.

I reinstalled Magisk Manager, determined to get this camera app working. It said Magisk was already installed, and that it needed to download and install a few files to get everything working. Alrighty, no worries there. I let it reboot and hoped really hard that it wasn't about to reinstall the modules that had bootlooped my phone the first time.

It didn't. The files were technically there, but they weren't counted as installed in the AddOn's section of Magisk's Manager. I reinstall them, along with the bootloop fix and a 48MP fix. It rebooted. No bootloop. Everything was okay.

Quick Guide: Read everything before jumping the gun. If something says it needs a bootloop hotfix, believe it
Quick Guide: Install ANXCamera, ANXFramework, ANXCamera bootloop hotfix, and the 48MP fix in Magisk's AddOns section

Now I needed the actual camera app, because this wasn't complicated enough yet. So, I install F-Droid, and then install Aurora Store from F-Droid, and, in Aurora Store, I find the ANX Camera Pro app. I install that, open it up and press save, then start up the actual camera app. Everything was black. It wasn't working. I had to enable all the permissions for the app manually.

Quick Guide: Go to Settings -> Apps -> See All -> ANXCamera and enable all the permissions. Turn off network access for it while you're there, it doesn't need the net

Sweet, no more black screen. Everything looked good! Then I tried the front camera, and it crashed. Damn. Okay, the FAQ says to hop back into ANXCamera Pro and turn off Hand Gestures. I do that, and the front camera works now, awesome.

Portrait mode crashed the app again. The 48MP fix was supposed to fix that. Okay, uninstall that and install an older version... nothing. Uninstall that and install ANXCustlibs instead. Nothing. Installed the latest version of 48MP fix. Still nope.

I could not get portrait mode working at all, it just crashes the camera app every time. Everything else works nicely, so I just moved that mode out of the main section in the app's own settings.

I still haven't installed MicroG. I haven't found a good reason to install it, and truth be told I am a little scared of what traps and tripwires lie in wait on that particular journey. One day I will make it, but for now, I have a degoogled phone.
 

Uluru25

Senior Member
Nov 27, 2016
95
20
Samsung Galaxy A6
Redmi Note 8
I read your post with a smile, because I also had my trial and errors for the simple very first step to unlock the bootloader.

But all later issues you described from unlocking till having a custom ROM were fortunately NOT discovered by me:

I chose to use MSMXtended as custom rom since my feeling of that rom after heaving read several custom rom threads including Lineage OS was that MSMXtended is really stable and easy to flash.

I am speaking of the meanwhile closed thread for MSMXtended running Android 10 (!) with it's latest version 13. Give it a try and follow the very simple steps (but do not forget to flash dm-verity zip at the end before rebooting).

You will have a very smooth, google-free rom with the stock MIUI-cam and a very battery friendly behaviour. I was also able to install the famous GCam without (!) the need to install gapps (I have described this elsewhere).

During the weekend I have prepared two more Redmi Note 8 for MSMXtended v13 (for my father and for my daughter) and everything works fine. By the way I also installed EdXposed and XPrivacy Lua for privacy reasons - everything working as I expected (or better: hoped).

And one more hint: during the 168 days waiting time for unlocking the bootloader there is NO need to do anything with the phone. You can remove the SIM-card, you can shut-down the phone. The only important thing us that you MUST NOT log-out your phone from your MIUI-account.

I hope that other readers are not too frightened from the odyssey you described. ..
 
Nov 4, 2020
7
4
I read your post with a smile, because I also had my trial and errors for the simple very first step to unlock the bootloader.

But all later issues you described from unlocking till having a custom ROM were fortunately NOT discovered by me:

I chose to use MSMXtended as custom rom since my feeling of that rom after heaving read several custom rom threads including Lineage OS was that MSMXtended is really stable and easy to flash.

I am speaking of the meanwhile closed thread for MSMXtended running Android 10 (!) with it's latest version 13. Give it a try and follow the very simple steps (but do not forget to flash dm-verity zip at the end before rebooting).

You will have a very smooth, google-free rom with the stock MIUI-cam and a very battery friendly behaviour. I was also able to install the famous GCam without (!) the need to install gapps (I have described this elsewhere).

During the weekend I have prepared two more Redmi Note 8 for MSMXtended v13 (for my father and for my daughter) and everything works fine. By the way I also installed EdXposed and XPrivacy Lua for privacy reasons - everything working as I expected (or better: hoped).

And one more hint: during the 168 days waiting time for unlocking the bootloader there is NO need to do anything with the phone. You can remove the SIM-card, you can shut-down the phone. The only important thing us that you MUST NOT log-out your phone from your MIUI-account.

I hope that other readers are not too frightened from the odyssey you described. ..

Thank you for the recommendations and the info. I'd not heard of XPrivacy Lua before, it sounds really cool. I am going to be taking a step back and looking at other ROM options, I chose LineageOS because it's the most well known privacy ROM for android, but I know that doesn't mean it's necessarily the best option.

Thank you also for letting me know that I can just let the phone sit there during the unlocking period, that'll make life a lot easier in the future.

May I ask why one needs to flash dm-verity after installing MSMXtended? I don't really understand what it does.
 

Uluru25

Senior Member
Nov 27, 2016
95
20
Samsung Galaxy A6
Redmi Note 8
Thank you for the recommendations and the info. I'd not heard of XPrivacy Lua before, it sounds really cool. I am going to be taking a step back and looking at other ROM options, I chose LineageOS because it's the most well known privacy ROM for android, but I know that doesn't mean it's necessarily the best option.

Thank you also for letting me know that I can just let the phone sit there during the unlocking period, that'll make life a lot easier in the future.

May I ask why one needs to flash dm-verity after installing MSMXtended? I don't really understand what it does.
From my understanding if you use a custom rom which does not support encryption (as it is true for MSMXtended) your device might refrain from booting but will return to the recovery. This dm-verity zip (flashed at the very last before rebooting) prevents this. But I am not an expert but only an "interested reader". You will find a big post hier in xda by zackpfg5 as OP or a short note in the very first post in The-weird-aquarian's guide to unlocking and for sure elsewhere in the web. Maybe you don't need it but better have it on your sd-card in case your phone doesn't boot after flashing the custom rom. Good Luck!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    This is an entertaining and educational review of degoogling my first android device.

    The Goal: A LineageOS device without GAPPS, with TWRP, Magisk, and MicroG

    Finding a phone that is available new in Australia, has a decent camera, and supports both TWRP and LineageOS officially is a suprisingly hard ask. After a couple of days of cross-referencing and researching I found one device: the Xiaomi Redmi Note 8.

    In the days before the delivery of this new phone, I pieced together a guide for installing everything I needed in nice step by step order, I downloaded everything I thought I would need, TWRP, LineageOS, Magisk both apk and zip, MicroG, and the SmaliPatcher, as well as the Mi Unlocker and USB Drivers, and I made a Mi account hooked up to an email address. I was prepared, everything was set up for smooth sailing.

    As we all know, things rarely turn out so easy.

    The first hurdle was unlocking the bootloader. In order to unlock the bootloader, you have to unlock Developer Options and enable OEM Unlocking, USB Debugging, and USB Debugging (Security Settings). I'm not stuttering, there are two USB Debuggings. I had unlocked Developer Permissions on my Smart E9 before, but that runs Oreo Go edition, and in that one you have to go Settings -> About and tap the build version 7 times. In a Xiaomi, you have to tap MIUI version 7 times. This is not obvious, as 'build version' is also visible in 'About'.

    Quick Guide: Go to Settings -> About and tap MIUI version 7 times to enable Developer Options

    Enabling the correct permissions was also not so simple. Enabling OEM Unlocking and USB Debugging was as simple as tapping the switches, but USB Debugging (Security Settings) has three seperate warning popups and only lets you know you NEED a Sim card AFTER you've tapped through.

    The Redmi Note 8 takes Nano Sims. I only have my regular sized Sim. So, on the phone with my carrier I go to order a replacement Nano Sim. After a frustrating conversation online in which they tell me to ring my local branch and won't give me the number, I ring my local branch. Who then won't replace it unless I come in, which I point blank refuse to do due to the whole plague situation. I decide to phone the main branch, who tells me they'll send a replacement out right away free of charge. Okay then.

    To insert the Sim (And a MicroSD if you want) there's a small hole in left the side of the phone, where you stick the little pokey key thing that comes with the phone (A paperclip is too thick), and the Sim tray pops out. The Sim and SD card just sit on the tray, balanced precariously, as you gently stuff that tray back where it came from.

    Quick Guide: Argue with underpaid customer service reps for an hour to get your Nano Sim card

    Sim inserted successfully, so now I try to enable USB Debugging (Security Settings) again. Tap through the three warning popups and success! All permissions were now set, and it was time to unlock the bootloader!

    Quick Guide: After inserting a working Nano Sim, go to Settings -> Developer Settings, and enable OEM Unlocking, USB Debugging, and USB Debugging (Security Settings)

    I turn off the phone, boot into fastboot, log into the Mi Unlock App on the PC and...

    Turns out: You have to have a recovery phone number for the Mi Account before you can see any unlocking options on the PC App. I guess the chinese government has my phone number now.

    Quick Guide: Set up a Mi Account with both an email address and a phone number

    So, after setting up that recovery phone number on the website I tried again, log the phone into fastboot, log into the Mi Unlock App, plug in the phone and...

    I get told to use the Mi Unlock Status option on the phone to unlock the option to unlock. Huh. Fine then.

    This is where things get a little bit more ring around the rosy, because I had already hooked the Mi Account up to the phone and logged in, for some reason the Mi Unlock Status option in the phone point blank refused to log in using mobile data. I logged out of the Mi Account on the phone, rebooted the phone, and then tapped straight through to the Mi Unlock Status, logging in there using Mobile Data. It worked this time!

    Quick Guide: Choose Mi Unlock Status and tap through, turn off Wi-Fi and turn on Mobile Data, log into the Mi account, then go back a screen and press the button

    NOW it was time to use the Mi Unlock App. I opened it up, signed in to the Mi Account, and received a verification SMS on the phone. Verification dealt with, I turned off the phone, logged it into fastboot, use the USB to connect to the PC, and press Unlock. Success! Well, sort of. I get told I need to wait 168 hours before I can unlock the bootloader, but progress is progress.

    Quick Guide: Open up the Mi Unlock App and sign in, shut down your phone, hold Volume Down + Power to enter Fastboot. Then connect your phone to PC using USB cable and click "Unlock"

    Waiting 168 hours (7 days) to play with a new toy is difficult. I also had to make sure I kept using the device during this time. I browsed reddit and mi community for a few minutes a day and played a bit of tetris. Other than that the phone was left on but idle. This is an example of bare minimum usage because A: I'm not really a phone person, I'm a PC person, and B: At this point I am referring to my phone as 'the spy machine' due to just how utterly violating of privacy I know this thing to be. Thus the degoogling.

    After waiting the requisite amount of time it was time to ACTUALLY unlock the bootloader. At this point I was regretting not buying a Motorola G7, but I couldn't have purchased one new anyway.

    So again, I open the Mi Unlock App, sign in, boot the phone into fastboot, and plug that sucker in. Press Unlock. Success! Actual success this time, bootloader is unlocked. It reboots and has a little unlock symbol at the bottom of the screen. When the phone boots up, it asks for my Mi Account password before it will set up the OS again. No problem.

    Quick Guide: Repeat the previous Unlocking procedure, then enter your Mi Password into the phone if it asks

    Now it was time for TWRP. Developer Options and both kinds of USB Debugging had been reset after unlocking the bootloader, so they all had to be enabled again.

    I copy the TWRP recovery image into my platform-tools folder and open a command prompt in said folder. I connect my phone to the PC, and in the command window I type
    Code:
    adb devices
    . It lists the devices, which is to say none. Freaking what.

    I read a couple of guides. Okay, drivers are needed. The Mi Unlock App straight up came with the necessary drivers so, double clicky the USB drivers exe and boom. All fixed.
    Code:
    adb devices
    now lists my phone and it's unauthorized. Back to the phone, allow this computer and press the checkbox for always allow it. Now it's authorized.

    Quick Guide: Install your goddamn USB drivers

    Now that ADB is working it's time to install TWRP. I reboot the phone into fastboot using the command window with
    Code:
    adb reboot bootloader
    . I'm not sure its actually necessary to boot into fastboot this way, I'm pretty sure doing it manually while it's plugged in works just fine, but that's what the guide said and at this point I am too nervous to deviate.

    Alright, now the phone is in fastboot and I still have a command window up. I make sure the device is still connected with
    Code:
    adb devices
    Nothing. Okay what now, oh, oopsie. Turns out that's the wrong command when in fastboot. Okay
    Code:
    fastboot devices
    That's much better.

    Now I type
    Code:
    fastboot flash recovery twrp-3.4.0-1-ginkgo.img
    Successfully flashed, now to boot into it.
    Code:
     fastboot boot twrp-3.4.0-1-ginkgo.img
    The phone booted into TWRP! I am excited, I'd never gotten this far before.

    Quick Guide: Boot into fastboot. Check the connection with
    Code:
    fastboot devices
    Flash the recovery with
    Code:
    fastboot flash recovery <yourrecoveryname>.img
    Boot into the recovery with
    Code:
    fastboot boot <yourrecoveryname>.img

    With TWRP flashed it was time for LineageOS. This was a little odd because to install it, the guide said to 'sideload' the zip file, and I had no idea what this actually meant. But, it had step by step instructions, and you don't learn unless you try. Onwards I went.

    First, I move the LineageOS zip file to my platform-tools directory. Then I use TWRP to make a backup, then I head back to the home screen, press wipe, and format data. Don't ask me why I did this, it was in my guide and I'm pretty sure a youtube video told me to. I don't think this step is necessary, and quite frankly the_weird_aquarian's guide says it's not recommended.

    Now it was time to actually sideload the LineageOS zip. On the TWRP home screen, I choose Advanced -> ADB Sideload and swipe the little slider. On the command window I type
    Code:
    adb sideload lineage-17.1-20201026-nightly-ginkgo-signed.zip
    I didn't actually type out that whole zip name by hand, that'd be ridiculous, I pressed tab to autofill it after typing "lin". This step took a while to finish.

    Quick Guide: Choose Advanced -> ADB Sideload, then in the command windows type
    Code:
    adb sideload <customromname>.zip

    After it was done, it offered to reboot. This was it. I rebooted and there it was, the LineageOS system. I had done the bulk of it!

    (I had not done the bulk of it)

    One thing I immediately noticed was that the little triangle and little square symbols for navigation were reversed from what they were in MIUI (original xiaomi phone OS).

    I played with the device for a while, installed F-Droid and a few apps, made sure I could still make phone calls, that sort of thing.

    Next it was time to install Magisk. First I needed to set the permissions again. This time 'build number' is the thing to tap, right at the bottom of the About page.

    Quick Guide: Go to Settings -> About -> tap Build Number 7 times

    Developer Options are in a different spot in LineageOS, this time they're under Settings -> System -> Advanced, and now I enable Android Debugging, which is the same as USB Debugging but everyone needs their own name for it.

    Quick Guide: Go to Settings -> System -> Advanced and enable Android Debugging

    Now I transfer the Magisk apk and zip file onto the phone and install the apk. Opening up the app, I notice that it says "ramdisk: no". The Magisk Wiki says that if my device’s boot partition does not include ramdisk, I have to patch Magisk into the TWRP recovery, and it has instructions on how to do that.

    I grab the TWRP image and copy it onto the phone, then go back into the Magisk Manager app and press 'Install' on the Magisk card. I make sure 'Recovery' is checked, choose the 'Select and Patch a File' option and pick said recovery image.

    After it finished patching, I pull it back to the computer with
    Code:
    adb pull /sdcard/Download/magisk_patched.img
    Then I reboot the phone into fastboot and flash this patched recovery with
    Code:
    fastboot flash recovery magisk_patched.img

    After rebooting I check the Magisk Manager app, which reports that Magisk was NOT installed. Okay, so the Wiki says that in order to boot into the Magisk system I have to hold down Volume Up + Power just like I would if I was booting into recovery, but then let go of everything after the splash screen. Okay, I do that.

    It boots to fastboot. Huh, odd. Okay, I turn the phone off and try it again. It boots normally this time, but Magisk is still not installed. I looked up the problem, Magisk Manager didn't install twice, it wasn't installed to external storage, I reinstalled the Manager and it didn't help.

    I had nothing. No idea at all. I gave it a break for a day.

    Quick Guide: Don't do anything that I did in the above section

    This was when I encountered one thing I really didn't like about LineageOS: the Camera.

    The default LineageOS Camera is not great. The pictures are fine, but the Redmi Note 8 comes with a macro lens, an ultrawide lens, and the ability to do panorama shots. None of these were accessible in the default camera.
    I tried Open Camera and FreeDCam, I didn't like either of them. Camera MX wasn't available on Aurora Store.

    So after some googling I came to what was to be my saviour: ANXCamera. It's the MIUI Camera App, retrofitted for Custom ROMs.

    There was one problem: It needed Magisk.

    Back to XDA I go, back to the beginners guides. Specifically the_weird_aquarian's guide. Here, the instructions for Magisk were different. These said to just install the zip from inside TWRP. The Wiki said this was not recommended. I do it anyway.

    I rebooted, crossing my fingers. It booted, a good start. I tapped into the Magisk App and... "Installed". I had done it!

    Quick Guide: Boot into TWRP, press install, pick the Magisk zip, and reboot

    Now I had to figure out how to install the two modules I had downloaded: ANXCamera and ANXFramework. It's simple after Magisk is actually installed, there's a little puzzle piece logo on the bottom right for AddOns. Next, I install both modules and reboot, excited for a new camera.

    Then, disaster struck. I bootlooped.

    The first step was obviously to panic, which I did with great diligence and enthusiasm. Then I boot into the recovery and try to restore from the backup I made. Only to discover that there was no backup there. It had gotten deleted when I wiped the device the first time.

    Quick Guide: Save a copy of backups externally just in case

    I googled and found a bootloop hotfix addon for ANXCamera, listed in bold right on the page where I downloaded the other modules. But it needed to be installed in Magisk, and I didn't have access to Magisk.

    Next, I tried to 'reinstall' LineageOS by sideloading it again. This did absolutely squat diddly.

    Factory reset came to the rescue.

    It was only after this that I found that the ANXCamera wiki straight up tells you that if you bootloop you should use the recovery file manager to remove '/data/adb/modules/ANXFramework' and '/data/adb/modules/ANXCamera'. Oh well.

    My phone was working again, but all my apps and contacts had been deleted. Strangely, all the pictures I'd taken and all the files I had transferred to the phone were untouched. I wasn't about to look a gift horse in the mouth.

    I reinstalled Magisk Manager, determined to get this camera app working. It said Magisk was already installed, and that it needed to download and install a few files to get everything working. Alrighty, no worries there. I let it reboot and hoped really hard that it wasn't about to reinstall the modules that had bootlooped my phone the first time.

    It didn't. The files were technically there, but they weren't counted as installed in the AddOn's section of Magisk's Manager. I reinstall them, along with the bootloop fix and a 48MP fix. It rebooted. No bootloop. Everything was okay.

    Quick Guide: Read everything before jumping the gun. If something says it needs a bootloop hotfix, believe it
    Quick Guide: Install ANXCamera, ANXFramework, ANXCamera bootloop hotfix, and the 48MP fix in Magisk's AddOns section

    Now I needed the actual camera app, because this wasn't complicated enough yet. So, I install F-Droid, and then install Aurora Store from F-Droid, and, in Aurora Store, I find the ANX Camera Pro app. I install that, open it up and press save, then start up the actual camera app. Everything was black. It wasn't working. I had to enable all the permissions for the app manually.

    Quick Guide: Go to Settings -> Apps -> See All -> ANXCamera and enable all the permissions. Turn off network access for it while you're there, it doesn't need the net

    Sweet, no more black screen. Everything looked good! Then I tried the front camera, and it crashed. Damn. Okay, the FAQ says to hop back into ANXCamera Pro and turn off Hand Gestures. I do that, and the front camera works now, awesome.

    Portrait mode crashed the app again. The 48MP fix was supposed to fix that. Okay, uninstall that and install an older version... nothing. Uninstall that and install ANXCustlibs instead. Nothing. Installed the latest version of 48MP fix. Still nope.

    I could not get portrait mode working at all, it just crashes the camera app every time. Everything else works nicely, so I just moved that mode out of the main section in the app's own settings.

    I still haven't installed MicroG. I haven't found a good reason to install it, and truth be told I am a little scared of what traps and tripwires lie in wait on that particular journey. One day I will make it, but for now, I have a degoogled phone.
    1
    Without meaning to belittle JellyfishSprinkle's impressive work, quick note to the less hacking inclined:

    /e/ Foundation Lineage based OS including microG now supports gingko/willow devices natively (see https://doc.e.foundation/devices/ginkgo/).
    1
    Love your post!
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone