MiX Pack for the simple user (TWRP AdAway SuperSU) - Xiaomi Mi Mix 2 Guides, News, & Discussion

Hi all,
Here you may find a zip containing some very basic resources which can be found elsewhere without too much effort however I figured I would make things that slightest bit easier for some who use any of the MIUI 9+ builds.
The following zip file includes the latest custom SuperSU for MIUI Oreo, the latest release of TWRP, the latest release of AdAway.apk and for the hell of it, the stock MIX boot animation if you wish to use it on any other ROM. 20/5/18
https://www.dropbox.com/s/29u1z721blc1mdy/MIX Package.zip?dl=0
You can find guides elsewhere which go much more in-depth but I'll make a quick one for those who have unlocked bootloaders and are wanting to use any of the builds located on the official MIUI site: http://en.miui.com/download-334.html
The following are the steps I take for my usual installation;
1. Download chosen Official Developer or Stable ROM from the site above in FASTBOOT version. (Click "flashing guide", then "fastboot update" on the left menu where you will find all Xiaomi models, select either "latest global stable" or "latest global developer")
2. Extract ROM folder from download (example: chiron_global_images_8.4.19_20180419.0000.00_8.0_global) to C drive root.
3. Make sure fastboot drivers are installed and device can be seen by PC then download: https://xiaomiflashtool.com/
4. Connect your phone, load up the tool and click "select" on the top left. Here you will locate the ROM folder on C drive.
5. Click "refresh", if your phone is discovered then click "CLEAN ALL" at the bottom to prevent re-locking your bootloader followed by "flash" on the top right hand side which will initiate a full wipe of your phone followed by the installation of your ROM.
When complete allow phone to boot completely and then power it off. Continue below for root instructions.
6. Extract contents of MIX Package to your desktop and open CMD: Hold shift and right click your desktop, click "open powershell window here". Once powershell is loaded, type "cmd" and hit enter. When ready for step 7, boot your phone to fastboot mode.
7. You can either install TWRP or single-boot to it which will allow you to use it one time before reverting to stock recovery upon next reboot. For install, type "fastboot flash recovery recovery.img" and hit enter, then type "fastboot boot recovery.img" to boot to recovery. For single-boot TWRP type "fastboot boot recovery.img" which will boot into the img and allow any desired flashing without installing TWRP to your phone.
8. You are now in TWRP and should have storage access to your phone via your PC, copy SuperSU (and AdAway if desired) to your phone storage.
9. Hit "Install" in TWRP and select SuperSU zip file then flash. Once complete you may now boot your phone and progress through the first time setup.
10. Congratulations, you now have a completely fresh, clean rooted version of your desired MIUI. If you wish to enable full-system ad blocking, proceed to your file manager and install the AdAway.apk then follow instructions in-app.
As mentioned, this is not particularly a replacement for any other guide already published for the Mi Mix 2, it is the guide which I follow for all of my installations which gives me the cleanest possible MIUI. If you are using a stable release ROM and need to pass safety net then I suggest you use substitute SuperSU for Magisk however all the developer ROMs are unable to pass safety net anyway and I much prefer using SuperSU as it has never failed me and has the ability to hide the icon completely from launcher.
Kaji.

Link doesnt work

masterismos said:
Link doesnt work
Click to expand...
Click to collapse
Will upload dropbox version.
Edit: Done.

Nice guide. Quite simple enough. Thank you for this

namasteji1 said:
Nice guide. Quite simple enough. Thank you for this
Click to expand...
Click to collapse
Thanks man, first ever guide...I thought I'd give it a go.
New stable release V9.5.8.0 available now everyone! Download here today: http://en.miui.com/download-334.html
Changelog:
System
· Fix - Errors occurred when the device connected to a saved Wi-Fi hotspot (05-10)
· Fix - Device rebooted automatically in some cases (05-10)
· Fix - Caller ID errors (05-10)
· Fix - Notification settings weren't applied for dual apps (05-10)
· Fix - Search bar in the Notification shade didn't respond (05-10)
· Fix - The problem of abnormal charging needs to be restarted once it is upgraded to the corresponding version. (05-11)
Mi Drop
· Fix - Couldn't open Mi Drop in some cases (05-10)

Related

[NOOB’s][DETAILED] [GUIDE] TO Backup/Restore Stock+ Unlock Bootloader + TWRP + ROOT

A/A & Welcome,
READ THE FULL GUIDE OR YOU CAN LAND IN TROUBLE
Ain't gonna work on pie official
AND DO PRESS THE THANKS BUTTON
Disclaimer
* Your warranty is now void.
* I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or anything that happens to your device
INTRO
This is a full guide for unlock/relock, install TWRP, Root your device and backup/restore stock OS. Each and every step is explained thoroughly with pictures and videos.
I have ASUS Zenfone Max Pro M1 (6GB variant) (X00TD) (ZB601KL), so I can’t test for other variants. Please report back issues, corrections, omissions, etc., though the guide should work for all devices.
THINGS TO KNOW (IMPORTANT)
~Every text written in double quotes “” means the same written without the quotes.
e.g.:- “abcd” means abcd
“zxcv” means zxcv
They (“”) help to separate usual text from the other text (like a command, file name, etc.)
~If you have not enabled file name extensions then you will see files without their extension and vice versa
e.g.:- “filename”, “mypicture” in 1st case
“filename.extension”, “mypicture.png” in 2nd case, respectively.
~Boot Partition or Bootloader:-This is the partition that enables the phone to boot. Without this partition, the device will not be able to boot.
~Recovery Partition:-Recovery partition lets you boots the device into a recovery mode to perform recovery tasks.
~TWRP: - stands for TeamWin Recovery Project. It is a custom touch recovery that is GUI based.
~Flashing: - simplest: - installing
~Fastboot Partition: - lets us reflash partitions. (On device)
~Fastboot: - is an executable used to reflash partitions. It comes with the Android SDK. (On PC)
~Rooting: - an Android phone lets owner edit system files. Thus enabling various tweaks and use of apps that require root access.
~Device driver: - determines how PC will communicate with a device.
~Unlocking/Relocking:-With a locked Bootloader, booting into custom things is not allowed is not. Unlocking lets us do so.
~Reboot: - Switching ON AND OFF (in simple terms)
Requirements
MIND, PC, USB Cable, Internet, Fully charged PC (Windows OS), and obviously Asus Zenfone Max Pro M1
The Real Steps From Here
FOLLOWING THIS GUIDE YOU WILL PROBABLY LOSE ALL THE DATA ON YOUR PHONE SO MAKE A BACKUP FIRST (Don’t worry it’s in guide too)
STEP 1. Downloading all the necessary files
a. Here are 2 zip file with everything you will probably need following the guide :-
basic zip
extension zip
. I have tested the procedures using these files only so maybe other versions might not work. A “guide.doc” with the same text as in here (on XDA) is also present. It will be of great help if you don’t have internet connection in PC.
The basic zip file contains minium files needed.
The extension zip file contains the TWRP recovery(then one used in the guide),guide.docx ,and the videos used here too.
Copy the twrp file to unlock folder of extracted folder.
b. Extract the zip file above.
First download the zip file and Copy to PC
Then Right Click on it
Then click “Extract All”
Uncheck “Show extracted files…”
Click on “Extract”
The folder “zip” will be extracted
Done
This “zip” folder will be called extracted folder in the guide video link to extract zip
To download most up to date version of the files go to links present at last
STEP 2. BACKUP
a. Use an apk backup tool to backup app installers
VIDEO TO BACKUP APP INSTALLERS
b. Some APPS like Whatsapp, etc. have backup to drive function use that
VIDEO TO BACKUP WHATSAPP CHATS
c. Backup SMS AND Call Logs
VIDEO TO BACKUP CALL LOGS AND MESSAGES
d. Copy each and every file from you internal storage to PC.
Video to backup each file to pc
DONE
Step 3. UNLOCKING BOOTLOADER(Data will be wiped)
2 options:-
A. Official Method (NOT TESTED): -
In extracted folder go to “unlock” folder then “Official” folder. Install the “UnlockTool_9.1.0.3_180621_fulldpi_signed_ZB601KL.apk” in Asus and follow the steps from there.
B. Unofficial Method (Tested):-
a. Installing Drivers
Connect phone using USB cable to PC
Right click on This Pc
Go to “Manage” > “Device Manager” Or Just search for “Computer Management”/“Device Manager”
A list will appear.
Find your device (best way to do so is by disconnecting/connecting the device and notice the changes accordingly in the list)
Now right click on it>”Update Driver Software”>“Browse my computer for driver software”
Now either enter path of the driver folder or click on browse and navigate to the driver path from there.
Press Next OR
“Let me pick …”>and select the driver
video to install driver
The drivers have been installed
b. Booting into FASTBOOT
Switch Off the Phone
Hold the Volume UP and Power ON Button Simultaneously
Device buttons labbled image
You will see this on your phone
image of FASTBOOT screen
c. Unlocking Bootloader
Now connect phone using USB cable to PC
Look for the “unlock” folder in the extracted folder.
Open it
Find “unlock.cmd” or “unlock” file
(Or “unlock no erase.cmd” to keep data {not tested})
Open it
Done
d. You will see some messages in yellow/brown/white colour on your phone
You will most probably see “encrypting your device”, “warning Bootloader unlocked” messages, let phone do its work and don’t interrupt it, and keep cable connected. Phone might reboot too. The phone will at last boot into stock OS and you will see the device setup screen.
image of the warning message
e. Now if you wanted TO ONLY UNLOCK BOOTLOADER THEN THE JOB IS DONE, long press power button. If you want to root or flash TWRP then continue (Tested method to root requires TWRP flashing or you can try the untested method to root only)
Step4. Installing/Flashing TWRP
TESTED METHOD
a. Connect phone using USB cable to PC
b. Don’t setup your device just now because possibilities are you might lose the data again
c. Boot into fastboot mode
d. Open the “unlock” folder in the extracted folder.
Now Two Different ways to opt for from here:-
i. THE LAZY METHOD (Tested)
a. Open “flash_recovery.bat” or “flash_recovery” in the “unlock” folder of the extracted folder.
b. You can flash the tested or any other recovery using this script.
c. Follow the steps from the script
video of how to use the script
d.Then go to step of Flashing ZIPS of The Manual Method
e. Done
OR
ii. The Manual Method (Tested)
a. Keeping Shift Key pressed, right click {with mouse} in the blank white space of the “unlock” folder’s explorer window.
b. From the menu select “open command window here”
c. A CMD window will be opened
open cmd video
d. Now type “fastboot devices”
e. See if your device is connected. You will see something like this
f. Now type “fastboot flash recovery twrp-3.2.3-0-X00TD-20181024.img”
If you want to flash any other recovery instead of “twrp-3.2.3-0-X00TD-20181024.img” write the file name of your recovery file. Make sure it’s in “unlock folder”. Though this recovery is the only tested one (by me).
g. Now keeping the phone connected to PC, boot into TWRP/Recovery by pressing the Volume Down and Power ON Button Simultaneously.
h. The usual warnings, messages and recovery boot screen will flash:-
warning image
twrp flash screen image
i. It may take some time to load so wait for at least 2 minutes.
j. Now if touch is not working press power button 2 times (on and off the screen)
video showing how to enable touch in twrp
k. If it shows “Swipe to Unlock” do so. If it shows “Swipe to Allow Modifications” then wait and continue reading …
swipe to allow image
swipe to unlock
l. “Swipe to Allow Modifications” means you allow TWRP to modify system. This will make sure TWRP remains in the phone and not just vanish after a reboot but it also means you will have to flash some other files to be able to boot into stock rom back.
m.
2 ways from here:-
i. Now after swiping, Decrypt Screen will appear just press cancel.
decrypt screen image
OR
ii. If you have data on the device then enter pin/password or try default_password.
If you had kept pattern then either go back and change it or try this:-
1 2 3
4 5 6
7 8 9
these no’s correspond to pattern dots.
Say you kept pattern “third row left to right” then the password is 789 .
If all these fail then you will have to lose your data.
n. As we don’t have any precious data in our phone we will (or you are compromising)
Press “Wipe”
Press “Format Data”
TYPE “yes”
Press “tick” or “enter key”
Done
wipe data video
>Flashing ZIPS
o. Now Copy these 2 files
i. “decrypt.zip” or “decrypt”
ii. “Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip” or “Disable_Dm-Verity_ForceEncrypt_12.16.2018”
From extracted folder to your phones internal storage.
p. Go to Install>select the zip>swipe to flash (flash dm_verity… then decrypt…)
If you don’t see your device storage connected then try reconnecting using USB cable and also check if MTP is enabled.
enable mtp video
>Done
Want to root? Then continue…
or >
Now reboot to system Go to Reboot>System
video to show how to rebbot to system in twrp
Step 5. Rooting
We will be using Magisk to root you can use any other method but this is the only tested method.
a. Copy “Magisk-v18.0.zip” or “Magisk-v18.0” to your phones internal storage from extracted folder.
b. Go to Install>select Magisk…>swipe to flash
Done
c. Now reboot to system Go to Reboot>System
reboot video
e. To use Magisk properly you may need to download latest apk. (Link at last)
Step 6. Relock (NOT TESTED)
a. Connect phone using USB cable to PC
b. Boot into fastboot mode
c. Open “Relock” folder from extracted folder
d. Open “relock.cmd” or “relock” file
Done
Step 7. RESTORING
a. First setup the Device again
b. Copy each and every file back to the phone storage
c. Now to restore messages see the restoring part of this video here
d. WhatsApp messages will be automatically restored after you install the app with same number as before.
Tips
After rooting don’t just go on and flash a custom rom. Take a backup first (of all partitions) using TWRP and keep it safe somewhere so you won’t need to find unbrick tutorials later. Plus you will have your most stable and tailored rom with you.
Also don’t just go on and flash xyz mod. Research and then Flash.
Magisk is our best friend. It lets you do modifications without hurting the system. The Magisk modules are most safe mods as they can be reverted back easily.
And don’t just go on and debloat stock OS. In Magisk there is a module called Debloater use that. You can easily revert back if anything goes wrong.
Other good Magisk modules: - Energized, Systemizer, MidnightCore & Advanced Charging Controller (acc) but do read their XDA guides first.
Sources/Credits:-
Dm_Verity.zip Official XDA:-
link
Original unlocking XDA:-
link
Magisk XDA:-
link
Original Decrypt Data XDA:-
link
TWRP Used XDA:-
link
Credits to the authors of the above guides
Plus sorry for bad editing of videos. I am facing some problems. Will try to post better videos.
I thank all the members who have made the previous guides for their hard work. This guide by no means disrespects their hard work. This guide is just an Addition instead of an Alternative.
Read the full guide
Press the thanks button
Re edited the guide.
Added link of apps used in YouTube videos.
Not working for pie official
Deleted cruddy comments. Good job.
Good initiative but not so good noob guide. Please format it for better organization and better understanding.
malikmiran19 said:
2. BACKUP
>Use an apk backup tool to backup app installers
howto video
Click to expand...
Click to collapse
Appreciate the effort . I have a suggestion. It would be helpful to put the name or link of the app that you used to back up apks.(some apk extractor lite ig). I'll provide the one I found anyway. https://www.apkmirror.com/apk/ankit.../apk-extractor-lite-2-8-android-apk-download/
camaroamarelo said:
Good initiative but not so good noob guide. Please format it for better organization and better understanding.
Click to expand...
Click to collapse
Did so
GliderZ said:
Appreciate the effort . I have a suggestion. It would be helpful to put the name or link of the app that you used to back up apks.(some apk extractor lite ig). I'll provide the one I found anyway. https://www.apkmirror.com/apk/ankit.../apk-extractor-lite-2-8-android-apk-download/
Click to expand...
Click to collapse
Added apk links in YouTube videos
Anyone tried unlocking without erasing data?
TheDarkKnight said:
Anyone tried unlocking without erasing data?
Click to expand...
Click to collapse
nyimak
fuzuy said:
nyimak
Click to expand...
Click to collapse
What?
TheDarkKnight said:
What?
Click to expand...
Click to collapse
it means im interested in your question and im following it
I want to unlock bootloader, flash TWRP and flash a custom ROM (Cerberus OS).
I have rooted and flashed TWRP before in my previous device but I'm not familiar with unlocking and Custom ROM.
Do I have to follow all hese steps for what I want to do or I must skip decrypt/encrypt and Magisk?
dharsouparno1 said:
I want to unlock bootloader, flash TWRP and Custom ROM.
Click to expand...
Click to collapse
U can flash twrp then flash ROM and probably flash magisk for root tooo
malikmiran19 said:
U can flash twrp then flash ROM and probably flash magisk for root tooo
Click to expand...
Click to collapse
Thanks for the help.
I'm running into some problems while installing the driver software on my Windows 10 laptop. It shows Error 10 this device cannot start.
I tried to uninstall and reinstall the drivers, rebooted my pc on every step, tried to install while connected to my phone, but nothing seems to work.
I've installed the Pie Beta for Asus Zenfone Max Pro M1 (not sure if this is causing it)
Is there a solution to this problem?
I am currently on Beta Pie...will these methods work for bootloader unlocking and TWRP, custom rom flash ???? I just wanna use PE/Havoc OS rom...no other tweaks or root
thanks its working
I updated to pie beta and I think this guide is not working for that, because when flashing twrp. I'm getting 'request download size is more than allowed size' and I tried every way possible to solve it. But no luck Hope you can help me with it, or maybe it'll work after stable version?
---------- Post added at 04:15 AM ---------- Previous post was at 04:11 AM ----------
utsavdey said:
I am currently on Beta Pie...will these methods work for bootloader unlocking and TWRP, custom rom flash ???? I just wanna use PE/Havoc OS rom...no other tweaks or root
Click to expand...
Click to collapse
It's not working for me. I also updated to pie beta few days back.
Is this method working on pie stable build
Anyone tried this method on the stable pie build 056?

[Guide]Installing Lineage

Installing Lineage​
Few quick things.
LOS 18.1 is now official so the guide will now just be covering that.
I also want to address a common question, you can use Windows for this process. I prefer Linux, and Fastboot just works in Linux without driver issues. If you have Fastboot and ADB working in Windows already feel free to use that if you want.
Frequently asked Questions:
This looks like a lot of work, is there an easier way to install? Try the LOS Wiki Method.
Using TWRP 3.5.2_9-0​1. Start off Fresh. Install OOS using the Fastboot ROM.
Start off with a fresh install of OOS. You need the latest version of OOS 10. I typically use a the fastboot ROMs for this as it will do both slots for me at once. (Alternatively you can use TWRP and install the ZIPs and do it twice to get it on both slots, or my least favorite, the MSM Tool if you want. Doesn't matter how OOS ends up on both slots, as long as it ends up on both slots.)
I use Linux, and honestly I feel like it's easier and more reliable for fastboot and ADB so that's what I'm including here in these steps. It's easy to boot from a USB.
To create a bootable Linux flash drive you can use Unetbootin, which you can download for free here (Your other option would be to burn the ISO straight to a DVD and skip the unetbootin step):
https://unetbootin.github.io/
For Linux, I'm using Linux Mint Cinnamon, You can download for free here:
https://www.linuxmint.com/download.php
Then run unetbootin (yours will look a little different, I'm running it in Linux):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Point it to the Linux ISO, and tell it where an empty flash drive is. It will erase everything on the flash drive. Afterwards you can load whatever you want on the flash drive. However be aware when booting Linux from this drive you can't access what is on the drive (at least not by normal methods).
After this has successfully completed, reboot the PC, and boot from the USB drive. Your PC will boot into Linux (turning off the PC and removing the USB drive will make it boot up like normal again).
Next we need to install fastboot and adb. You need to open up the "start menu" and open the "synaptic package manager". You can find this stuff in the menus, however the easiest way to get to these items is to just start typing the name of the item. See below:
Search fastboot, click the boxes, choose install. Then search for ADB, click the boxes, choose install and then click apply. It's that easy it will download everything that's needed and install.
Time to open up a terminal:
Just to make sure we don't run into any problems we need to update adb and fastboot. In the terminal run these commands to update fastboot and adb (this is downloading them directly from Google).
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
sudo cp platform-tools/adb /usr/bin/adb
sudo cp platform-tools/fastboot /usr/bin/fastboot
You will also need the appropriate fastboot ROM. Fastboot ROMs available in this thread. The catch being that thread is no longer updated. So we will need to make our own fastboot rom. To do this we need two things:
1. The stock rom zip (OP Site).
2. Payload dumper. I've yet to get the one from the GitHub link to work, so I've been using the one from this Article. Direct Download Link
You need to extract the payload.bin file from the stock rom zip. Extract the payload_dumper files as well, and place everything in the same folder. Payload_dumper requires python3. Open up Synaptic again, search for python3.6 and install it. Now open a terminal so we can extract the images from the payload.bin.
Navigate to the location of payload_dumper and your payload.bin file. In my case my commands are:
cd Desktop <-- switches to the Desktop folder
cd payload_dumper <-- switches to the payload_dumper folder on the Desktop
python3 payload_dumper.py payload.bin <-- runs the payload_dumper "program" and extract the images from the payload.bin
Now would be a good time to back everything up. The phone will get wiped. Extract the fastboot images to a folder that is easy to find. I would recommend the Desktop.
Now it's time to flash all those images we just extracted using payload dumper. Place the phone in fastboot mode. You can do this using the advanced reboot menu, ADB, or the key combinations (all key combos listed below for reference):
Volume Up + Power while turning on will boot to fastboot.
Volume Down + Power while turn on will boot to recovery.
Holding Volume Up + Power should force the phone to turn off.
Volume Up + Volume Down should put your phone in Download mode for the MSM Tool.
You can flash the images one by one or use a script. My script is available here. Flashing the fastboot ROM should look something like this:
That image explained:
cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
cd flash <-- I put my fastboot images in a folder called flash. This stuff is case sensitive. My folder was all lowercase.
sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
sudo sh FlashThese.sh <-- Tells the terminal to run my script, since the script contains fastboot commands it must be run as root.
At the end you should get something like this:
Then just choose start form Fastboot (If you were previously on a custom ROM go straight to recovery and wipe everything). Not booting and getting dumped off at the OnePlus recovery screen is nothing to worry about. Choose your language of choice, Wipe data and cache, Erase everything (Music, pics, etc), This can not be undone, continue. After that the phone will boot. Once booted enable developer options, advanced reboot, and reboot to fastboot.
2. Installing TWRP.
First step is to boot the correct TWRP image. Grab the current TWRP from the official site. You need both files, the img file, and the installer. Once again from the terminal:
The image explained:
cd Desktop <-- Switched the directory to the Desktop the default directory when you open up the terminal is the /home directory.
sudo fastboot devices <-- Is just checking to see if my PC can see my phone, and making sure it's in fastboot. Sudo is necessary for this distro, as both fastboot and ADB must be run as root.
sudo fastboot boot twrp-3.5.2_9-0-fajita.img * <-- Sends that TWRP image to the phone to be booted temporarily. Only boot this, never run the command "flash".
Once in TWRP the phone should show up as a media device so you can copy files to it. Copy the TWRP installer over to it. Choose Install from the TWRP menu and navigate to where you placed the TWRP installer. Press on it, and swipe to confirm flash. When it is done hit the back button until you are back out to the main menu.
From the main menu choose reboot, and choose Recovery:
The first time you try and reboot the official version of TWRP it will ask you if you want to install the TWRP app. Do NOT install the app. In the settings you can disable this prompt. Your other option is just uncheck both boxes at the screen you see below when you get to it, and then click the button that says do not install. Do use the slider. At that point the phone will reboot as to recovery as you selected.
Now that you are back in TWRP that is now installed, time to wipe the phone. From the main menu choose Wipe. Swipe the factory reset slider at the bottom. Then hit back. Next hit Format Data. Type Yes to Continue. Hit back to continue. Keep hitting back till you get to the main menu.
Do NOT wipe cache, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else, Just Factory Reset and Format Data. After doing those two Reboot to Recovery one more time. So go back into the reboot menu, choose reboot to recovery again (swipe to allow modifications if it asks). You must do this after formatting data.
3. Install Lineage
Links:
Lineage 18.1 XDA Thread
Official 6T Lineage Downloads
The phone should still be in TWRP at this point. You now need to copy Lineage to the phone. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.
Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. If it's not on the phone, just copy it over again real quick. On A/B devices ROMs get flashed to the opposite slot. Things like Gapps, Magisk, etc get flashed to the current slot. We need Lineage on both slots, so it must be flash again. Flashing it twice only needs to be done the first time as we need to get rid of OOS. For updates it just gets flashed once. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:
Once back in TWRP flash Lineage again. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.
Now run the TWRP installer again. Back out to the main menu, and reboot to recovery.
4.Optional, Gapps
Links:
NikGapps <-- For Lineage 18.1 (Use the R Folders for Android 11. I recommend the "Core" version. I also tested Basic though if you want that level of Gapps. I strongly recommend you grab setup wizard out of the R Addons Folder, I used the regular setup wizard, not the pixel one.)
MindTheGapps <-- It's worth mentioning here Lineage recommends MindTheGapps for 18.1. Take your pick. I personally use NikGapps as I can use a "leaner" Gapps package.
Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.
5. Very Optional, Magisk
These steps are very optional. However this is how I, root, pass safety net, and get a various apps to appear in the Play store.
Flash Magisk in TWRP. For Magisk 23, you now have to rename the Magisk.apk to Magisk.zip. Then flash it in TWRP. If you wanted to uninstall it, you rename it to uninstall.zip. If you already had an older version of Magisk installed, make sure you do not have it hidden / nenamed when installing Magisk 23 for the first time. Restore the original package before installing 23.
Magisk <-- Flash this right after Gapps.
These items are add-ons are flashed in Magisk after the first boot (Don't flash these in TWRP anymore):
MagiskHide Props Config
Busybox
To flash modules in Magisk press the puzzle piece icon. Then choose install from storage. Now just choose your addons. After flashing the icons it will have a reboot icon at the bottom. You can reboot or you can press back and flash another. After you are done reboot.
You will also need a Terminal Emulator. I personally use:
Terminal Emulator for Android
Once all these are installed the first step is setup Magisk. Under Magisk go to settings:
In version 20.4+ Magisk Hide is no longer on by default. So make sure the Magisk Hide, Hide Magisk from various forms of detection switch is flipped. Then press Hide Magisk Manager. This will bring up a box for you to choose a random name for the Magisk Manager, type whatever you want here. You can leave it Manager if you wish, but I typically change this.
Now open Magisk again. It will ask you to download it again, click ok, then manually open the app again as it says. Now we need to open Magisk hide. This is now under the shield icon, then click the arrow at the top:
These are the apps you don't want to know that you have root. Less is better. You can cause instability problems by just choosing everything. My general rule of thumb is, Google, steaming video, music, and payment apps get selected. In my experience if I come across an app that needs it and I didn't select it, I just clear cache and/or data and re-open the app and it works. There are some big multiplayer apps that ban hardware / people, so do your research (don't ask me, I don't play those games).
Next time to change the device fingerprint using MagiskHide Props Config Module. We do this using the terminal emulator. In the terminal emulator, type "su" to gain root privileges. Then type props to run the module:
Now it's just following the menus. Choose option 1 - Edit device finger print. (type 1, hit enter)
After this you will see a menu of devices. It doesn't matter what device you pick really. If you want apps / Google to think you have a OPPO or Samsung pick one of those Fingerprints. However there's a bit more to passing Safety-net than that. Since Google has changed how things work not all those fingerprints that used to work will work now. Also now you may get an error when you turn on the phone because of the security dates. The OP6T Android 10 fingerprint has no issues at this point, so use that if you want:
After choosing the fingerprint you want, it will ask you if you want to reboot. Choose yes. After rebooting, you may need to clear the cache from the play store for some apps to appear in it. You should now pass safety net. Check this in Magisk:
6. Very Optional, Ad Blocking with a Host File.
You can block many things with a hosts file, most popular would be ads. I've been use StevenBlack's host file which is a compilation of several hosts files. This is located on Github:
https://github.com/StevenBlack/hosts (Scroll down you'll see the options of what you can block)
Direct link to the hosts file I use. This will block Adware / Malware.
Unfortunately for quite some time now on this device you can no longer just use a root browser to swap the hosts file. The easiest way is to use TWRP.
First we have to make the hosts file. The hosts file must use unix / linux line endings. If you are using linux, don't worry about this, just create the file. If you are using Windows, the easiest thing to do is use Notepad++ (Free).
Notepad++ Downloads
Next one other caveat. The hosts file is quite large. I've never had much luck copy and pasting it from any other browser than Firefox (Windows or Linux), but however you get it into Notepad++ is not a big deal.
Once in you have the hosts file into Notepad++ go to Edit, EOL Conversion, and Choose Unix (LF).
Now save the file as "hosts" no ending. This does mean under file type you will need to change it to All File types *.*. Move this hosts file to your phone. Then reboot to recovery. From the main TWRP menu, choose mount. Then mount system:
Hit the back button and go to the advanced menu. Choose File Manager:
You will find your hosts file under /sdcard, wherever you placed it. In my case I placed it in a folder called ROMs. Once you locate it, press and hold it for a moment, and relase. Then choose copy file:
At this point you need to tell TWRP where you want to paste the hosts file. It belongs in the /etc folder. The only hic-cup here is depending on what you were doing in TWRP this could be (on this device) /system/etc or /system/system/etc (you will see similar folders to the image below if you are in the right place). Once you are there, press "paste?" button in the lower right corner:
After this just swipe to confirm:
You can now reboot the device, and your hosts file should now be in place. Your ad block should now be active for all apps as it's global for all connections.
7. Reboot to system.
Updating Lineage​
1. Flash Lineage.
Reboot to recovery. You can use the advanced reboot menu, or Volume Down + Power while turning the phone on. Don't wipe anything. From TWRP's main menu choose install. Then navigate to your ROM .zip location and click on it. Then swipe to confirm flash.
Lineage will replace TWRP, so you need to reflash TWRP as well. Run the TWRP installer again. After the TWRP installer has run, back out to the main menu, and choose reboot, then recovery:
2. Optional, Gapps (if you installed them once you must continue to install them or do a clean install)
Links:
NikGapps
Now that your phone is back in TWRP for the last time before booting up Lineage, it's time to install Gapps if you want them. This step is optional. Same as the other steps here, go to install, choose your OpenGapps package, Then navigate to your .zip location and click on it. Then swipe to confirm flash.
3. Reboot to system.
Last updated​Since I don't want people to have to wonder if these instructions are current, I am going to periodically test and update this post with my results. Please note I'm testing with a 6T, TMobile 6Ts are different. You can generally assume previous versions of LOS and OOS were also tested, but if you are unsure feel free to ask in this thread.
Last tested with:
OOS 10.3.7 and LOS 17.1 12-31 with TWRP 3.4.0-2
OOS 10.3.11 and LOS 18.1 05-27 with TWRP 3.5.2_9-0
This method has also been tested with:
OOS 10.3.3 and Omnirom 5-24 MicroG and Omnirom 5-24.
Cliff Notes
*TWRP 3.5.0_9-0+ Must be used with LOS 18 / 18.1
- Backup everything to the PC, so you will need to copy all your data over.
- Sync all your accounts, etc.
- In TWRP format data. Reboot recovery (This step wipes the device, make sure you backed everything up!)
- Factory Reset. (This is the slider at the bottom, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else)
- Flash Lineage
- Flash TWRP Installer
- Reboot to Recovery
- Flash Lineage (This is only the first time, to get the AOSP rom on both slots, only do this for the first install)
- Flash TWRP Installer (This is only the first time, to get the AOSP rom on both slots, only do this for the first install)
- Reboot to Recovery (This is only the first time, to get the AOSP rom on both slots, only do this for the first install)
- Flash Gapps (Optional)
- Flash Magisk (Optional) (Remember for ver 22 the Magisk.apk gets renamed to Magisk.zip, can also be renamed to uninstall.zip for uninstalling)
- Reboot to System.
- Then you should be able to setup the device, copy everything back over. Restore your data.
After this you should be able to update Lineage as normal.
- Reboot to recovery
- Flash Lineage.
- Flash TWRP Installer
- Reboot to Recovery
- Flash Gapps. (Optional, but if you flashed them once you have to keep flashing them.)
- Flash Magisk. (Optional)
- Reboot to system.
- No loss of data, or anything.
Thanks for the guide, able to flash los 17.1 successfully.
How to go back to OOS?
Does anyone have a guide on how to go back to OOS after flashing Lineage according to Lineage's instructions?
fordjonathan said:
Does anyone have a guide on how to go back to OOS after flashing Lineage according to Lineage's instructions?
Click to expand...
Click to collapse
Back up your data, use Step 1 of these instructions. That will put OOS back on your phone.
MSM Tool, always my least favorite option, but always an option.
MSM Tools for Regular 6T (TMobile uses a different one)
installed 17.1!
OhioYJ said:
Installing Lineage...​
Click to expand...
Click to collapse
Massive thanks for your instructions!
- at first, I tried upgrading from LOS 16.0 to LOS 17.1. I followed the instructions on the wiki, but it landed me in the qualcomm crashdump mode.
- after that I ran into your instructions, and tried to follow your update guide, but it didn't help (not very surprising I guess, but I haven't had much to lose at this point ).
- after that, I just followed your fresh install guide (i.e. flashing the fastboot room and starting from scratch), followed every step and it worked!
I wonder if it's worth updating lineage OS wiki and pointing to your instructions? There is bunch of people in this thread, who also bricked the phone into crashdump, so perhaps it could help to prevent it for someone else.
Updating to LOS 17.1 ?
Dasseem said:
Thanks for the guide, able to flash los 17.1 successfully.
Click to expand...
Click to collapse
Initially I had problems with updating LOS, so I returned to Stock. As more people attempted to install LOS, and this fine Original Poster "Ohio" offered such excellent, and detailed instructions, I have been running LOS 16 since February.
However, I have not updated it, since I have had Zero Issues.
But to clarify, you used this method to update to LOS 17.1 ?
- coming from LOS 16 - without first returning to a fast-boot ROM ?
Did you up-date GApps accordingly during this Flash ?
Thank You, in advance, for any assistance!
:good:
barguybrady said:
But to clarify, you used this method to update to LOS 17.1 ?
- coming from LOS 16 - without first returning to a fast-boot ROM ?
Click to expand...
Click to collapse
Hi, I updated my previous reply to make it a bit more clear!
Yep, I was on LOS 16. Haven't had any issues, but figured why not update if I'll have to do it eventually
So I downloaded 17.1 and used the wiki instructions, which messed the phone up
Ended up flashing fastboot rom and starting from scratch, flashed gapps and magisk according to OhioYJ's instruction and it worked.
Flashing method
barguybrady said:
But to clarify, you used this method to update to LOS 17.1 ?
- coming from LOS 16 - without first returning to a fast-boot ROM ?
Did you up-date GApps accordingly during this Flash ?
Thank You, in advance, for any assistance!
:good:
Click to expand...
Click to collapse
I was using carbon ROM previously, had to move to OOS latest for flashing the lineage 17.1, believe it needs to be done if you are coming from pie, people know better correct me if I am wrong here.
As Karlicoss mentioned, it's better to follow the method posted by Ohio.
OhioYJ said:
Cliff Notes Versions
Installing Lineage
- Install fastboot ROM boot it once. Just to make sure everything is good.
- Reboot to fastboot.
- Boot the image of TWRP.
- Run the TWRP installer, reboot to recovery
- You backed everything up right?
- Factory reset (This is the slider at the bottom in the wipe menu).
- Format data. (This is the button that says Format data in the wipe menu)
- Do NOT wipe cache, do not Wipe system, do NOT Wipe Dalvik / ART, do not add anything else, Just Factory Reset and Format Data. After doing those two Reboot to Recovery one more time. You must do this after formatting data.
- Now transfer Lineage and TWRP to your phone, Windows / Linux should see TWRP fine as a media device when plugged in.
- Install Lineage
- Run the TWRP Installer.
- Reboot to Recovery.
- Install Lineage (You need Lineage on both slots, so yes run it again)
- Run the TWRP Installer (yes again).
- Reboot to Recovery.
- Install Gapps if you want them.
- Install Magisk if you use Magisk. Do not install modules or other add ons at this point. Boot once and go through the setup and everything, then install your add-ons.
- Be aware the phone may restart once, then Lineage will start up and all will be good.
Updating Lineage
- Reboot to recovery
- Flash Lineage.
- Flash TWRP Installer
- Reboot to Recovery
- Flash Gapps. (Assuming you use them, if you installed them once you must continue to install them or do a clean install)
- Flash Magisk. (Optional If you use it)
- Reboot to system.
- No loss of data, or anything.
- No need to flash anything twice etc.
Click to expand...
Click to collapse
Updating failed for me, as it shows everything encripted once I reboot the second time to recovery on slot B...
badpanda said:
Updating failed for me, as it shows everything encripted once I reboot the second time to recovery on slot B...
Click to expand...
Click to collapse
Usually this means you didnt format data, or you are using an old version of TWRP. Did you do a clean install?
I just tried it on my phone, was running 4-12 build, using 3.3.1-32 TWRP, updated to the 4-14 build, using 4-14 Gapps (nano), everything went smoothly here.
OhioYJ said:
Usually this means you didnt format data, or you are using an old version of TWRP. Did you do a clean install?
I just tried it on my phone, was running 4-12 build, using 3.3.1-32 TWRP, updated to the 4-14 build, using 4-14 Gapps (nano), everything went smoothly here.
Click to expand...
Click to collapse
No, no clean install. Just wanted to update to today's newest build os.
bump...
Thanks a lot for your guide. Very helpfull.
I'm using it with /e/ rom.
installing android 10 roms
I followed exactly as it was written. Same issues arose for me. After the phone is off then turned on no LTE. It makes phone calls and also text stuff. HOWEVER when you take out and reinsert sim LTE is enable. What is the problom?????????
sickpoppy said:
I followed exactly as it was written. Same issues arose for me. After the phone is off then turned on no LTE. It makes phone calls and also text stuff. HOWEVER when you take out and reinsert sim LTE is enable. What is the problom?????????
Click to expand...
Click to collapse
Just cycling airplane mode doesnt work? This isn't a TMobile 6T is it? You are in Sim slot 1? You maybe better asking in the LOS thread, and provide log it not working and then it working when you reinsert it. Im not quite sure whats going on there.
OhioYJ said:
Usually this means you didnt format data, or you are using an old version of TWRP. Did you do a clean install?
I just tried it on my phone, was running 4-12 build, using 3.3.1-32 TWRP, updated to the 4-14 build, using 4-14 Gapps (nano), everything went smoothly here.
Click to expand...
Click to collapse
So this means you do have to always format data for every single update??
---------- Post added at 09:07 PM ---------- Previous post was at 09:05 PM ----------
sickpoppy said:
I followed exactly as it was written. Same issues arose for me. After the phone is off then turned on no LTE. It makes phone calls and also text stuff. HOWEVER when you take out and reinsert sim LTE is enable. What is the problom?????????
Click to expand...
Click to collapse
Change your sim card to the other slot...
---------- Post added at 09:11 PM ---------- Previous post was at 09:07 PM ----------
@OhioYJ So for an update you boot to recovery flash LOS latest version then flash twrp again and then reboot to recovery second time then format data to possibly decript encrypted system and, transfer files both gapps and magisk to device and then install gapps and magisk, lastly just reboot to system?
reply
yes it is a tmobile but it was flashed to global. TWRP is the version you are using. downloaded the lastest ROM. Weird it finds LTE at first then like I said when then phone shuts off LTE doesnt work til I take sim out.
badpanda said:
So this means you do have to always format data for every single update??
Click to expand...
Click to collapse
No that would be ridiculous. Not necessary at all. You have something else going on, but I dont know what. My update procedure is exactly as listed on the OP, on two 6Ts, two different carriers.
sickpoppy said:
yes it is a tmobile but it was flashed to global. TWRP is the version you are using. downloaded the lastest ROM. Weird it finds LTE at first then like I said when then phone shuts off LTE doesnt work til I take sim out.
Click to expand...
Click to collapse
A TMobile "converted" to global does not equal a global 6T. Logs posted in the LOS thread, may help out other TMobile users? The TMobile 6Ts introduce all sorts of quirks, and Im afraid I dont have any experience with them, so hopefully another TMobile user will be able to help.

[RECOVERY][TB-X505F][UNOFFICIAL] TWRP 3.6.x for Lenovo Tab M10 HD

This version of TWRP works on the Lenovo TB-X505F (wifi).
For the TB-X505X, see this thread. For the TB-X605F/L, see this thread.
For the TB-X606F/L, see this thread. The X606F/L is the second gen M10 and it uses a Mediatek SOC.
Code:
#include <std_disclaimer.h>
/*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*/
Working:
AFAIK, everything is working including:
data decryption
MTP
Known issues:
time not adjusting for Daylight Saving
OTA (for a workaround see this post)
Before installing TWRP
Before you install TWRP, upgrade your tablet to the Android 9 (Pie) or Android 10 (Q) stock ROM.
This tablet shipped with Android 8 (Oreo), in which the bootloader did not allow unlocking. When you tried to unlock the bootloader, it gave this error message:
Code:
fastboot oem unlock-go
FAILED (remote: 'unknown command')
fastboot: error: Command failed
Installation
It is recommended that you also install Magisk. This will ensure TWRP remains your default recovery.
Step-by-step guide
download TWRP to your PC (see the Download section below)
download magisk.apk to your MicroSD or OTG device. Get the latest Magisk apk file here. Rename the filetype from apk to zip (for example Magisk-v22.0.zip)
if your bootloader is already unlocked, go to step 4. To unlock bootloader:
on tablet: go to Settings->System->About and press "Build number" 7 times to enable Developer Options.
on tablet: go to Settings->System->DeveloperOptions. Turn on: "OEM unlocking" and "USB debugging".
connect tablet to your computer. Tablet will ask for permission to "Allow USB debugging". Tick "always allow" and select "OK".
backup any files you want to keep to an external device (MicroSD/OTG/computer), because the next step will wipe all your photos, files, google account etc on the tablet.
Now unlock the bootloader:
Code:
adb reboot bootloader
fastboot oem unlock-go
fastboot reboot
flash the twrp image:
Code:
adb reboot bootloader
fastboot flash recovery twrp.img
if you haven't loaded Magisk yet, go to step 6. If you have already loaded Magisk, you can just reboot and you're finished:
Code:
fastboot reboot
adb reboot recovery
load Magisk (step one): reboot to recovery. Do not reboot into the system, because it will over-write TWRP with stock recovery. If that happens, go back to step 4 and start again. When you issue the reboot command (below), you have to immediately press the button combination to reboot to recovery (TWRP). Here are the steps:
issue the reboot command:
Code:
fastboot reboot
immediately press and hold all three buttons (Pwr+VolUp+VolDown). The tablet might reboot twice. Release all the buttons when you see the TWRP screen, or hear your PC acknowledge that ADB is connected.
load Magisk (step two): flash Magisk. In TWRP:
select "Install"
use "select storage" to locate device you stored magisk.zip on.
press the OK button
select the Magisk zip file
swipe to confirm Flash
when Magisk is finished, hit the "Reboot System" button
finished!
If you prefer to use button combos, rather than fastboot/ADB commands:
Vol Down + Power = fastboot mode
Vol Up + Vol Down + Power = recovery mode
Changelog
Code:
01/03/2023 - bug fix: data partition again backs up and restores correctly
20/01/2023 - add TW_EXTRA_LANGUAGES and TB_X505F_S001149_221115_ROW kernel (credit to @Tonyha7 )
30/12/2022 - add system partition to AdvancedWipe (TB_X505F_S001147_220830_ROW firmware only)
15/11/2022 - TWRP 3.7.0-0 update
- support for TB_X505F_S001147_220830_ROW
18/12/2021 - TWRP 3.6.0-0 update
- support for A12 decryption (keymaster)
27/03/2021 - TWRP 3.5.1-0 update
- change to landscape mode for tablets
01/01/2021 - TWRP 3.5.0-0: initial release
Downloads
TWRP 3.7.0-0 for X505F: twrp-X505F_11.img (for TB_X505F_S001147_220830_ROW and above)
TWRP 3.6.0-0 for X505F: twrp-X505F_11_2021.img (for earlier stock ROMs)
Source code
https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp/tree/twrp-11
https://github.com/Yahoo-Mike/recovery_device_lenovo_X505F/tree/android-11.0
Credits
The guys at TeamWin Recovery Project.
Everyone whose device trees I plagiarised from GitHub.
Contributors
Yahoo Mike
Tonyha7
Last Updated 2023-03-01 (fix /data backup/restore)
Created 2021-01-01
reserved
Thanks for useful post,
Possible to reboot into recovery from fastboot?
zubair1836 said:
Thanks for useful post,
Possible to reboot into recovery from fastboot?
Click to expand...
Click to collapse
Not that I know of. The bootloader accepts the command fastboot reboot recovery, but boots to system anyway.
Hello there, I've been looking how to install this on my slow tablet for almost like an hour. Could there be some tutorial or extended explanation to the process and installation, I'm such a noob, sorry.
This worked for me. Thank you for your effort and the TWRP!
Worked for me too - many thanks!
Can't wait for a custom ROM!
TWRP Recovery Installation Steps
1. Download android platform tools
2. Unlock developer mode on the M10
3. Enable USB debugging on the M10
3. OEM unlock enable on the M10
4. XDA download TWRP copy to sd
5. Download Magisk app (from Github!!! johnwu), change extension to .zip
6. Adb to fastboot
7. fastboot flash recovery [filename.img]
8. Turn off device
9. Turn on device holding all 3 buttons, release when see Lenovo splash screen
10. In TWRP find Magisk zip
11. Install Magisk
Stock ROM Recovery
1. Download qualcomm drivers 64 bit install
2. Download Lenovo recovery and image tool windows app from Lenovo support website
3. Fastboot oem edl
4. Turn off M10
5. Start recovery windows app, wait till instructions
6. Hold volume up (up is the side of the button closest to the front camera) and insert cable
7. Release button after windows app detects device
8. Troubleshoot by checking windows device manager for the M10 appears as a Qualcomm device
I'm thinking about getting one of these tablets, but before I do so I'd like to know that the screen lock still works after installing TWRP.
This might sound like a crazy question, but my Samsung Tab A won't set a screen lock - pattern, PIN or password - once TWRP has been installed, and I'd rather not run into the same issue again.
Heeni said:
I'm thinking about getting one of these tablets, but before I do so I'd like to know that the screen lock still works after installing TWRP.
This might sound like a crazy question, but my Samsung Tab A won't set a screen lock - pattern, PIN or password - once TWRP has been installed, and I'd rather not run into the same issue again.
Click to expand...
Click to collapse
Confirmed working normally.
zubair1836 said:
Confirmed working normally.
Click to expand...
Click to collapse
Many thanks.
Thank you! TWRP is working fine!
Stupid me flashed before I installed the Android 10 OTA, so I had to temporarily go back to stock recovery. Unfortunately beamingbadger's method didn't work for me.
This is how it worked for me:
Download the OTA via Lenovo's "Rescue And Smart Assistant"
The stock recovery image will be in the Download folder (default path: C:\ProgramData\LMSA\Download\RomFiles) called "recovery.img"
Flash the recovery.img the same way as you would with the twrp img (adb reboot bootloader -> fastboot flash recovery recovery.img)
fastboot reboot
Install OTA
Flash TWRP recovery + Magisk again (follow the steps from the first post, skip bootloader unlock)
The method I use to install OTAs is:
open Magisk App
select "Uninstall Magisk", then the "Restore Images" option
reboot to Android (you will have no root access and stock recovery is restored)
apply OTA
re-flash twrp and install Magisk
NOTE 1: if you've unencrypted your data partition, it will be re-encrypted by this process.
NOTE 2: the new Magisk App (v22) can be installed in TWRP by renaming the *.apk to *.zip. See the new install instructions.
What's involved with running gsi ROMs on this device? It's got the same SoC as my Samsung Tab, which runs them well, so I'm assuming that this tab will also, but I'd like to know if there are any traps that I need to be aware of.
I can partly answer my own question. It all went more smoothly than I expected: installing TWRP, Magisk and then LineageOS R Mod //LiR, followed by Disable_Dm-Verity_enfec.zip.
If I want to try other GSI ROMs, do I need to flash stock before trying another one? I've had some trouble doing that (won't boot) and it's possibly to do with encryption.
Heeni said:
I can partly answer my own question. It all went more smoothly than I expected: installing TWRP, Magisk and then LineageOS R Mod //LiR, followed by Disable_Dm-Verity_enfec.zip.
Click to expand...
Click to collapse
That's great news. Well done.
Heeni said:
If I want to try other GSI ROMs, do I need to flash stock before trying another one? I've had some trouble doing that (won't boot) and it's possibly to do with encryption.
Click to expand...
Click to collapse
On my X605F I do this in twrp for a new GSI install:
format (not wipe) data partition. This is the option where you have to confirm by swiping.
factory reset. This clears the caches.
restore the stock boot and vendor partitions (from a backup I made). This is because Magisk can touch these partitions.
install the GSI system image
install anything else I need like disable_Dm-Verity, Magisk, gapps etc
I don't know what LOS R Mod //LiR does to your system. If it touches any other partitions, you should restore those to stock too.
Thanks for that. It gives me something to go on with. I've downloaded the stock ROM from lolinet, so I can grab the boot and vendor images from that.
I was able to try a couple of other GSI ROMs and I've settled on AndyYan's LineageOS 17.1 for now. The only serious installation issue I had - which I can laugh about in hindsight - was thinking I'd got myself into a very bad bootloop, when all I needed to do was let go of the power button after the Lenovo logo appeared.
On this tablet, there is no navigation capability at all (no navbar, no gestures, no setting to configure them) on installation, and I have to set it using adb. I suspect it goes back to PHH basic ROMs, but I don't feel like doing yet another install and testing right at this moment. Is this happening on the other tablets that you're testing, or is it unique to this one?
I just posted the v3.5.1 update to twrp.
It's also changed to landscape mode, as many of you requested.
Quick question, how do i apply new system updates with twrp installed? Should i not bother? Also, i forgot how to block check for updates!
will this allow flashing of stock roms download from lenovo recovery? ive been stuck on an ancient android 9 version because the ota updater fails.

[GUIDE][SM-T290/SM-T290N] Samsung Galaxy Tab A 8.0 (2019) - How to Install LineageOS 18.1 (GSI) + Gapps

Hello!
So recently I was able to install LineageOS 18.1 (GSI) + GApps on my Samsung Galaxy Tab A 8 (SM-T290) tablet and wanted to share how I did it. I noticed a lack of decent step-by-step guides to modding this tablet so I figure I'd share what I learned through scouring multiple threads and through multiple headaches. Fun fact: I also got this working with LineageOS 19 (GSI), however it ran pretty poorly and Android 12 is ugly as hell so why bother anyway? ALSO interestingly enough, you'll see I wrote [SM-T290N] in the title as well. That is the model of the Kid's Edition of this phone, which happens to be the one I had. So I can confirm this process works for the Kid's Edition of this tablet as well as the original.
Some Things To Note
Below I'll list the software/firmware I used in this process. You don't necessarily need to follow this exactly but I don't see any reason not to. The end result is a working install of LineageOS with GApps so if that's what you want I would just follow along step-by-step. ALSO I'm writing this from memory so if I make a mistake please let me know and I'll try and correct it.
Click to expand...
Click to collapse
What You'll Need
Your tablet
A USB Cable to connect your tablet to your PC
A 4GB+ MicroSD card
A Windows PC
Some patience
Instructions
Preparing Your MicroSD Card
1. Place the LineageOS 18.1 .img file from this thread (On SourceForge, there is a section below the files about the naming conventions and how they relate to the hardware of your device and configuration of your ROM. I used the lineage-18.1-20220315-UNOFFICIAL-arm64_bvS-vndklite.img.xz image for my device. If your device is slightly different, you can use Treble Info to determine what ROM you should use. Just make sure to use the VNDKLITE rom if your device supports it.
2. Place the multidisabler .zip folder on there as well. This will preserve encryption provided by TWRP after rebooting.
3. Finally, place the MindTheGapps .zip folder on your SD card (make sure to get the correct version. In my case this was the 11.00-arm64 version).
4. Insert your MicroSD card into your device.
Unlocking the Bootloader
So the first thing you're gonna want to do is unlock your OEM bootloader on your Samsung device.
1. Go to Settings->About Phone->Software Information and look for a field called "Build Number". Tap this Five Times until you see a notification saying developer settings were enabled.
2. Go to Settings->Developer Settings and look for the setting labeled OEM Unlock and turn it on.
If you don't see this setting try connecting to wifi, changing your date and time to around two months prior (I set mine to back to May 2021 since the firmware I was using was set in July 2021), then go back to your developer settings and switch them off and back on again. You should now see the OEM Unlock option.
Click to expand...
Click to collapse
3. From here, you can reboot your device into Recovery Mode by holding the Vol+ and Vol- buttons when the device begins to boot again.
4. You should see a blue screen with some options. Press the Vol+ button to enter Download Mode. This is where you'll use Odin to flash the firmware you need as well as TWRP.
Flashing Firmware
So when I attempted this process I used Magendanz's Unofficial TWRP 3.6.0 as it is the only version of TWRP I found for this device. I also used Odin v3.14.1_3B Patched from this XDA thread. Magendanz's TWRP requires you to have the T290XXU3CUG4 Firmware (I used the XAR region) in order to flash TWRP to your device (you can check wether or not you already have this firmware on your phone by looking the About Phone section again). It takes a while to download though make sure you have some time.
1. Download Odin and run the program. Unzip your firmware folder and use the relevant files when selecting the BL, AP, CP, CSC fields in Odin. I didn't use the HOME_CSC just leave it blank.
2. Connect your device via USB and Flash this firmware to your device.
3. Once your device restarts, go through the setup process and then repeat the Unlocking the Bootloader instructions above in order to make sure it is unlocked again.
4. Reboot your device the same way as stated above.
Flashing TWRP
Before starting, be aware that after you flash TWRP to your device, your device will restart and attempt to open the stock system again. You're going to want to hold the Power and Vol+ buttons simultaneously. You will likely get a warning screen saying that the bootloader is unlocked and may ask you to do a factory reset, this (I believe) is fine. The key here is that once you press the Power Button to continue (as instructed on the warning screen) you'll want to immediately press and hold the Power and Vol+ keys for around 6 Seconds before letting go again (you should be seeing the Samsung Galaxy Tab A logo screen). After letting go, wait around 3-4 seconds, if nothing changes, restart the device by holding all three buttons (Power, Vol+,Vol-) and attempt the process again. It's a pain in the ass but you'll get it eventually. Just make sure not to let the device boot into the system again as that can cause problems in TWRP and you'll likely have to start the process over (from flashing the firmware).
1. Once your tablet is once again in Download Mode, open Odin again and flash the TWRP (tar.md5 file) to the AP (recovery) partition. Do not use any of the other partitions.
2. If this is successful, your phone will begin to reboot. Quickly press and hold the combination of buttons Power and Vol+ until you see the warning dialog pop up. Once you do, release all buttons and be ready to quickly press and release the Power button continue, and then immediately after press and hold the Power and Vol+ buttons again for 6 seconds. After around 6 seconds, release all buttons. Wait around 3-4 seconds and, if the screen does not change to the TWRP logo, restart the device by pressing and holding all buttons simultaneously and try this step again.
3. If you have entered into TWRP, congrats!
Installing Custom ROM + Software in TWRP
1. The first thing you'll want to do is select the Wipe->Format Data. Type 'yes' and hit enter (or swipe I forget which).
2. Next, select Install, and then select your MicroSD card as your storage device. You should see your zip files (if not switch from the install image option).
3. Install the multidisabler, do not reboot
4. Go back into Install and select Install Image (might not be the exact naming) option. Select your MicroSD card as the storage device again and install the LineageOS 18.1 rom. Do not reboot.
5. Go back into Install and select your MindTheGapps zip file and install it.
Now, a lot of people run into a problem when trying to install Gapps which is your device complaining about no more available space in the system partition. If this is the case, go back to Wipe and select Advanced Wipe. Select your system partition and then select Change or Repair Partition. Once you're here you should see the size and available space of your partition. You'll want to hit Resize Partition and let it do it's thing. To confirm it worked, go back to Wipe->Advanced Wipe->Select System->Change or Repair Partition and your available space should be much larger now. Now just attempt to install MindTheGapps again.
Click to expand...
Click to collapse
Final Steps
Once you reboot you should be able to successfully reach the setup screen for Lineage. Go through the steps of setting up your device as usual and be sure that Gapps are installed. Go ahead and re-enable developer settings and enable USB-Debugging and Root Debugging. The reason for this is that, when I first installed Gapps, Google Play Protect would keep throwing warnings at me about my device not being Google Play Certified. This means I couldn't actually use any of the google play services. If you run into the same issue, here are the steps you can take to fix it:
1. First, go into Settings->Apps and find your Google Play Services app. Clear the cache and delete the app data, then reboot your device. If you try and sign into the Google Play store and you are able to without getting any play protect warnings, then you're good you can disregard the following steps.
2. If you are still receiving these warnings, you'll want to head over to this site and follow the instructions (I'm not gonna tell you how to use ADB here). Once you submit your framework ID, reboot your device. Everything should be working fine now.
And that's it! If I am forgetting any steps please let me know, again I am writing this from memory of the process so it may be missing some minor details. I hope this helps!!!
How's the stability, speed and the responsiveness on Lineage with a t290? I have mine rooted debloated and twrp installed but it is slow on stock OS
kkdamion said:
How's the stability, speed and the responsiveness on Lineage with a t290? I have mine rooted debloated and twrp installed but it is slow on stock OS
Click to expand...
Click to collapse
It runs surprisingly well! Much better than stock. There’s virtually no input lag and the battery life is also very solid on lineage.
Where i run into some lag is when trying to use apps that have embedded video in them. For whatever reason the T290 cannot handle video very well at all.
So yeah I would definitely recommend trying it, it’ll really breathe new life into that tablet
i cant get google play services to work and i cant fetch device_id to register the device
i get "no closing qoute" message
adb shell 'sqlite3 /data/data/com.google.android.gsf/databases/gservices.db \
/system/bin/sh: no closing quote
EDIT: downloaded "android device id" APK from the internet and gathered the framework id information from the app
kkdamion said:
i cant get google play services to work and i cant fetch device_id to register the device
i get "no closing qoute" message
adb shell 'sqlite3 /data/data/com.google.android.gsf/databases/gservices.db \
/system/bin/sh: no closing quote
EDIT: downloaded "android device id" APK from the internet and gathered the framework id information from the app
Click to expand...
Click to collapse
Glad it worked out for you! Let me know if you have any more questions and I'd be happy to help.
Hi! is this applicable also for SM-T295?
for those trying to figure out the Google Play Certified page with the adb command
Code:
adb shell 'sqlite3 /data/data/com.google.android.gsf/databases/gservices.db \
"select * from main where name = \"android_id\";"'
do : adb shell
first then paste in :
sqlite3 /data/data/com.google.android.gsf/databases/gservices.db \
"select * from main where name = \"android_id\";"
and it shouldn't give you the error
i must say. linageos on my sm-t290 is really nice
its fast and smooth way much better then stock fw
i would reccomend anyone with a t290/t295 to install this GSI
Im into a bootloop right now after a few fails with installing Lineage on my SM-T290..
Seems like i cant install any rom? not sure how to fix this issue, can anyone point me in the right direction?
Im able to get into TWRP and download mode. but cant install any rom?
thepalek1ng said:
Hello!
So recently I was able to install LineageOS 18.1 (GSI) + GApps on my Samsung Galaxy Tab A 8 (SM-T290) tablet and wanted to share how I did it. I noticed a lack of decent step-by-step guides to modding this tablet so I figure I'd share what I learned through scouring multiple threads and through multiple headaches. Fun fact: I also got this working with LineageOS 19 (GSI), however it ran pretty poorly and Android 12 is ugly as hell so why bother anyway? ALSO interestingly enough, you'll see I wrote [SM-T290N] in the title as well. That is the model of the Kid's Edition of this phone, which happens to be the one I had. So I can confirm this process works for the Kid's Edition of this tablet as well as the original.
What You'll Need
Your tablet
A USB Cable to connect your tablet to your PC
A 4GB+ MicroSD card
A Windows PC
Some patience
Instructions
Preparing Your MicroSD Card
1. Place the LineageOS 18.1 .img file from this thread (On SourceForge, there is a section below the files about the naming conventions and how they relate to the hardware of your device and configuration of your ROM. I used the lineage-18.1-20220315-UNOFFICIAL-arm64_bvS-vndklite.img.xz image for my device. If your device is slightly different, you can use Treble Info to determine what ROM you should use. Just make sure to use the VNDKLITE rom if your device supports it.
2. Place the multidisabler .zip folder on there as well. This will preserve encryption provided by TWRP after rebooting.
3. Finally, place the MindTheGapps .zip folder on your SD card (make sure to get the correct version. In my case this was the 11.00-arm64 version).
4. Insert your MicroSD card into your device.
Unlocking the Bootloader
So the first thing you're gonna want to do is unlock your OEM bootloader on your Samsung device.
1. Go to Settings->About Phone->Software Information and look for a field called "Build Number". Tap this Five Times until you see a notification saying developer settings were enabled.
2. Go to Settings->Developer Settings and look for the setting labeled OEM Unlock and turn it on.
3. From here, you can reboot your device into Recovery Mode by holding the Vol+ and Vol- buttons when the device begins to boot again.
4. You should see a blue screen with some options. Press the Vol+ button to enter Download Mode. This is where you'll use Odin to flash the firmware you need as well as TWRP.
Flashing Firmware
So when I attempted this process I used Magendanz's Unofficial TWRP 3.6.0 as it is the only version of TWRP I found for this device. I also used Odin v3.14.1_3B Patched from this XDA thread. Magendanz's TWRP requires you to have the T290XXU3CUG4 Firmware (I used the XAR region) in order to flash TWRP to your device (you can check wether or not you already have this firmware on your phone by looking the About Phone section again). It takes a while to download though make sure you have some time.
1. Download Odin and run the program. Unzip your firmware folder and use the relevant files when selecting the BL, AP, CP, CSC fields in Odin. I didn't use the HOME_CSC just leave it blank.
2. Connect your device via USB and Flash this firmware to your device.
3. Once your device restarts, go through the setup process and then repeat the Unlocking the Bootloader instructions above in order to make sure it is unlocked again.
4. Reboot your device the same way as stated above.
Flashing TWRP
Before starting, be aware that after you flash TWRP to your device, your device will restart and attempt to open the stock system again. You're going to want to hold the Power and Vol+ buttons simultaneously. You will likely get a warning screen saying that the bootloader is unlocked and may ask you to do a factory reset, this (I believe) is fine. The key here is that once you press the Power Button to continue (as instructed on the warning screen) you'll want to immediately press and hold the Power and Vol+ keys for around 6 Seconds before letting go again (you should be seeing the Samsung Galaxy Tab A logo screen). After letting go, wait around 3-4 seconds, if nothing changes, restart the device by holding all three buttons (Power, Vol+,Vol-) and attempt the process again. It's a pain in the ass but you'll get it eventually. Just make sure not to let the device boot into the system again as that can cause problems in TWRP and you'll likely have to start the process over (from flashing the firmware).
1. Once your tablet is once again in Download Mode, open Odin again and flash the TWRP (tar.md5 file) to the AP (recovery) partition. Do not use any of the other partitions.
2. If this is successful, your phone will begin to reboot. Quickly press and hold the combination of buttons Power and Vol+ until you see the warning dialog pop up. Once you do, release all buttons and be ready to quickly press and release the Power button continue, and then immediately after press and hold the Power and Vol+ buttons again for 6 seconds. After around 6 seconds, release all buttons. Wait around 3-4 seconds and, if the screen does not change to the TWRP logo, restart the device by pressing and holding all buttons simultaneously and try this step again.
3. If you have entered into TWRP, congrats!
Installing Custom ROM + Software in TWRP
1. The first thing you'll want to do is select the Wipe->Format Data. Type 'yes' and hit enter (or swipe I forget which).
2. Next, select Install, and then select your MicroSD card as your storage device. You should see your zip files (if not switch from the install image option).
3. Install the multidisabler, do not reboot
4. Go back into Install and select Install Image (might not be the exact naming) option. Select your MicroSD card as the storage device again and install the LineageOS 18.1 rom. Do not reboot.
5. Go back into Install and select your MindTheGapps zip file and install it.
Final Steps
Once you reboot you should be able to successfully reach the setup screen for Lineage. Go through the steps of setting up your device as usual and be sure that Gapps are installed. Go ahead and re-enable developer settings and enable USB-Debugging and Root Debugging. The reason for this is that, when I first installed Gapps, Google Play Protect would keep throwing warnings at me about my device not being Google Play Certified. This means I couldn't actually use any of the google play services. If you run into the same issue, here are the steps you can take to fix it:
1. First, go into Settings->Apps and find your Google Play Services app. Clear the cache and delete the app data, then reboot your device. If you try and sign into the Google Play store and you are able to without getting any play protect warnings, then you're good you can disregard the following steps.
2. If you are still receiving these warnings, you'll want to head over to this site and follow the instructions (I'm not gonna tell you how to use ADB here). Once you submit your framework ID, reboot your device. Everything should be working fine now.
And that's it! If I am forgetting any steps please let me know, again I am writing this from memory of the process so it may be missing some minor details. I hope this helps!!!
Click to expand...
Click to collapse
bro, I have a problem, my tablet is in a bootloop and I don't know what to do, try with other custom roms but it's the same, what do I have to do so that when I install a custom room it doesn't give me that error?
Flashing the Gapps package resulted in an error: Failure to mount '/system_root' (Invalid argument)
V0latyle said:
Flashing the Gapps package resulted in an error: Failure to mount '/system_root' (Invalid argument)
Click to expand...
Click to collapse
Sorry for the bother, new to Android modding scene.
I went into the recovery menu (oem unlock on) and tried to flash TWRP as written on this guide, but I get a secure check fail : aboot on my device and fail on Odin. What do I do here?
Edit: Aparently my device is SM-T295, basically the LTE version of the same device, which is why it isn't recognising it. My bad.
Do you have any video to teach better ???
HyruleanKnight said:
Sorry for the bother, new to Android modding scene.
I went into the recovery menu (oem unlock on) and tried to flash TWRP as written on this guide, but I get a secure check fail : aboot on my device and fail on Odin. What do I do here?
Edit: Aparently my device is SM-T295, basically the LTE version of the same device, which is why it isn't recognising it. My bad.
Click to expand...
Click to collapse
Shouldn't matter, TWRP is the same for both variants.
There's two ways to get around the secure check fail problem:
After updating via Odin, make sure you immediately interrupt the boot and force reboot into Download Mode. Then, flash TWRP.
Or, after updating, allow your device to boot to Android, skip through the setup wizard (make sure you connect to the internet), and enable Developer Options. Ensure OEM Unlocking is there and grayed out. If not, leave it for a bit until it is. This disables Vaultkeeper on the bootloader. Then, reboot to download mode and flash TWRP.
In both cases, after flashing TWRP, DO NOT let the device boot into Android. Force boot into recovery, then install the Multidisabler from here.
Now to my own problem...
I don't know what I did differently (or wrong) but I cannot get LineageOS to boot correctly on my T290. I was running 18.1 before. I recently updated to CVG3 and followed the same process as I did before - flashed TWRP, then installed the LineageOS GSI to /system.
18.1 continuously bootloops without even loading LineageOS.
19.1 gets to the LineageOS splash screen, and occasionally the setup screen, but continuously reboots also.
After flashing TWRP, I'm installing the multidisabler, then wiping /system, /data, /cache.
Any idea what I'm doing wrong?
@J.Michael any thoughts? You're more familiar with Samsung than I am
V0latyle said:
Shouldn't matter, TWRP is the same for both variants.
There's two ways to get around the secure check fail problem:
After updating via Odin, make sure you immediately interrupt the boot and force reboot into Download Mode. Then, flash TWRP.
Or, after updating, allow your device to boot to Android, skip through the setup wizard (make sure you connect to the internet), and enable Developer Options. Ensure OEM Unlocking is there and grayed out. If not, leave it for a bit until it is. This disables Vaultkeeper on the bootloader. Then, reboot to download mode and flash TWRP.
In both cases, after flashing TWRP, DO NOT let the device boot into Android. Force boot into recovery, then install the Multidisabler from here.
Now to my own problem...
I don't know what I did differently (or wrong) but I cannot get LineageOS to boot correctly on my T290. I was running 18.1 before. I recently updated to CVG3 and followed the same process as I did before - flashed TWRP, then installed the LineageOS GSI to /system.
18.1 continuously bootloops without even loading LineageOS.
19.1 gets to the LineageOS splash screen, and occasionally the setup screen, but continuously reboots also.
After flashing TWRP, I'm installing the multidisabler, then wiping /system, /data, /cache.
Any idea what I'm doing wrong?
@J.Michael any thoughts? You're more familiar with Samsung than I am
Click to expand...
Click to collapse
I think I have a solution.
I see that you are installing the multidisabler after you booted TWRP and by wiping the partitions, however, what you are supposed to do is this:
After you have booted into TWRP and have swiped to allow modifications, go to Wipe> Format Data and type yes. Don't reboot, and don't wipe any other partitions.
After that, go to install and then install the multidisabler, don't reboot.
Then install the latest LineageOS gsi to the system partition, and finally install gapps, then reboot.
Make sure you are choosing the arm64_bvS_vndklite variant, otherwise it will bootloop.
Hope this helps!
Just Mike said:
I think I have a solution.
I see that you are installing the multidisabler after you booted TWRP and by wiping the partitions, however, what you are supposed to do is this:
After you have booted into TWRP and have swiped to allow modifications, go to Wipe> Format Data and type yes. Don't reboot, and don't wipe any other partitions.
After that, go to install and then install the multidisabler, don't reboot.
Then install the latest LineageOS gsi to the system partition, and finally install gapps, then reboot.
Make sure you are choosing the arm64_bvS_vndklite variant, otherwise it will bootloop.
Hope this helps!
Click to expand...
Click to collapse
Okay, so install Multidisabler AFTER wiping data. I'll try that.
I'm using the bgS image so it's already got Google apps. I didn't have any success flashing any of the Gapps packages on the vanilla images.
Is Multidisabler still necessary on Android 11 on this device, or do we just need a patched vbmeta.img?
V0latyle said:
Okay, so install Multidisabler AFTER wiping data. I'll try that.
I'm using the bgS image so it's already got Google apps. I didn't have any success flashing any of the Gapps packages on the vanilla images.
Is Multidisabler still necessary on Android 11 on this device, or do we just need a patched vbmeta.img?
Click to expand...
Click to collapse
Yes, Multidisabler is necessary, otherwise it'll bootloop. I haven't tried anything with a patched vbmeta and frankly don't want to.
The bgS version will work just fine for Android 11.
Currently running Android 13 with LineageOS 20.0, the bvS version. Gotta say it works great. MindtheGapps 13 will work, I haven't encountered any "This device is not certified" issues.
Just Mike said:
Yes, Multidisabler is necessary, otherwise it'll bootloop. I haven't tried anything with a patched vbmeta and frankly don't want to.
The bgS version will work just fine for Android 11.
Currently running Android 13 with LineageOS 20.0, the bvS version. Gotta say it works great. MindtheGapps 13 will work, I haven't encountered any "This device is not certified" issues.
Click to expand...
Click to collapse
Do I need to wipe /system or /boot or anything before installing? I did exactly as you said - rebooted to recovery (was running Samsung stock), formatted data, installed multidisabler, then installed a LineageOS 19 image to /system. It begins to boot (LineageOS animation) then reboots.
Are you using Andy Yan's builds?
V0latyle said:
Do I need to wipe /system or /boot or anything before installing? I did exactly as you said - rebooted to recovery (was running Samsung stock), formatted data, installed multidisabler, then installed a LineageOS 19 image to /system. It begins to boot (LineageOS animation) then reboots.
Are you using Andy Yan's builds?
Click to expand...
Click to collapse
Nope, you don't have to wipe any other partitions, only format data
Yes, I'm using Andy Yan's builds. I'll link the thread here: https://forum.xda-developers.com/t/gsi-13-lineageos-20-trebledroid-based.4517345/
If I may ask, which type GSI from Andy Yan did you use?
Just Mike said:
Nope, you don't have to wipe any other partitions, only format data
Yes, I'm using Andy Yan's builds. I'll link the thread here: https://forum.xda-developers.com/t/gsi-13-lineageos-20-trebledroid-based.4517345/
If I may ask, which type GSI from Andy Yan did you use?
Click to expand...
Click to collapse
Trying to get back into TWRP, just a sec...
-arm64_bgS.img
Flashing the vndklite one now to see if it works
If I can get this working, I plan on using a bgN flavor so I can just install Magisk, since I don't use SuperSU
Edit: vndklite is bootlooping too

How To Guide [Android13] Custom GSI ROM Installation - Full Process

I'm going to explain the complete process for getting up and running on a custom GSI ROM as the guides so far seem to either have only parts of information or incorrect information.
Following this process will wipe your data and alter your phone. I am not responsible for any bricked or damaged devices.
For the purpose of this thread I'm going to assume the installation of an Android 13 GSI image which you can get from the GSI images site. I like to use crDroid.
Make sure you read and understand all instructions before beginning!
1 - Unlock the bootloader
Important things to note:
One Xiaomi account can unlock one device per month. If you need to unlock multiple devices create an account for each one.
Unlocking the bootloader requires a wait time of 1 week after adding your Xiaomi account to the device before it can be unlocked
Create a Xiaomi account to use during this process here: https://account.xiaomi.com
Download the MI Unlock tool from here: https://en.miui.com/unlock/download_en.html
Procedure:
Ensure a SIM card is in with mobile data working and disable Wifi (required when associating your device with your Xiaomi account)
Enable developer mode by going into "About Phone" and tapping on the MIUI Version until it unlocks the setting
In Settings go to Additional Settings > Developer Options
Enable "OEM Unlocking" option
Select the "Add Account" option and enter your Xiaomi account details to link your device to your account
Open the Mi Unlock tool on your PC and log in with your Xiaomi account
If you get asked for a phone number when you log in the tool may get stuck as it doesn't allow you to click on the country code drop down correctly.
To avoid this, use the QR code icon on the first sign in page and from your phone go into the Xiaomi Account settings and click the scan icon on the top right
Log your account in with your phone to set the phone number there and you should be able to log in through the Mi Unlock tool next time without a problem.
Boot your phone into fastboot mode by holding Volume Down & Power buttons
Connect your phone to your PC with a USB cable
Click Unlock on the Mi Unlock tool and it should check your device and then give you a wait timer (generally 168 hours)
After that time is up (you can use your phone normally while waiting but don't mess with the Xiaomi Account settings) connect your phone in fastboot mode again and click Unlock in the Mi Unlock tool to unlock the bootloader.
2 - Install TWRP Recovery (or alternative)
Important things to note:
This phone does not have a dedicated recovery partition, the recovery is a ramdisk that resides within the boot partition
You cannot flash a recovery partition directly to the boot partition as it will then fail to boot
Make sure you use a current version of fastboot: https://provider.xiaomi.eu/tools/fastboot.zip
All commands written below are to be used without the apostrophes within a command prompt (powershell will require .\ placed in front of the command)
Download a TWRP image from here: https://sourceforge.net/projects/recovery-for-xiaomi-devices/files/vili/ Use the A13 image for Android 13 ROMs.
Procedure:
Boot your phone into fastboot mode by holding Volume Down & Power buttons
Connect your phone to your PC with a USB cable
Run command "fastboot boot twrp.img" to reboot phone into TWRP recovery
If this is the first time using TWRP it will likely be in Chinese language. Click the 2nd to last button on the right side of the menu, then the globe icon on the top right to change language.
Go to Advanced and choose Flash Current TWRP to install TWRP into the boot image
Choose Reboot to Recovery to test the image is installed
3 - Install Latest Xiaomi.eu ROM (optional)
Important things to note:
I like to use the xiaomi.eu ROM as a base before installing a GSI image as it seems to be more stable and functional afterwards
This step is optional as you can continue with the global ROM base instead
Additionally, you can stop after this step if you would prefer to use a MIUI based ROM instead of a custom GSI image
The Xiaomi.eu ROM can be downloaded from here: https://xiaomi.eu/community/threads/miui-14-stable-release.67685/
The bootloader must be unlocked and TWRP recovery installed
Procedure:
Boot your phone into TWRP recovery by holding Volume Up & Power buttons
Click the Wipe button and then Format Data. Enter yes to wipe the data partition. (This will erase all data as well as the internal storage)
Connect your phone to PC and copy the xiaomi.eu ROM onto the phone
Click the Install button on the main menu in TWRP and select the ROM zip file to install
Go to Advanced and choose Flash Current TWRP to install TWRP back into the boot image
4 - Install Custom GSI Image
Important things to note:
This phone has a Super partition which dynamically contains system, system_ext and vendor partitions
This means that you cannot flash a GSI image directly to the system partition from TWRP so it must be installed via fastbootd
fastbootd is an enhanced version of fastboot that works with the dynamic Super partition
fastbootd mode looks like TWRP but it will say "Entered fastboot mode..." on the screen
Make sure you use a current version of fastboot: https://provider.xiaomi.eu/tools/fastboot.zip
All commands written below are to be used without the apostrophes within a command prompt (powershell will require .\ placed in front of the command)
Extract vbmeta.img file from the Xiaomi.eu ROM (or global ROM if using that) and place it in same folder as fastboot
Download your custom GSI image of choice from here or other source: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
Extract the GSI image, rename it system.img and place it in the same folder as fastboot
Procedure:
Enter fastbootd mode on your phone using one of the following methods:
boot phone into fastboot mode and from your PC run command "fastboot reboot fastboot"
boot phone into TWRP and choose Reboot and then Fastboot
From your PC run the command "fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img" to disable the boot image hash checks to avoid boot loops
Run the command "fastboot erase system" to wipe the existing system image
Run the command "fastboot flash system system.img" to install your custom GSI image
NOTE: If you get an error saying "Not enough space to resize partition" run the command "fastboot delete-logical-partition product_a" and repeat the install again
5 - Install Magisk and Root
Important things to note:
Using the TWRP installation method by renaming the magisk apk to zip is not very reliable and the lastest versions require installation to be performed from within the OS
Download the lastest magisk from here: https://github.com/topjohnwu/Magisk/releases
We use a backup of the installed boot image rather than one from the xiaomi ROM as it has TWRP recovery installed in the ramdisk
Procedure:
Boot your phone into TWRP recovery
Enter the Backup menu, select the boot partition and run the backup
Copy the boot.emmc.win file out of the TWRP backup folder into the Download folder on your phone and rename it boot.img
Reboot your phone into System
Install the magisk apk file
Open magisk and click Install on the top right (in the Magisk section, not the App section)
For the Method choose Select and Patch a File then click Lets Go
Find the boot.img backup file copied to the Download folder and select it (after patching it will tell you the filename of the patched image)
Reboot your phone into TWRP recovery
Choose Install, then Install Image, select the file Magisk created above, select the Boot partition and then swipe to flash
Reboot to system and check in Magisk that it shows as installed (you may also want to reboot to recovery to ensure TWRP is still installed)
6 - Fixing Safetynet
Important things to Note:
The Shamiko magisk module is used to hide root status from apps that detect root/magisk. This can be used to make any app work that fails due to root status.
Shamiko uses the Denylist in Magisk settings to block root settings for those apps enabled but you should NOT have the denylist enforced in Magisk settings
You can find the Shamiko module here: https://github.com/LSPosed/LSPosed.github.io/releases
The default Universal Safetynet Fix can be found here however due to problems in a previous phone, I used the modded version from here (I'm not sure if that's still required for A13)
Procedure:
In Magisk settings choose to hide the magisk app to reinstall it with a different name and app id
In Magisk settings enable Zygisk and reboot phone
In Magisk settings choose Configure Denylist, show system apps from the top menu and enable Google Play Services, Google Play Store & Google Service Framework
In Magisk install the following modules: Shamiko, Universal Safetynet Fix
Install a Safetynet Checker from Google Play (SafetyNet Device Check) and verify safetynet tests pass successfully
7 - Post installation Fixes
Below are some fixes to common problems after installing a custom ROM.
Phh Settings Tweaks:
Qualcomm features - Use alternate audio policy -> fix audio in whatsapp
Qualcomm features - Disable soundvolume -> fix broken audio
Xiaomi features - Enable DT2W -> to enable double tap to wake
Misc features - Force alternative backlight scale -> fix auto brightness
IMS Features - Install IMS APK for Qualcomm -> allows SMS to work

Categories

Resources