In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Xiaomi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .
Agree

TechLab

[Tips & Guides] Common TWRP errors

2022-06-30 02:56:57
5084 2
Hey MI Fans,
One of the most important things required for having a custom OS in your phone is custom recovery. Custom recovery enables you to root your phone and flash various kinds of OSes and modules otherwise unavailable in stock recovery. Perhaps most prominent custom recovery is TWRP which stands for Team Win Recovery Project. Almost everyone who has a custom OS in their phone uses or at least knows about TWRP.

You are required to have TWRP access before you can go ahead and root your smartphone. And for flashing the TWRP recovery image, you need to follow the guide properly to avoid errors. However, if you are getting errors, then fortunately in this post, you can get the solution to that issue.

Before we head-on with the common problems and solution withTWRP recovery, let us know the advantages of TWRP recovery:

  • You can flash Custom ROM with TWRP Recovery.
  • You can flash modding zip files to customize your phone.
  • You can easily root and unroot using TWRP Recovery flashable zip Magisk.
  • You can always take FULL NANDROID Backup in case of any modding or flashing.
  • You can get easy access to restore the Nandroid Backup.
  • You can flash the image file using TWRP Recovery.
  • You can remove all bloatware using TWRP Recovery.
  • You can underclock and overclock your processor.
  • You can wipe Cache and Data.

Some of the most common errors while flashing TWRP are asfollows:

Fix the “Cannot Load twrp.img” Error

Installing TWRP on your device requires you to use a Fastboot command to overwrite the current recovery system. However, there will be times where the Fastboot command is unable to take up the TWRP image file or an error pops up stating that there is no such file in the directory. If you are facing this issue then, follow the below steps to solve it:

  • Instead of typing the patch of the folder where you have downloaded the TWRP image file, simply drag and drop the twrp.img file into the command prompt.

Fix TWRP LineageOS OTA Update Modem Version Error


There will be times when you try to update the latest version of the LineageOS, the built-in updater pops up with an error that it was unable to install it. The error shows that it has an incompatible modem version or Updater Process Ended with ERROR: 7. This guide is basically for OnePlus devices. And if you are also suffering from this issue, then follow the below steps to fix it:

You need a few things before you can go ahead with the method.

  • You need to install the proper ADB and Fastboot tools in your PC.
  • Then you need to enable the Developer Mode on your device.
  • Once you have enabled the Developer Mode on your device then you also need to enable USB Debugging options under it.

Now once you are ready with the pre-requisites then, follow the below steps:

  • Download the latest version of OxygenOS for your device.
  • Extract the content in a folder on your PC.
  • Move the NON-HLOS.bin file to your ADB/Fastboot folder
  • Boot the smartphone into Fastboot mode.
  • Connect your device to the PC via a USB cable and grant USB debugging permission if prompted.
  • Open a command prompt on the same folder where you have extracted the ADB and Fastboot tools.
  • Execute the following command:
         fastboot flash modem NON-HLOS.bin
  • Hit the Enter key.
  • Wait for the Fastboot command to show Okay message.

Fix Error 70 While Installing Gapps


Error 70 means that there is insufficient storage space available in the system partition. This is one of the most common errors you will come across while installing Gapps via TWRP recovery. One complicated solution for this issue is to the reformatting system partition and increasing its size. However, this procedure is pretty tricky and might get your phone bricked. But there is an alternative solution that is very easy and for that follow the below guide.

  • Head to the website opengapps.org
  • Select the appropriate Platform/Architecture of your system. i.e.
         – ARM: ARMv7 or armeabi.
         – ARM64: AArch64 or arm64.
         – x86: x86 or x86abi.
  • Now select the Android version of your current OS.
  • Then you need to select the Pico Variant which includes Google Play Services and other Google apps. It is small in size and would be good enough to run all the Google services. Moreover, you can install other Google apps later.

Fix: Unsupported Baseband Error While Flashing ROM


The flasher checks the updater-script before the installation of the baseband version and returns the error. And there is a simple fix if you wish to overcome the issue. For fixing this, follow the belowsteps:

  • Copy the ROM.zip to your computer.
  • Extract the contents of the zip file.
  • Now head to META-INF\com\android and open the updater-script file using NotePad application.
  • You need to remove the first two lines from the script and save the file.
  • Once the script has been saved compress the ROM as a ZIP and copy it back to your phone.
  • Reboot your device into TWRP recovery.
  • You need to perform quick wipe and then flash the ROM.

Fix PIN Errors After Restoring from TWRP Android Backups

  

If the system that you are restoring to, requires a different PIN then the system that you are running might show some issues. And if your device is stuck with two PINs or passwords then follow the below guide to solving it:

  • Go to SettingsScreen Lock.
  • Tap on PIN or Password to set a new pin or password.
However, if you are not able to unlock the device at all then:

  • Boot back to the TWRP’s recovery.
  • It will ask you to enter the PIN or Password.
  • Enter the most recent working password or PIN that you remember.
  • In case you have never set a pin then type in the default password.
  • You will be taken to the home screen of TWRP Recovery.
  • Now head to Advanced  File Manager  /data/system folder.
  • Scroll down for finding two files with ‘.key‘ extension.
  • Delete all the files with word containing locksettings.
  • If you have deleted all the .key and locksettings containing files, reboot your device.
  • Youcwill be asked to install SuperSU, do NOT install if prompted.
  • You will be prompted to enter a PIN or password. Enter the most recent one.

Fix TWRP “unable to mount data” Error and InternalStorage showing 0MB



  • Go to Settings  Security  Screen Lock.
  • Change screen lock method to either Pass or Pin and enter a new one.
  • Reboot your Android device to the TWRP recovery.
  • Enter the password or PIN if prompted.
  • TWRP will now decrypt device’s internal storage.
  • Reboot again into TWRP Recovery again.
  • Then head to Wipe Advanced Wipe Data Repair or Change File System Repair File System and check whether this fixes the issue.
  • If not then go to Change File SystemExt2swipe to confirm.
  • Head back to TWRP menu Mount menu and check now if your partitions can be mounted now.
  • Even now if the problem is not solved then you need to repair internal partitions i.e. wipe your internal storage.

Fix Magisk Install Error 1 in TWRP Recovery


When trying to flash incomplete zip file you will be treated with the Error 1 on TWRP recovery. If you are facing this issue as well then follow the below guide:

  • Put the “boot.img” file in your MicroSD card.
  • Reboot your device in Recovery mode.
  • Tap on Install.
  • Now tap on Install Image option which will be located at the bottom right corner.
  • Select the boot.img.
  • Now select the Boot Partition then swipe to confirm.

Fix Zip File is Corrupt Error in TWRP


If you are having this issue, then it cannot be solved by wiping.

  • You     will be required to re-download the file.
  • Now     check the checksum to see if anything is corrupted or not during the     transfer.
  • Download     the right Gapps compatible to the architecture of your mobile.
  • If     every zip file is shown as corrupt then your storage is faulty.
  • Use     the Repair function to solve this issue.

Fix Status Error 7 in TWRP Recovery


Error 7 arises in TWRP recovery when ROM’s updater script file does not contain the exact model of your phone or the phone model is available but the script is created for another device model. To fix thisissue:

  • Firstly,     copy the ROM file to your PC.
  • Extract     the content of the zip file.
  • After     extracting the content, you need to find META-INF folder.
  • Go     the META-INF/com/google/android line.
  • In     the last directory you will find two files called “update-binary”     and “updater-script“. For this issue, we need the updater-script.
  • Now     you need to rename “updater-script” to “updater-script.txt”     and open it in any text editor.
  • Remove     the line starting with “assert” to the next semi-colon.
  • You     can find it in the first few lines or in the beginning of the text file.
  • Save     the modified file.
  • Then     rename “updater-script.txt” back to “updater-script“.
  • Update     all files that you have extracted.
  • Copy     the modified zip-file on your phone;
  • Reboot     your Android device to recovery mode and try to update it again.
  • Status     Error 7 should be gone.

These are solutions to some of the common TWRP recovery errors. I hope you will find them useful. Thank you!

2022-06-30 02:56:57
Favorites RateRate

Wizard Bunny

Suter | from app

#1

Thanks for the interesting article.
2022-06-30 06:25:49
Interesting stuff, for Sure!
2022-06-30 20:47:46
ηємєѕιѕ
please sign in to reply.
Sign In Sign Up

ApexKS

Rookie Bunny

  • Followers

    1

  • Threads

    3

  • Replies

    0

  • Points

    15

Read moreGet new

Xiaomi Comm APP

Stay updated on Mi Products and MIUI

Copyright©2010-2021 Xiaomi.com, All Rights Reserved
Quick Reply To Top Return to the list