how to install LineageOS 18.1 on Xiaomi Redmi GO (Tiare)

Hi!

Recently my phone broke, and during the time when I had no phone I felt a lot better without a phone. Well, due to how I felt nice without a phone, I decided to go with a pretty dumb phone, and I stumbled upon Xiaomi Redmi GO (Codename: Tiare).

So, I decided to install a custom ROM on it since the default one sucks a lot.

In this blog post we will cover the following topics:

  1. Unlocking the bootloader
  2. Prerequisites + TWRP
  3. Installing PixelExperience recovery for Tiare
  4. Installing an unofficial build of LineageOS 18.1 for Tiare
  5. Rooting the phone using Magisk
  6. Installing a Magisk Swap mod for LineageOS
  7. Recommendations

That aside, let's begin!

By following this guide, you accept that any work you do based on provided guidance is done so entirely at your own risk. I am not responsible for any damages, data loss, corruption, or malfunctions (including "bricking") that may occur while working in low-level with your device. It is your full responsibility to understand what commands you are running and installing on your device. Please try to have appropriate backups and precautions before undertaking the process.

If you find yourself in a terrible situation, you can always flash the default ROM again: https://xiaomirom.com/en/download/redmi-go-tiare-stable-V10.2.25.0.OCLMIXM/#global-fastboot (just run flash_all.sh or flash_all.bat when your phone is in Fastboot mode and connected to your computer)

# Prerequisites

Before doing anything you have to have the following;

  1. Install ADB and Fastboot utilities on your device. This depends on your operating system, here's guides for the most popular OSes:
  2. Enable USB debugging and OEM unlocking:
    1. Go into your settings app.
    2. Go to "About phone".
    3. Click on "Build number" multiple times until you see that developer tools were enabled. About 5-7 times.
    4. Go back to the main settings menu.
    5. Go to "System".
    6. Click "Developer options".
    7. Find "USB Debugging" and enable it.
    8. Find "OEM Unlocking" and enable it.
  3. Download required files:
    1. PixelExperience recovery: https://sourceforge.net/projects/techyminati/files/tiare/PixelExperience-Recovery-tiare-0401.img/download (Archived at https://git.ari.lt/mirror/techyminati-PixelExperience-Recovery-tiare-0401.img)
      • SHA256: ee255c807284dd0a81da283451c10732010ea6065fed350f1ba716a8f3ff3c47 as of 2024-12-14
    2. LineageOS ROM: https://github.com/techyminati/releases/releases/tag/1.0.3-tiare (I have it personally archived it also, ask me if you need it, contacts visible on https://ari.lt/)
      • SHA256: 9282efe0141a8bde67f6d61b5c8df0791ec38b2677da0b97360a17ca0264a5d1 as of 2024-12-14
    3. Magisk APK: Download the latest from https://github.com/topjohnwu/Magisk/releases
  4. Connect your phone to a data-capable MicroUSB cable to your computer.
  5. Charge your phone to at least 50%.

# TWRP

If you find yourself stuck, you may try TWRP to recover yourself.

You can download TWRP recovery at https://xdaforums.com/t/recovery-tiare-twrp-3-3-0-for-redmi-go.3929282/ which I've archived at https://git.ari.lt/mirror/twrp-3.3.0-tiare. Then you can simply do the following:

  1. Perform a full factory reset in the PixelExperience recovery.
  2. Flash and boot TWRP:
1
2
fastboot flash recovery recovery.img
fastboot boot recovery.img
  1. Go into Wipe -> Factory reset
  2. Wipe -> Advanced wipe -> Select Dalvik / ART cache, System, Vendor, Data, Internal storage, Cache, and MicroSD. Swipe to wipe.
  3. Wipe -> Advanced wipe -> Go through the aforementioned partitions, and go into 'Repair or Change File System' and try to switch all of them to EXT4. Some of them will not allow you to do that - ignore it.
  4. Wipe -> Advanced wipe -> Select Dalvik / ART cache, System, Vendor, Data, Internal storage, Cache, and MicroSD. Swipe to wipe. (again)
  5. Wipe -> Factory reset

And you have a fully fresh system. You might find this useful in general to fully erase the stock ROM; I've noticed it frees up about 2GB. But, if you have issues, do go through TWRP at least once.

# Unlocking the bootloader

To unlock the bootloader you should do the following:

  1. Understand that unlocking the bootloader will erase all your data.
  2. Ensure a MicroUSB connection between your phone and your computer.
  3. Fastboot your phone. This is done by holding the power and volume down buttons at the same time. After it reboots, it will boot into a fastboot menu.
  4. Run command: fastboot oem unlock-go. This will unlock the bootloader.
  5. Wait like 30 seconds. If it does not reboot on its own run fastboot reboot.
  6. After your phone boots into the logo screen, it should say "Unlocked" at the bottom of your screen :)
  7. Your phone should now be booted into a fresh system. Quickly set it up.
  8. Enable USB debugging as described above.

# Installing PixelExperience recovery for Tiare

Now, we will install the PixelExperience recovery so we could later install the LineageOS ROM. Do the following steps:

  1. Fastboot your phone.
  2. Run fastboot flash recovery PixelExperience-Recovery-tiare-0401.img (or whatever your PixelExperience-Recovery-tiare-0401.img is named)
  3. Run fastboot boot PixelExperience-Recovery-tiare-0401.img (I've noticed that fastboot reboot recovery doesn't seem to work, so whatever)
  4. When you are in recovery do the following steps:
    1. Go to "Factory reset" using your volume up and down keys to control the selection, and the power button as selection button.
    2. Select "Erase data/factory reset". Wait for it to erase the phone.
    3. Select "Wipe cache". Wait for it to wipe the cache.
    4. Select "Wipe system". Wait for it to wipe the system.
    5. Go back to the main menu.

Do not exit the recovery yet. Recovery will be required in installing the ROM.

# Installing an unofficial build of LineageOS 18.1 for Tiare

Now, we will install the unofficial ROM for Tiare. Do the following:

  1. Ensure you are in recovery.
  2. In recovery, select "Apply update", then "Apply update from ADB".
  3. Once your phone is waiting for the update, go back to your computer, and run the following command: adb sideload lineage-18.1-20211012-UNOFFICIAL-tiare.zip, or however you named your ROM file.
  4. Once the update is applied, boot into LineageOS. Quickly set it up.
  5. After you've set up your temporary LineageOS installation, immediately perform a factory reset (go into settings, search for "factory", and click on "Factory reset").
  6. Once your phone is reset, set LineageOS up as normal.
  7. Again, enable developer options and USB Debugging as described above - the process is the same.

Congrats. You are now running LineageOS!

Note: Sometimes the SiM card shows up as "Undetected" but it works. Ignore the error if it appears :)

# Rooting the phone using Magisk

Now, we will root our phone. This will be useful because Tiare only has 1GB of RAM, so we have to depend on swap space, and without root, we will not be able to have more swap. To root our phone do the following:

  1. Install the Magisk app on your phone.
  2. Unzip lineage-18.1-20211012-UNOFFICIAL-tiare.zip.
  3. Find boot.img and put it onto your phone, for example, adb push boot.img /storage/emulated/0/ or whatever storage you have or want.
  4. Open the Magisk app on your phone.
  5. Click "Install Magisk" (Not the Magisk app).
  6. Select "Patch file", and find the aforementioned boot.img on your phone.
  7. After Magisk patches the boot.img, the path should be visible on your screen. Use adb pull /storage/... to get the magisk_*.img file on your computer.
  8. Fastboot your phone.
  9. When your computer is in fastboot, run fastboot flash boot magisk_*.img or whatever you name your Magisk-patched boot.img.
  10. Reboot: fastboot reboot

Now you have rooted, although, you should also take extra steps:

  1. After you reboot into your rooted install, open the Magisk app, and it will ask for extra setup. Allow it to do the extra setup, and it will reboot automatically. Ensure that the phone does not poweroff during the setup.
  2. After you reboot into your now fully set up rooted system, open the Magisk app again, and click "Install" (not the app again, but root stuff)
  3. Select "Direct install".
  4. Allow it to install internally, and then when it is done, click the "reboot" button in the Magisk app.
  5. After your phone boots, you are successfully rooted and set up!

# Installing a Magisk Swap mod for LineageOS

Since Tiare only has 1GB of ram, we probably want more swap. Do the following steps to install swap:

  1. Get the source code of https://github.com/janithcooray/lin_os_swap_mod onto your computer. (archived at https://git.ari.lt/mirror/janithcooray-lin_os_swap_mod)
  2. Since we don't have a lot of storage to spare, we will only give ourselves 1 extra GB of swap. But this is not a preset, so we have to create our own. Open config/1024_50_auto.sh in your favourite code editor.
  3. Make the content of 1024_50_auto.sh this:
1
2
3
4
5
6
7
8
9
# SWAP FILE SIZE [2 - 999999]MB
SWAP_BIN_SIZE=1024
# SWAPPINESS [0 - 100]
SWAPPINESS=50
# SWAP PRIORITY [-999999 - 999999]
# 0 Will make it auto
SWAP_FILE_PRIOR=0
# VERSION THIS VAIBLE SHOULD COME FROM build script
# SWAP_MOD_VERSION="v2.0-a"
  1. Run build.sh to build the modules.
  2. After it builds, in the release directory you will have a file named 1024_50_auto.zip. Put that file on your phone (for instance, using adb push release/1024_50_auto.zip /storage/...)
  3. Open Magisk on your phone.
  4. Go into "Modules" and then "Install from storage".
  5. Select the aforementioned zip file (Magisk module) and install it. Wait it to install.
  6. After it installs, reboot. (this step may take a while)

You are now done setting up your phone!

# Recommendations

When using such a phone, I recommend you get an SD card and set it up as extra storage (not "Portable storage") in LineageOS. This will be very useful since after all of the stuff you will only have like 4GB of storage left (out of 8GB).

Furthermore, if you are using an app store, I would suggest Droid-ify :)

Why not F-Droid? Because all apps, if you use SD storage as extra storage (not portable), crash. Well, in my experience at least, all your apps installed from F-Droid (not from adb) crash with an error something like this (when running with adb shell monkey -p 'package name' -v 500 where 'package name' could be like org.fossify.messages (see all available ones on your phone using adb shell pm list packages)):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database '/mnt/expand/<Some UUID>/user/0/<Some package name>/databases/conversations.db': Directory /mnt/expand/<Same UUID>/user/0/<Same app name>/databases doesn't exist
//      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:252)
//      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205)
//      at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505)
//      at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206)
//      at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
//      at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:918)
//      at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:898)
//      at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:762)
//      at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:751)
//      at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373)
//      at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
//      at p4.e.i(SourceFile:5)
//      at p4.e.n(SourceFile:64)
//      at p4.e.c(SourceFile:24)
//      at p4.f.b0(SourceFile:10)
//      at k4.u.b(SourceFile:5)
//      at mb.b.a(SourceFile:66)
//      at mb.b.b(SourceFile:12)
//      at s1.w.run(SourceFile:28)
//      at java.lang.Thread.run(Thread.java:923)
// Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
//      at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
//      at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:224)
//      ... 19 more

I don't understand why Droid-ify works, but the default F-Droid app does not. I am just as confused as all of you.

Anyway, til next time! Enjoy your DIY smartphone upgrade :)