Before I begin i'd like to state that [[[YOU SHOULD BACKUP EVERYTHING (you need)]]]
because unlocking your bootloader will [[ERASE EVERYTHING]] on your device.
Therefore I am not responsible in any way if your device doesn't boot, explodes or causes irreparable
physical, metaphysical, mental or spiritual damage done.
#unlocking_bootloader
Some phones dont allow you to relock the bootloader so be careful.
First thing youre going to do is enable developer settings, you can do that
by going into settings and pressing "Version Number" until a youre either prompted
to enter your password or a toast notification stating:
"you unlocked developer mode!"
Enter developer options and enable "OEM unlocking" and "USB debugging"
This part differs from device to device, most of the time you'll have to wait
a certain amount of time before unlocking, for me it was about a week (that and i had to make an account, give Xiaomeme my number, and download their proprietary bits removed, still connects to Mozilla and Google services app).
You should search for your device's guide.
By this time you'll have android's platform tools installed.
This part is covering how to install a custom recovery, this part also differs from device from device,
but the main ones are TWRP and Orangefox.
After downloading your recovery image youre going to flash it to your phone:
1. Connect your phone to your computer.
2. Unzip the file you downloaded, you're going to end up with a .img file.
3. Open a terminal and type "adb reboot bootloader"
4. You're going to be prompted on your phone to allow usb debugging, press allow.
5. Your phone should reboot now.
6. After your phone powers up, get back on your computer and type the following:
"fastboot flash recovery image.img" (where "image.img" is the downloaded recovery).
7. Reboot your device and, while booting hold volume up to prevent the stock system overriding the recovery.
8. Done
#choosing_rom
Now that your phone is unlocked you can install mostly anything (if it's compatible of course).
If you're worried about privacy, you can choose any of those roms:
Crdroid, <- Has customization options, and AppLock (A11, Some versions of A14)