How To Guide How to install TWRP without losing your data - Samsung Galaxy Tab A8 (2021)

Twrp install without losing data
Whats Not working:
Support for metadata encryption (which causes mounting errors in log)
MTP sometimes doesn't start until you disable and reenable in the Mount panel
Instructions:
From OEM stock firmware with root installed
Download the Official twrp app from playstore MAKE SURE YOU HAVE MAGISK/ROOT INSTALLED!.
once installed open the app and agree to the check boxes that it shows you and make sure you run with root permissions.
once that's done click on TWRP FLASH it will pop up saying grant permission click allow
then click select a file to flash.. and allow twrp to access your files and make sure you choose the right storage device that you have twrp.img
i like to place my twrp file into my tablets main directory!
once you have chosen the twrp.img you should then be able to click on the bottom button that says flash to recovery and once its done just restart your tablet and it will be working with no data loss!.
Also make sure your running firmware: X200XXU1AVG1
Downloads
TWRP APP: https://twrp.me/app/
TWRP 3.6.2:https://drive.google.com/file/d/1pjOxpAClZDfw6Sye5kEwMBKGjKNm3O5k/view?usp=sharing​
Credits to Magendanz for the twrp build!
Credits to TWRP for the app

Related

Problem with installing TWRP and rooting with Magisk

I am trying to install TWRP and root my Mi Mix. I have followed the steps below without encountering any error messages.
1. Go into fastboot
2. Flash TWRP recovery
3. Boot into recovery.
But at the end when I boot into recovery I see Mi Recovery 3.0 instead of TWRP. Am I missing anything? My device is unlocked. I am currently running MiUI 9.6.1 Global stable Android 8.0
sofene said:
I am trying to install TWRPA on my Mi Mix. I have followed the steps below without encountering any error messages.
1. Go into fastboot
2. Flash TWRP recovery
3. Boot into recovery.
But at the end when I boot into recovery I see Mi Recovery 3.0 instead of TWRP. Am I missing anything? My device is unlocked. I am currently running MiUI 9.6.1 Global stable Android 8.0
Click to expand...
Click to collapse
Never mind I solved the problem by booting from the pc. But I have a new problem. Two problems really. First of all I can't seem to get the data partition backed up. I get the error unable to mount *\data *. Secondly I cannot install magisk.zip. I cannot find the file in twrp though it is in main storage in the device. Do I need to copy it to any specific location for the twrp to use it?
Same like your firs post. But i not try instal magisk. I using SU. Now not root and not cusum recovery
sofene said:
Never mind I solved the problem by booting from the pc. But I have a new problem. Two problems really. First of all I can't seem to get the data partition backed up. I get the error unable to mount *\data *. Secondly I cannot install magisk.zip. I cannot find the file in twrp though it is in main storage in the device. Do I need to copy it to any specific location for the twrp to use it?
Click to expand...
Click to collapse
You can install it using a usb stick or via sideload.
You cant backup because the twrp's dont let you enter the password for the encryption on the device thus leaving it encrypted.
If u dont want to delete everything then use sideload for the Magisk installer, if u dont mind then u can go ahead and format data and the encryption will be gone untill you go back to system, then the device will encrypt the data again.
sexlord89 said:
You can install it using a usb stick or via sideload.
You cant backup because the twrp's dont let you enter the password for the encryption on the device thus leaving it encrypted.
If u dont want to delete everything then use sideload for the Magisk installer, if u dont mind then u can go ahead and format data and the encryption will be gone untill you go back to system, then the device will encrypt the data again.
Click to expand...
Click to collapse
I tried to install magisk using sideload enabled but still got error unable to mount storage at the end so I deleted data. And then I was able to install magisk without error. However, when I check root status with root checker it says root was not properly installed. When I went back to twrp I was presented with a screen to enter password to mount I guess the storage or partition. Does this mean that ruth has been installed even though root checker says its not.? Secondly which password is being requested because when I entered my screen unlock password it says password failed. Is it asking for the mi account password or with other password? Thanks for your assistance.
Hi, the only thing that worked for me is to install right after the rom the encryption disabler and you'll be able to use trwp. Just follow the steps in the link below. last thing, when you'll make an update you'll loose again the trwp access.
https://forum.xda-developers.com/mi-mix/development/rom-global-miui9-oreo-mi-mix-t3783869
lnt976 said:
Hi, the only thing that worked for me is to install right after the rom the encryption disabler and you'll be able to use trwp. Just follow the steps in the link below. last thing, when you'll make an update you'll loose again the trwp access.
https://forum.xda-developers.com/mi-mix/development/rom-global-miui9-oreo-mi-mix-t3783869
Click to expand...
Click to collapse
Thanks for your reply. One question, though. Would this then allow you to backup data using twrp?
sofene said:
Thanks for your reply. One question, though. Would this then allow you to backup data using twrp?
Click to expand...
Click to collapse
Yes you can make a backup, but in case of update you'll loose the access on your files in trwp.
A couple things :
1. You can't install magisk if your data partition is encrypted, because magisk needs to put the file in the data partition. so you need to disable the encrypt first, and then you can install magisk.
2. If your data partition is encrypted, don't bother to backup from twrp. Boot to system, connect to pc, and backup using regular way (copy and paste files).
3. Backup your data before you do any encrypt/decrypt process.

Any magisk module that can make sd card as adopted storage on Android 10?

Did google remove the option of adopted storage? I don't see it on my SM-T295. I rooted it so I was wondering if there is a Magisk Module that can make sd card act like adopted storage.
Thank you.
Can you tell how did you root your tab please.
Dharmtej said:
Can you tell how did you root your tab please.
Click to expand...
Click to collapse
I have tried many methods dude
Before Installing Magisk​
Installing Magisk WILL trip KNOX
Installing Magisk for the first time REQUIRES a full data wipe (this is NOT counting the data wipe when unlocking bootloader). Backup your data before continue.
Download Odin (only runs on Windows) that supports your device.
Unlocking Bootloader​Unlocking the bootloader on modern Samsung devices have some caveats. The newly introduced VaultKeeper service will make the bootloader reject any unofficial partitions in some circumstances.
Allow bootloader unlocking in Developer options → OEM unlocking
Reboot to download mode: power off your device and press the download mode key combo for your device
Long press volume up to unlock the bootloader. This will wipe your data and automatically reboot.
Go through the initial setup. Skip through all the steps since data will be wiped again in later steps. Connect the device to Internet during the setup.
Enable developer options, and confirm that the OEM unlocking option exists and is grayed out. This means the VaultKeeper service has unleashed the bootloader.
Your bootloader now accepts unofficial images in download mode
Instructions​
Use either samfirm.js, Frija, or Samloader to download the latest firmware zip of your device directly from Samsung servers.
Unzip the firmware and copy the AP tar file to your device. It is normally named as AP_[device_model_sw_ver].tar.md5
Press the Install button in the Magisk card
If your device does NOT have boot ramdisk, check the “Recovery Mode” option
Choose “Select and Patch a File” in method, and select the AP tar file
Start the installation, and copy the patched tar file to your PC using ADB:
adb pull /sdcard/Download/magisk_patched_[random_strings].tar
DO NOT USE MTP as it is known to corrupt large files.
Reboot to download mode. Open Odin on your PC, and flash magisk_patched.tar as AP, together with BL, CP, and CSC (NOT HOME_CSC because we want to wipe data) from the original firmware.
Your device should reboot automatically once Odin finished flashing. Agree to do a factory reset if asked.
If your device does NOT have boot ramdisk, reboot to recovery now to enable Magisk (reason stated in Magisk in Recovery).
Install the Magisk app you’ve already downloaded and launch the app. It should show a dialog asking for additional setup.
Let the app do its job and automatically reboot the device. Voila!
I have tried this one
I have tried flashing unofficial twrp
unofficial twrp 3.4.0 Root Samsung SM-T295 - unofficial twrp
download twrp 3.4.0 root Samsung SM-T295, user who own Samsung SM-T295 can root it by following the below instructions
unofficialtwrp.com
Can you help me please ?

Installing, Updating, Backup and Restore Guide for OP6/6T

This is a bit late but why not. THIS IS A COMPILATION OF ALL THE OS METHODS YOU NEED FOR THE OP6/6T.
ENJOY my guide
DISCLAIMER:
*I am not responsible for bricked devices, damage to your device*
Sorry for a long list of methods, some work for others and some don't. But I recommend to pick a method and stick to it. Maybe read the part at the top as some have notes about mine or someone else's experience/recommendation. Don't skip steps and follow each step.
If stuck, just ask and I or anyone else will try and help
I am here to post methods for anyone who is interested/need help. I have tested these myself and helped others who may be struggling
Download
The guide has loads of files/ zips/ tools to use/flash/install. But no worries as everything can be downloaded and there are links AT THE BOTTOM OF THIS THREAD (NOT COMMENTS) to where to download:
SDK Platform Tools (Fastboot tools) from Developer Android
TWRP from mauronofrio
Magisk from topjohnwu
Gapps (Google Apps) from NikGapps. I recommend omni for ROMs that don't include Gapps.
Fastboot ROM for OP6 + OP6T from mauronofrio
MSMDownload tools for OP6 + OP6T from Some_Random_Username
IMPORTANT NOTES!
YOU REQUIRE Platform Tools (Fastboot Tools) IN ORDER TO USE THE METHODS IN THIS GUIDE AS TWRP NEEDS TO BE INSTALLED!
YOU NEED TO HAVE A UNLOCKED BOOTLOADER AS WELL!
For GAPPS, u can use the same or a updated version of the package. But has to be the same type u used to install it like (stock, full, Omni, basic, etc). ONLY FLASH/INSTALL IF the RESTORE SCRIPT DIDN'T SHOW UP during a DIRTY FLASH/UPDATE AND ONLY FLASH AFTER REBOOTING TO RECOVERY AFTER FLASHING/INSTALLING A OS/BUILD ZIP FILE!
How to get Platform Tools
These tools are used to install TWRP, to unlock the bootloader of your device and is needed to use the METHODS in this guide.
Download the platform tools.zip of your software platform (Mac, Windows, Linux)
Extract the platform-tools.zip
To use it go into your platform-tools folder
Press shift + right-click and choose command prompt or PowerShell
Connect your device when it's in fastboot mode and done
How to install TWRP
Sadly this Guide is for Windows, but other platforms like Mac or Linux can be found online.
YOU CAN USE THIS METHOD TO INSTALL A NEWER VERSION OF TWRP TOO
You need to have downloaded Platform Tools which the link is attached below.
Transfer the TWRP.img file into the platform-tools folder
Now transfer TWRP.zip into your device's internal storage. (connect -> allow file transfer -> drag and drop files)
If you want root download and transfer magisk.apk and the link is supplied below. Also, RENAME from .apk to .zip
Now we must boot into fastboot mode. (Either do it with the advanced reboot in developer options or power off device -> boot recovery Vol - + power -> boot to bootloader or power off device -> press Vol Up + Vol down + power)
Now connect your device to a Windows device
Press shift + right-click. Choose command prompt or PowerShell
Enter "fastboot devices" and your device should be displayed if it's connected
Type "fastboot boot twrp" file name (do twrp + press tab) and press enter
Then you should be booted into TWRP
Enter the password and swipe to allow modifications
Press install and find your TWRP.zip file
Swipe to confirm Flash
If you want root do this
Press the back arrow and find your magisk.zip
Swipe to confirm Flash
Reboot to the system and done
Otherwise, just reboot to system. Up to u
Installing a Custom ROM
Install Custom ROM on OP6T from OOS
Make sure u have BACKED UP your device and have the latest OOS installed in both slots. If u do, go to Method 3.
If u have finalize.zip, go to Method 2.
Method 1
If u don't have OOS installed in both slots or finalize.zip, use this method.
Transfer OOS.zip file, TWRP.zip, Build.zip (Custom ROM zip file) into internal storage.
Boot to Bootloader
Boot TWRP
Flash OOS + TWRP
reboot recovery
Flash OOS + TWRP
Reboot recovery
Flash Build.zip (Custom ROM zip file)
Flash TWRP
If the ROM doesn't have GApps included do this
Reboot to recovery
Flash Gapps if not included
Format data
Reboot to system
Otherwise, just Format data -> reboot to system. Up to u
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system. Up to u
Method 2
If u have finalize.zip, do this method. Using finalize is way quicker as there's less flashing and rebooting.
Transfer OOS.zip file, finalize.zip, TWRP.zip, Build.zip (Custom ROM zip file) into internal storage.
Boot to Bootloader
Boot to TWRP
Flash OOS + finalize
Boot to Bootloader
Boot to TWRP
Flash Build.zip (Custom ROM zip file)
Flash TWRP
If the ROM doesn't have GApps included do this
Reboot to recovery
Flash Gapps if not included
Format data
Reboot to system
Otherwise, just Format data -> reboot to system. Up to u
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system. Up to u
Method 3
Once you have installed OOS in both slots do this part.
Transfer TWRP.zip, Build.zip (Custom ROM zip file) into internal storage.
Boot to Bootloader
Boot to TWRP
Flash Build.zip (Custom ROM zip file)
Flash TWRP
If the ROM doesn't have GApps included do this
Reboot to recovery
Flash Gapps if not included
Format data
Reboot to system
Otherwise, just Format data -> reboot to system. Up to u
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system. Up to u
Installing Custom Rom not from OOS
You can use finalize method or just flash OOS + TWRP way. The finalize way is there for some who like less flashing and rebooting.
Using the methods in Install Custom ROM on OP6T from OOS
Using the old way, use Method 1
Using finalize.zip, use Method 2
Remember to factory reset (wipe, but no need to wipe internal storage)
Backing Up OOS and Custom ROM
Make sure u have installed the latest TWRP version from mauronofrio
You should use TitaniumBackup or Migrate to back up your apps and contacts.
Also, have a copy of your Internal Storage folders if u have important files.
TWRP Backup backs up your OS like Apps, settings and set up, but not internal storage.
NEVER BACKUP SYSTEM AND VENDOR! ONLY SYSTEM.IMG or VENDOR.IMG IF YOU HAVE TO!
Restoring it makes going back way easier like you have never left
Or you can go manually and try and restore everything, but why do that when you got TWRP?
I do both ways of backing up
Backing up OOS
Boot TWRP recovery
Choose Backup
Choose boot, data. YOU DO NOT NEED TO BACKUP System.img and Vendor.img!
Swipe to backup
Once done, either boot to system or mount
Transfer the whole TWRP folder onto a storage device
Done
Backing up a Custom ROM
Boot TWRP recovery
Choose Backup
Choose boot, data, system.img, vendor.img
Swipe to backup
Once done, either boot to system or mount
Transfer the whole TWRP folder onto a storage device
Done
Restoring OOS and Custom ROM
Restoring OOS TWRP Backup
To restore OOS use either fastboot ROM or MSM. Fastboot is the fastest and easiest way if u have a TWRP backup which there's a method to how to make one in this guide. BUT if you are restoring to go back to stock OOS then use MSM
I use Fastboot ROM restore for that too as we are restoring our data anyways and also for switching/installing a custom ROM. Much easier in my experience.
DOWNLOAD FULL ZIP OF OOS version of your TWRP backup otherwise you could risk doing the whole restore method again OR setup from SCRATCH! IF you aren't restoring a TWRP backup, I recommend either TRANSFER or DOWNLOAD via WiFi or oxygen updater, a UPDATED version of OOS AFTER doing either fastboot ROM or MSM restore methods. As they restore a old version of OOS!
Restoring using Fastboot ROM
Download fastboot ROM of your choice using the link in the Download Link section.
Extract/ un-zip
Boot your device into fastboot mode (Either do it with the advanced reboot in developer options or power off device -> boot recovery Vol - + power -> boot to bootloader or power off device -> press Vol Up + Vol down + power)
Click flash-all.bat
Restoring using MSM Download Tool
Download latest MSM version of your choice using the link in the Download Link section.
Extract/ un-zip
Click on MSM tool .exe file
Turn off device
HOLD BOTH volume buttons
Connect your phone
Wait for your device to be connected and it should show as green
Click verify to check and press start
Wait till phone reboots
The setup device and u can carrying on restoring your device if u don't want a unlock bootloader or return to what your device was like before.
Go into developer options
Allow OEM unlocking
Reboot to bootloader
Enter "fastboot devices" to check your device is connected
Enter "fastboot oem unlock"
Swipe for yes
Then it will reboot again
continue to the next method
For both fastboot and MSM
Once booted into system, set it up and update to OOS version of your TWRP backup.
Download the full zip using the link in the Download Link section.
Transfer the OOS .zip to internal storage.
Go into settings -> system update -> Update via local upgrade -> find zip file and press install
Do this twice to make sure you have installed that version of OOS in both slots
Boot to bootloader
Boot TWRP
Install TWRP
Reboot recovery
Transfer whole TWRP Folder into internal storage
Restore only boot and data
Swipe to restore
If you have backed up your internal storage folders do this
Reboot to recovery
Transfer all your internal storage folders
Reboot to system and done
Otherwise, just reboot to system. U can update OOS as well if it's outdated. The method is below to update OOS with ROOT. Up to u
RESTORING TWRP BACKUP HAS ISSUES ON THESE ROMs
CrDroid (Method 1 + 2 don't work). Method 3 works (install Gapps if the ROM doesn't have it!)
Restoring a Custom ROM TWRP backup 1
I tried using this method, but it didn't work for me.
You can use this method to switch ROMs too
Boot TWRP Recovery
Flash OOS + Finalize
Boot to bootloader, boot TWRP
Flash TWRP
Reboot Recovery
Transfer twrp backup
Restore System.img, Vendor.img and boot
Boot to system and setup system
Reboot to recovery
Restore data
Reboot system. Done
I had an issue with this method where rebooting system it was from fresh and my data didn't restore. If this happened to you, then do method 2 (Restoring a Custom ROM TWRP Backup 2)
Restoring a Custom ROM TWRP Backup 2
The first method didn't work for me. But this method did
Restore fresh like you're going back to OOS.
Choose one method. Fastboot or MSM method.
I prefer the fastboot method.
Download fastboot ROM using the link in the Download Link section.
Extract/ un-zip
Boot your device into fastboot mode (Either do it with the advanced reboot in developer options or power off device -> boot recovery Vol - + power -> boot to bootloader or power off device -> press Vol Up + Vol down + power)
Click flash-all.bat
Once booted into system, set it up briefly and DO NOT RESTORE ANYTHING.
Boot to bootloader
Boot TWRP
Install TWRP
Reboot recovery
Transfer whole TWRP Folder into internal storage
Restore everything (System.img, vendor.img, boot.img and data)
Swipe to restore. If data couldn't restore then boot system, setup system, boot TWRP and restore data.
Reboot system. The first reboot might go dodgy and it did for me.
Reboot system and transfer all your internal storage stuff
done
If this did not work still. Then do the 3rd method...
Restoring a Custom ROM TWRP backup 3
If the previous 2 methods has failed for you. Then try this.
Restore fresh like you're going back to OOS.
Choose one method. Fastboot or MSM method.
I prefer the fastboot method.
Download fastboot ROM using the link in the Download Link section.
Extract/ un-zip
Boot your device into fastboot mode (Either do it with the advanced reboot in developer options or power off device -> boot recovery Vol - + power -> boot to bootloader or power off device -> press Vol Up + Vol down + power)
Click flash-all.bat
Once booted into system, set it up and update to OOS version of your TWRP backup.
Download the full zip using the link in the Download Link section.
Transfer the OOS .zip to internal storage.
Go into settings -> system update -> Update via local upgrade -> find zip file and press install
Do this twice to make sure you have installed that version of OOS in both slots
Transfer TWRP.zip, Build.zip (Custom ROM zip file) into internal storage.
Boot to bootloader
Boot TWRP
Install TWRP
Reboot to Recovery
Flash Build.zip (Custom ROM zip file)
Flash TWRP
If the ROM doesn't have GApps included do this
Reboot to recovery
Flash Gapps if not included
Format data
Otherwise, just Format data -> reboot to recovery. Up to u
Reboot Recovery
Transfer twrp backup
Restore data
Reboot system. Done
If it still fails, repeat steps 1 to 15. But restore everything and you should be back on your custom ROM like you never left.
Updating OOS and Custom ROM
Update OOS with Root (Magisk)
Always do a TWRP backup before updating your OS in case
Download the full zip file of the latest OOS, transfer the zip file to internal storage NOT IN ANY FOLDER
Download and transfer twrp.zip file to internal storage
Go into settings, system update, update via local upgrade and choose the file
Wait till the installation has finished. If failed TRY AGAIN!
DO NOT REBOOT!
Go into Magisk Manager, modules
Find the twrp zip file and install TWRP
DO NOT REBOOT!
Go into Magisk Home
Press install
Press install via inactive slot
Reboot system and done
You will reboot into the next slot
You don’t have to repeat the installation to install the latest OOS in the other slot. But you should and I use this method many times and has never let me down.
Updating OOS without root
Go to System Update -> find the update install and reboot.
Or download the zip -> transfer to internal storage -> update via local upgrade -> reboot and done
Update a Custom ROM
Method 1
Always do a TWRP backup before updating your OS in case
Use this method just to update the ROM.
Boot recovery
Flash new version + twrp
Reboot recovery
Flash new version + twrp
If the ROM doesn't have GApps included,
The restore script should show up during the installation of the new ROM.zip
BUT if the restore script DIDN'T pop up do this
Reboot to recovery
Flash Gapps if not included
Reboot to system
Otherwise, reboot to system. Up to u
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system. Up to u
Method 2
This method uses finalize.zip
Boot recovery
Flash new version + finalize + twrp
If the ROM doesn't have GApps included,
The restore script should show up during the installation of the new ROM.zip
BUT if the restore script DIDN'T pop up do this
Reboot to recovery
Flash Gapps if not included
Reboot to system
Otherwise, reboot to system. Up to u
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system. Up to u
Updating vendor
Use Method 1 and 2 for ROMs with Gapps. Use Method 3 for ROMs with no Gapps included.
Method 1
If u haven’t updated your Custom ROM and your Vendor… You can use this method to update both or just the vendor.
Boot recovery
Flash OOS + twrp
Reboot recovery
Flash OOS + twrp
Reboot recovery
Flash Custom ROM + twrp
Reboot recovery
Flash Custom ROM + twrp
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system
Method 2
This method uses finalize.zip
Boot recovery
Flash OOS + finalize + twrp
Reboot recovery
Flash Custom ROM + finalize + twrp
Otherwise, reboot to system. Up to u
If you want root do this
Reboot to recovery
Flash Magisk
Reboot to system and done
Otherwise, just reboot to system
Method 3
This method is for ROMs with no Gapps included
You can use this method as well for updating to a vendor that has a NEWER ANDROID version like from OOS 10 to OOS 11 vendor.
Boot recovery
Flash OOS + Custom ROM + twrp
Reboot recovery
Flash OOS + Custom ROM + twrp
If u flashed GApps, the restore script should show up during the installation of the ROM.zip
If the GApps script didn't show up do this
Otherwise, skip step 3
Flash Magisk if u want root, otherwise skip step 2
Reboot to recovery
Flash Magisk
Flash Gapps
Reboot to system and done
Download Links:
SDK Platform Tools (Fastboot Tools) Here
OOS versions for OP6 (under Signed Flashable zips) Here
OOS versions for OP6T (under Signed Flashable zips) Here
TWRP for OP6 Here
TWRP for OP6T Here
Magisk Here
NikGapps Here
Stock Fastboot ROM for OP6 Here
Stock Fastboot ROM for OP6T Here
MSMDownloadTool for OP6 Here
MSMDownloadTool for OP6T Here
TitanumBackup App Here
Migrate App Here
Credits:
@mauronofrio For his amazing work on the TWRP recovery and Stock Fastboot ROMs for OP6/6T
@topjohnwu For his work on Magisk
@Nikgapps For their work on creating Gapps
@Some_Random_Username For his Collection of MSMDownloadTool for OP6/6T
@OPTeam For the collection of OOS zips for OP6/6T
@dreamwhite For the method (Method 3) of updating the vendor which works wonders for ROMs with no GApps included
First
Hey Guys,
Need a some expert advice please.
Long story short. I need to replace my OP 6T McLaren's battery as I have serious degradation in battery capacity (73% Serious Loss), meaning the battery is no longer charging to 3700mAh, max charging atm is around 2600mAh, which it drains very quickly. FYI Anything above 80% is the limit for average performance, >90% is best. You can use the OP Diagnostic App 1.0.0.9 to determine your own status. Does not work on all OP devices above 6 btw. Maybe other versions work. Anyway, will be getting OP to change the battery (no real local guys I can trust tbh, all Sammy & Apple guys...) and they want me to Factory Reset the device (complete wipe including internal storage (backed up already to PC)) before sending the device to the OP Repair Center for the obvious reasons of Privacy & Security.
On my device, I have a suite of apps that are no longer available to install with APK specially Signed, but won't be able to re-install (long story & can discuss in a PM more if there is an interest to help on this). These APK will not work any other way, I've tried! This being said, I know that TWRP Nandroids work well & have been doing these backups for yrs and have restored backups with these apps installed and it works! But I have not had to restore any as of late and TWRP Backup has somewhat changed in regards to the partition selections available. See TWRP Options pic below.
When OP returns the device to me, it will mostly likely be on the latest release of 10.3.11 (Hopefully).
Here is the current setup and runs perfectly!
OOS 10.3.11
TWRP: twrp-3.5.2_9-0-fajita
Magisk 23
The last Nandroid done today (No PW for good measure, but secured locally offline), I selected all partitions. Is this the best way to insure I get my full device backup restored?
{
"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"
}
I'm guessing that I will have to, Unlock the Bootloader, reinstall TWRP same version the Nandroid was created with in order to restore that backup.
Looking forward to hearing from you guys to make the best decision before proceed with the factory reset.
Thanking you all in advance for your time & assistance!
Cheers!
plepew said:
Hey Guys,
Need a some expert advice please.
Long story short. I need to replace my OP 6T McLaren's battery as I have serious degradation in battery capacity (73% Serious Loss), meaning the battery is no longer charging to 3700mAh, max charging atm is around 2600mAh, which it drains very quickly. FYI Anything above 80% is the limit for average performance, >90% is best. You can use the OP Diagnostic App 1.0.0.9 to determine your own status. Does not work on all OP devices above 6 btw. Maybe other versions work. Anyway, will be getting OP to change the battery (no real local guys I can trust tbh, all Sammy & Apple guys...) and they want me to Factory Reset the device (complete wipe including internal storage (backed up already to PC)) before sending the device to the OP Repair Center for the obvious reasons of Privacy & Security.
On my device, I have a suite of apps that are no longer available to install with APK specially Signed, but won't be able to re-install (long story & can discuss in a PM more if there is an interest to help on this). These APK will not work any other way, I've tried! This being said, I know that TWRP Nandroids work well & have been doing these backups for yrs and have restored backups with these apps installed and it works! But I have not had to restore any as of late and TWRP Backup has somewhat changed in regards to the partition selections available. See TWRP Options pic below.
When OP returns the device to me, it will mostly likely be on the latest release of 10.3.11 (Hopefully).
Here is the current setup and runs perfectly!
OOS 10.3.11
TWRP: twrp-3.5.2_9-0-fajita
Magisk 23
The last Nandroid done today (No PW for good measure, but secured locally offline), I selected all partitions. Is this the best way to insure I get my full device backup restored?
View attachment 5319753
I'm guessing that I will have to, Unlock the Bootloader, reinstall TWRP same version the Nandroid was created with in order to restore that backup.
Looking forward to hearing from you guys to make the best decision before proceed with the factory reset.
Thanking you all in advance for your time & assistance!
Cheers!
Click to expand...
Click to collapse
Idk if u have read Mauronofrio's XDA thread on TWRP backups. BUT NEVER BACKUP OR RESTORE SYSTEM OR VENDOR! From my guide, you don't need to backup vendor.img or system.img or anything else that's not Boot or Data FOR OOS. Make sure you have everything like a copy of everything folder/file in your internal storage before u wipe it.
BUT because you're going to wipe your device. U should have a copy of everything in case but don't backup system or vendor as they're useless and will crash your system if u restore those!
After you've got your device from repair, follow my method to restore OOS TWRP backup on your device and YOU'LL only NEED TO RESTORE BOOT + DATA. Once you have booted back to your system, everything should be there like you never left, but transfer your internal storage stuff as some apps store files in your internal storage. Once that is done, that should be it and it would be like you've never left
If the TWRP backup restore doesn't work let me know, but from my experience with going back to OOS via my TWRP backup I only backed up and restored boot + data for OOS. Custom ROMs are different but isn't the case for you
Extreme_Ninja2099 said:
Idk if u have read Mauronofrio's XDA thread on TWRP backups. BUT NEVER BACKUP OR RESTORE SYSTEM OR VENDOR! From my guide, you don't need to backup vendor.img or system.img or anything else that's not Boot or Data FOR OOS. Make sure you have everything like a copy of everything folder/file in your internal storage before u wipe it.
BUT because you're going to wipe your device. U should have a copy of everything in case but don't backup system or vendor as they're useless and will crash your system if u restore those!
After you've got your device from repair, follow my method to restore OOS TWRP backup on your device and YOU'LL only NEED TO RESTORE BOOT + DATA. Once you have booted back to your system, everything should be there like you never left, but transfer your internal storage stuff as some apps store files in your internal storage. Once that is done, that should be it and it would be like you've never left
If the TWRP backup restore doesn't work let me know, but from my experience with going back to OOS via my TWRP backup I only backed up and restored boot + data for OOS. Custom ROMs are different but isn't the case for you
Click to expand...
Click to collapse
Wow, thanks for the quick reply!
I have not read Mauronofrio thread and will do!
I completely missed the system & vendor piece in your instructions....my bad!
So just to confirm, my backup that I have done with all checked off is good, but only restore Boot & Data with an exact duplicate of the current Internal Storage...right?
Going forward, when creating the Backup, just select Boot & Data and I'm good to go? Or select all Except: System Image(only) & Vendor options (both)?
Also, just so I can understand a bit better, "System" is the actual OOS? Meaning, if I restore Boot & Data on any OOS, all my apps and data will be as I never left, or we should always restore on the OOS that was current at the moment of the Backup (which I have always done in the past).
PS. I may just do the backup again, just to make sure SYSTEM & VENDOR are not there for good measure!
plepew said:
Wow, thanks for the quick reply!
I have not read Mauronofrio thread and will do!
I completely missed the system & vendor piece in your instructions....my bad!
So just to confirm, my backup that I have done with all checked off is good, but only restore Boot & Data with an exact duplicate of the current Internal Storage...right?
Going forward, when creating the Backup, just select Boot & Data and I'm good to go? Or select all Except: System Image(only) & Vendor options (both)?
Also, just so I can understand a bit better, "System" is the actual OOS? Meaning, if I restore Boot & Data on any OOS, all my apps and data will be as I never left, or we should always restore on the OOS that was current at the moment of the Backup (which I have always done in the past).
PS. I may just do the backup again, just to make sure SYSTEM & VENDOR are not there for good measure!
Click to expand...
Click to collapse
First off, I already posted everything you need in my last comment and that's what I usually do. Everything should be there and not like you need to pay or reply to get the extra stuff that you may need. No point in replying asking for more as I'll just be repeating myself over and over.
Just choose boot & data for TWRP backups for OOS specifically going forward and after you got your device from repair. System, vendor doesn't work in my experience and will crash your system. Only backup the .img variant which was stated by the dev (Mauronofrio) for TWRP for OP6/6T devices. Only backup system.img and vendor.img if u need to backup system+vendor, but YOU don't have to for OOS and I said this previously.
JUST DO A BACKUP OF EVERYTHING OTHER THAN SYSTEM AND VENDOR. YOU SHOULD ONLY BACKUP SYSTEM.IMG AND VENDOR.IMG NEVER SYSTEM OR VENDOR.
They never work and will increase the size of your backup and will take even longer to transfer to your storage device from your phone.
YES, to your new question. You should update/ be on the same OOS version as your TWRP backup before u restore data + boot. Restore OOS via fastboot or msm and update to get to the same version of OOS as your TWRP backup. YOU should only do this if your phone is in the wrong version of OOS as your backup after you've got it back from REPAIR.
ALWAYS BE ON THE SAME VERSION OF OOS AS YOUR TWRP BACKUP BEFORE YOU RESTORE YOUR TWRP BACKUP OF OOS!
Maybe take a copy of your wifi passwords, take a google backup in settings, take a copy of sms/call logs and contacts. Other stuff that you may not have stored just in case the TWRP backup fails, but it shouldn't. Good luck
This should be it and there isn't anything else that you'll need
Extreme_Ninja2099 said:
First off, I already posted everything you need in my last comment and that's what I usually do. Everything should be there and not like you need to pay or reply to get the extra stuff that you may need. No point in replying asking for more as I'll just be repeating myself over and over.
Just choose boot & data for TWRP backups for OOS specifically going forward and after you got your device from repair. System, vendor doesn't work in my experience and will crash your system. Only backup the .img variant which was stated by the dev (Mauronofrio) for TWRP for OP6/6T devices. Only backup system.img and vendor.img if u need to backup system+vendor, but YOU don't have to for OOS and I said this previously.
JUST DO A BACKUP OF EVERYTHING OTHER THAN SYSTEM AND VENDOR. YOU SHOULD ONLY BACKUP SYSTEM.IMG AND VENDOR.IMG NEVER SYSTEM OR VENDOR.
They never work and will increase the size of your backup and will take even longer to transfer to your storage device from your phone.
YES, to your new question. You should update/ be on the same OOS version as your TWRP backup before u restore data + boot. Restore OOS via fastboot or msm and update to get to the same version of OOS as your TWRP backup. YOU should only do this if your phone is in the wrong version of OOS as your backup after you've got it back from REPAIR.
ALWAYS BE ON THE SAME VERSION OF OOS AS YOUR TWRP BACKUP BEFORE YOU RESTORE YOUR TWRP BACKUP OF OOS!
Maybe take a copy of your wifi passwords, take a google backup in settings, take a copy of sms/call logs and contacts. Other stuff that you may not have stored just in case the TWRP backup fails, but it shouldn't. Good luck
This should be it and there isn't anything else that you'll need
Click to expand...
Click to collapse
Thank you!!
Hey guys, for some reason I ended up on "Unmodified System Partitions", must have tapped the screen a few times in error while handling the phone I guess.
What should I do?
Unable to go back to TWRP main menu without selecting an option.
I am rooted, on stock OOS and not doing customs ROM at this time...
What should I do?
Select "Keep Read Only"? or Swipe to "Allow Modifications"?
thanking you guys in advance for you help & guidance!
plepew said:
Hey guys, for some reason I ended up on "Unmodified System Partitions", must have tapped the screen a few times in error while handling the phone I guess.
What should I do?
Unable to go back to TWRP main menu without selecting an option.
I am rooted, on stock OOS and not doing customs ROM at this time...
What should I do?
Select "Keep Read Only"? or Swipe to "Allow Modifications"?
View attachment 5320971
thanking you guys in advance for you help & guidance!
Click to expand...
Click to collapse
Swipe to allow modifications. But it seems that your internal storage corrupted. Not sure what you did and how you got into this situation.
After you swiped to allow modifications... If the internal storage files are a messed up, try to switch slots and reboot recovery
Extreme_Ninja2099 said:
Swipe to allow modifications. But it seems that your internal storage corrupted. Not sure what you did and how you got into this situation.
After you swiped to allow modifications... If the internal storage files are a messed up, try to switch slots and reboot recovery
Click to expand...
Click to collapse
I swiped and yeah, the IS was messed up in File Managfer(TWRP).
Selected Reboot then Selected the Slot I remembered I was on : "A"
Rebooted & Boom all good!
Thank you for the help once again! You rock!!
plepew said:
I swiped and yeah, the IS was messed up in File Managfer(TWRP).
Selected Reboot then Selected the Slot I remembered I was on : "A"
Rebooted & Boom all good!
Thank you for the help once again! You rock!!
Click to expand...
Click to collapse
Cool and at least that was a easy fix
Sorry, I'm a total noob, hopefully this is an easy question to answer. Is there any way that I can tell what version of OOS my TWRP Backup contains? I can't remember what version my phone was running when I did the TWRP backup and don't want to mess it up after I restore the phone from MSM. Thanks in advance for your help!
Sorry, I'm a total noob, hopefully this is an easy question to answer. Is there any way that I can tell what version of OOS my TWRP Backup contains? I can't remember what version my phone was running when I did the TWRP backup and don't want to mess it up after I restore the phone from MSM. Thanks in advance for your help!
jas84701 said:
Sorry, I'm a total noob, hopefully this is an easy question to answer. Is there any way that I can tell what version of OOS my TWRP Backup contains? I can't remember what version my phone was running when I did the TWRP backup and don't want to mess it up after I restore the phone from MSM. Thanks in advance for your help!
Click to expand...
Click to collapse
Well u posted this twice which isn't necessary and people will try and reply. But I'm not sure if there is a way to know and as long as u copied the whole TWRP folder for that backup, u should be fine restoring it with a newer version of TWRP. If it really matters to you, then maybe try and find the latest TWRP on the date you did the backup? I think just using a newer TWRP version should be fine
Should I use the same Gapps package I flashed during clean installing when updating custom rom?
Waynenolan92 said:
Should I use the same Gapps package I flashed during clean installing when updating custom rom?
Click to expand...
Click to collapse
U don't have to use the same gapps package. Using a updated one would be better. But, u only have to for ROMs that don't include gapps (vanilla builds) AND the Restore script doesn't show up during installation. Opengapps doesn't have that script but nikgapps does. Using dirty flash/updating a ROM should show the restore script and if it doesn't then just reboot to recovery and flash the updated or same gapps package. This can also be the same for updating the base/vendor (use method 3 in that section of the guide). I hope this helps
Extreme_Ninja2099 said:
U don't have to use the same gapps package. Using a updated one would be better. But, u only have to for ROMs that don't include gapps (vanilla builds) AND the Restore script doesn't show up during installation. Opengapps doesn't have that script but nikgapps does. Using dirty flash/updating a ROM should show the restore script and if it doesn't then just reboot to recovery and flash the updated or same gapps package. This can also be the same for updating the base/vendor (use method 3 in that section of the guide). I hope this help
Click to expand...
Click to collapse
Thanks for your replay)))it's my first using vanilla rom(without Gapps), so I flashed nikigapps Omni package, and my question is: should I always use the same package, or I can go with core package for example?
Waynenolan92 said:
Thanks for your replay)))it's my first using vanilla rom(without Gapps), so I flashed nikigapps Omni package, and my question is: should I always use the same package, or I can go with core package for example?
Click to expand...
Click to collapse
U can... But it doesn't really matter as a updated package works fine and u only need to use it if the nikgapps restore script doesn't show up when updating the ROM or vendor/base (OOS underneath)
I want to CHANGE custom ROMs (havoc to Lineage OS a11 to a12) I have taken TWRP back up of boot+data+system.img+ vendor.img. once I flash the new a12 Lineage plus Nikapps core plus magisk. What steps to restore data? any response is appreciated in advance. Thank you.

[ROM][SM-T500] Samsung Galaxy Tab A7 10.4 (2020) - LineageOS 18.1

Update: March 24 2022: This ROM has been retired and a new one based on LOS 19.1 (and TWRP based on Android 11) have taken its place. New thread here: https://forum.xda-developers.com/t/...4-2020-lineageos-19-1-and-twrp-3-6-1.4421365/
---
Update 9:46am EST July 15 2021: new builds of TWRP and LineageOS with TWRP touch fixed and LOS w/ space for Gapps is now live.
WARNING: USE AT YOUR OWN RISK.
I have successfully ported TWRP and Lineage OS 18.1 to the Samsung Galaxy Tab A7 10.4 (2020), aka SM-T500. This is my first time porting TWRP or LOS, so there may be issues unknown about at this time. Thus far, the only known issue is that the touchscreen in TWRP does not work. This can be worked around by using a USB mouse and/or accessing the device via ADB.
Here are the steps to follow:
Update your device to the latest stock ROM (as of this writing) either using the built-in system updater or via Odin. You want the build that ends with "3BUF3".
Unlock device bootloader using instructions from other threads. This will wipe your device.
Boot into download mode and flash "vbmeta_disabled_R.tar" via Odin in the "Userdata" slot to disable verified boot. This will wipe your device again.
Boot device back into download mode and flash TWRP via Odin in the "AP" slot. If you boot up into the stock ROM rather than booting directly back into download mode then go through the initial setup process of the stock ROM and enable developer tools and ensure OEM Unlocking is still enabled (VaultKeeper can possibly undo OEM Unlocking if you get to the ROM but don't go into Developer Tools and view OEM Unlocking is enabled, so make sure to do this).
Boot device into TWRP (recovery mode) and format (not wipe) your data partition. Then reboot back into TWRP.
Push LineageOS (super.new.ext4.img) to device. Ideally push it to an SD card formatted with ExFat or EXT2/3/4 (FAT/FAT16/FAT32/VFAT won't work due to file-size limitations).
Install LineageOS image to "Super" partition. Make sure to select "Install from Image" in order to show .img files in the install selector screen.
(Optional) Push NikGapps Omni to your device and install the zip. Make sure you include a "nikgapps.config" file in your "/tmp" folder that is configured to install to "system" rather than "product" or "default".
Reboot to system. You should now be in LOS with Gapps.
(Optional, but recommended): Install Magisk via TWRP
(Optional, but recommended): Run fix script to fix brightness slider not working and to make Magisk work. If you didn't install Magisk but only want the brightness fix, just enter "n" when prompted in the script. To run the script:
NOTE: Script has .txt file extension to allow hosting on AFH. Remove that so it's just .sh to match the instructions below.
Download and push to device when booted into TWRP
adb push sm-t500_fixes.sh /tmp
Enter an adb shell
adb shell
Change directories and set permissions
cd /tmp
chmod +x /tmp/sm-t500_fixes.sh
Run script
/tmp/sm-t500_fixes.sh
Tips:
If you are not seeing all of your storage space in the OS on the internal flash, boot to TWRP and format data.
Flash TWRP via "AP" slot and flash VBMeta_Disabler via "Userdata" slot in Odin.
Flash LineageOS as an Image, not as a Zip.
For Gapps, use the latest NikGapps for ARM64 and Android 11/R.
For Gapps, make sure you install to the System partition and not Product. To do this you need to slightly modify a nikgapps.config file. Instructions on that can be found on the NikGapps site.
Downloads:
LineageOS 18.1 20210615 Beta 2: https://www.androidfilehost.com/?fid=14943124697586369438
TWRP 3.5.2 Beta 3: https://www.androidfilehost.com/?fid=14943124697586369439
vbmeta_disabled_R: https://www.androidfilehost.com/?fid=14943124697586369440
Fixes for brightness and Magisk (sm-t500_fixes.sh): https://www.androidfilehost.com/?fid=14943124697586369521
Known Issues:
OS-encrypted storage (Internal Data) not able to be decrypted in TWRP.
Brightness controls don't work: Fixed via "sm-t500_fixes.sh script.
TWRP touch screen doesn't work (use USB keyboard or adb). Should be fixed with TWRP Beta 3.
TWRP formatting external SD card may hardbrick device. Do not do this! Fixed with TWRP Beta 2.
Source (device tree for TWRP from my Github): https://github.com/agreenbhm/android_device_samsung_gta4lwifi
Source (kernel sources from Samsung): https://opensource.samsung.com/uploadSearch?searchValue=Sm-t500#
agreenbhm said:
I have successfully ported TWRP and Lineage OS 18.1 to the Samsung Galaxy Tab A7 10.4 (2020), aka SM-T500. This is my first time porting TWRP or LOS, so there may be issues unknown about at this time. Thus far, the only known issue is that the touchscreen in TWRP does not work. This can be worked around by using a USB mouse and/or accessing the device via ADB.
Here are the rough steps to follow:
Unlock device bootloader using instructions from other threads.
Patch stock ROM (AP) using Magisk, then flash rooted ROM. Will likely need to wipe device after this.
Boot into rooted ROM and ensure "OEM Unlocking" is still enabled in "Developer Tools".
Boot back into download mode and flash "vbmeta_disabled_R.tar" to disable verified boot.
Boot device back into rooted stock ROM to ensure things are still functional (may require a device wipe at this step).
Boot device into download mode and use ODIN to flash TWRP recovery.tar file via "AP" slot.
Boot device into TWRP to verify functionality (hold Vol-Up + Power during boot).
Access TWRP via adb using "adb shell" or with USB mouse (touch functionality currently not working).
Format data partition on device.
Via ADB shell: twrp format data
Via USB mouse: Wipe -> Advanced -> Format Data
Boot device into download mode.
Via ADB shell: twrp reboot download
Via USB mouse: Reboot -> Download
Flash LineageOS tar file via ODIN using the "AP" slot.
If device boots into TWRP after flashing LineageOS, use USB mouse to select: Reboot -> System
Device should boot and stall for ~1m at the Samsung logo screen with red text below, then should go blank and then display LineageOS boot image.
Downloads:
LineageOS 18.1 20210615 with TWRP 3.5.2: https://mega.nz/file/vMVglThZ#TepIHvdEypezq3z4S_4Lln7FRFVfC7CUjVGq3ByFb6U
TWRP 3.5.2: https://mega.nz/file/GYU1yCCQ#JsthI8BYNtfB08Pzt1eeXta2Lb1zCkUI185Zm88dEW4
vbmeta_disabled_R: https://mega.nz/file/iMFx3CQI#8cP4mPoRaQNwDATqt0vKD8wxqRWSTz1EL79U0fNpW8M
Click to expand...
Click to collapse
Great news!! But I think you need to post it in the ROMs, Kernels, Recover thread.
awesome. Will try after work. Also I think you posted in the wrong section.
Which slot to flash the vbmeta?
wizzdome said:
Which slot to flash the vbmeta?
Click to expand...
Click to collapse
AP
Thanks,
After flashing the vbmeta it booted into recovery automatically after what looked like a bootloop in progress, so I wiped with factory reset and then it rebooted fine. (still not sure exactly what the vbmeta does I was hoping it would make it so i didnt get that stupid pop up asking me to hit power button to continue booting due to it having the patched os) anyhow booted fine and twrp installed as you stated without touch screen but mouse with otg works fine. (great job so far) On to LOS... I think I should have checked oem lock before flashing LOS as when I installed I get stuck at boot screen that says oem lock is on... must have been from my factory reset... (facepalm)
Nope... Still sticking on boot with the following showing on the screen...
RPMB fuse not set
RPMB Provisioned
Current BInary: Custom (0x30f)
FRP Lock : OFF
OEM Lock : ON (U) {this was off verified before flash}
KG Status : Checking
Waranty Void : 0x1 (0xE02)
Quallcomm Secureboot : Enable
RP SWREV : B3 (1,1,1,3,1,1) k3 s3
secure download : enable
grdm status : normal (d0000501)
did : 041ce2d22dba
this is displayed in the corner on the bootscreen and looks like it belongs on the download screen, anyhow booting into twrp from this point works however factory reset fails with unable to mount key(something and key(something else) i figure i will let it sit a while as I know sometimes it just takes first boot a while to go through however it doesnt seem to be the problem. Have you had a positive install of the LOS? I am wondering if I had maybe gotten a bad copy of the file. When i go to install I get a pass in odin so not quite sure where to go from here other than back to the factory image any help to get this going would be great... I took on this task cause i needed someting to take my mind off the severely crappy week I have had... so looking forward to anything you can share here...
Actually, userdata is the slot I always use. It might work in both though.
Something to mention: there is not enough space on the /system partition to flash Gapps. I created a build that supports it (with a resized /system partition) but I couldn't get it to flash via Odin. The only way I got it to work was by flashing it via TWRP as an img file. I will be posting that soon. Unfortunately that will be the end of development for now as I hard-bricked the device and need to wait for a repair or replacement. Should be back developing in 2 weeks.
Nevermind what I said here.
jayzarry84 said:
Anyone get this to work? I just flashed the TWRP part but have not been able to get into TWRP
Click to expand...
Click to collapse
Get adb access in the OS and then run "adb reboot recovery"
agreenbhm said:
Get adb access in the OS and then run "adb reboot recovery"
Click to expand...
Click to collapse
question. I don't have an OTG cable and TWRP keeps booting. I've tried rebbot, rebbot bootloader, reboot system. any advice?
jayzarry84 said:
question. I don't have an OTG cable and TWRP keeps booting. I've tried rebbot, rebbot bootloader, reboot system. any advice?
Click to expand...
Click to collapse
You may need to get an otg cable for a USB mouse and choose "reboot system" from the gui. Alternatively, look at the /dev/block/by-name/misc partition and try blanking that out with dd. That has worked sometimes.
jayzarry84 said:
question. I don't have an OTG cable and TWRP keeps booting. I've tried rebbot, rebbot bootloader, reboot system. any advice?
Click to expand...
Click to collapse
Also, from an adb shell, try "twrp reboot". Supposedly that should boot to system, but I feel like in testing I got mixed results. According to the TWRP documentation though that should be the answer.
agreenbhm said:
Also, from an adb shell, try "twrp reboot". Supposedly that should boot to system, but I feel like in testing I got mixed results. According to the TWRP documentation though that should be the answer.
Click to expand...
Click to collapse
Not working. I'll wait for my otg cable to come in
jayzarry84 said:
Not working. I'll wait for my otg cable to come in
Click to expand...
Click to collapse
I was able to use adb to run the TWRP Format Data command and it rebooted the tablet and now LOS has booted up. I think I'm good!
Looking forward to see how this develops
Rom is fast and snappy. Brightness control does not work. I haven’t played too much because of work but that’s what I’ve found so far
Can a mod move this to the rom release section?
agreenbhm said:
Something to mention: there is not enough space on the /system partition to flash Gapps. I created a build that supports it (with a resized /system partition) but I couldn't get it to flash via Odin. The only way I got it to work was by flashing it via TWRP as an img file. I will be posting that soon. Unfortunately that will be the end of development for now as I hard-bricked the device and need to wait for a repair or replacement. Should be back developing in 2 weeks.
Click to expand...
Click to collapse
I've not been able to flash this yet but I know that the latest TWRP versions have a way to fix the system partition to accept gapps. /Wipe/Advanced check system then resize. Sometimes you have to do it more than once if it is a large gapps.
lewmur said:
I've not been able to flash this yet but I know that the latest TWRP versions have a way to fix the system partition to accept gapps. /Wipe/Advanced check system then resize. Sometimes you have to do it more than once if it is a large gapps.
Click to expand...
Click to collapse
I will look into that, but I'm not optimistic it will work. This device does not separately present the system partition, rather it uses a super partition which contains system, vendor, product, and odm. TWRP only shows me the super partition for working with. I was able to resize the system partition by expanding the Lineage image and file system on my pc to match the original stock system partition, then rebuilt the super image with the other partitions it needs.

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