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:
- Unlocking the bootloader
- Prerequisites + TWRP
- Installing PixelExperience recovery for Tiare
- Installing an unofficial build of LineageOS 18.1 for Tiare
- Rooting the phone using Magisk
- Installing a Magisk Swap mod for LineageOS
- Recommendations
That aside, let's begin!
# Legal disclaimer
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;
- Install ADB and Fastboot utilities on your device. This depends on your operating system, here's guides for the most popular OSes:
- Enable USB debugging and OEM unlocking:
- Go into your settings app.
- Go to "About phone".
- Click on "Build number" multiple times until you see that developer tools were enabled. About 5-7 times.
- Go back to the main settings menu.
- Go to "System".
- Click "Developer options".
- Find "USB Debugging" and enable it.
- Find "OEM Unlocking" and enable it.
- Download required files:
- 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
- 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
- Magisk APK: Download the latest from https://github.com/topjohnwu/Magisk/releases
- Connect your phone to a data-capable MicroUSB cable to your computer.
- 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:
- Perform a full factory reset in the PixelExperience recovery.
- Flash and boot TWRP:
| fastboot flash recovery recovery.img
fastboot boot recovery.img
|
- Go into Wipe -> Factory reset
- Wipe -> Advanced wipe -> Select Dalvik / ART cache, System, Vendor, Data, Internal storage, Cache, and MicroSD. Swipe to wipe.
- 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.
- Wipe -> Advanced wipe -> Select Dalvik / ART cache, System, Vendor, Data, Internal storage, Cache, and MicroSD. Swipe to wipe. (again)
- 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:
- Understand that unlocking the bootloader will erase all your data.
- Ensure a MicroUSB connection between your phone and your computer.
- 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.
- Run command:
fastboot oem unlock-go
. This will unlock the bootloader. - Wait like 30 seconds. If it does not reboot on its own run
fastboot reboot
. - After your phone boots into the logo screen, it should say "Unlocked" at the bottom of your screen :)
- Your phone should now be booted into a fresh system. Quickly set it up.
- 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:
- Fastboot your phone.
- Run
fastboot flash recovery PixelExperience-Recovery-tiare-0401.img
(or whatever your PixelExperience-Recovery-tiare-0401.img
is named) - Run
fastboot boot PixelExperience-Recovery-tiare-0401.img
(I've noticed that fastboot reboot recovery
doesn't seem to work, so whatever) - When you are in recovery do the following steps:
- Go to "Factory reset" using your volume up and down keys to control the selection, and the power button as selection button.
- Select "Erase data/factory reset". Wait for it to erase the phone.
- Select "Wipe cache". Wait for it to wipe the cache.
- Select "Wipe system". Wait for it to wipe the system.
- 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:
- Ensure you are in recovery.
- In recovery, select "Apply update", then "Apply update from ADB".
- 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. - Once the update is applied, boot into LineageOS. Quickly set it up.
- 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").
- Once your phone is reset, set LineageOS up as normal.
- 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:
- Install the Magisk app on your phone.
- Unzip
lineage-18.1-20211012-UNOFFICIAL-tiare.zip
. - 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. - Open the Magisk app on your phone.
- Click "Install Magisk" (Not the Magisk app).
- Select "Patch file", and find the aforementioned
boot.img
on your phone. - 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. - Fastboot your phone.
- When your computer is in fastboot, run
fastboot flash boot magisk_*.img
or whatever you name your Magisk-patched boot.img. - Reboot:
fastboot reboot
Now you have rooted, although, you should also take extra steps:
- 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.
- 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)
- Select "Direct install".
- Allow it to install internally, and then when it is done, click the "reboot" button in the Magisk app.
- 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:
- 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)
- 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. - Make the content of
1024_50_auto.sh
this:
| # 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"
|
- Run
build.sh
to build the modules. - 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/...
) - Open Magisk on your phone.
- Go into "Modules" and then "Install from storage".
- Select the aforementioned zip file (Magisk module) and install it. Wait it to install.
- 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 :)