Modified TWRP recovery has become the standard for enthusiasts working with Android TV set-top boxes based on Amlogic, Rockchip or Allwinner processors. By installing this tool, the user gains full control over the device's file system, the ability to install custom firmware and, most importantly, create full system backups. Backup (backup) is a critical step before any experiments with the software.

Unlike standard Google tools, which often save only the settings and list of applications; TWRP creates a bitwise copy of all memory sections. This means that in the event of an unsuccessful flashing or system failure, you can return the set-top box to working condition in a matter of minutes. The process of creating a backup requires care and adherence to a certain sequence of actions to guarantee the integrity of the data.

Before you begin manipulation, you need to make sure that your device really supports working with custom recovery. Not all manufacturers open the bootloader, and on some models with the new eMMC or UFS memory type, specific errors may occur when reading partitions. Let's look in detail at how to properly prepare the device and save the system image.

Preparing the device and selecting media

The first step before starting the data saving procedure is to select the correct location to store the image file. The internal memory of Android set-top boxes usually has a limited capacity, which may not be enough for a complete copy of all partitions, especially if the system is already full of applications and cache. Therefore, the use of an external drive is a mandatory requirement for a safe operation.

You will need a USB flash drive or an external hard drive with a file system that the recovery understands. The best choice would be to format the media in FAT32 or ext4. The file system NTFS sometimes causes permissions issues in the Linux environment that TWRP is based on, which can result in a write error. Make sure that the drive is in good condition and has sufficient free space - it is recommended to have a reserve of at least 2-3 GB over the size of the occupied partitions.

Connect the drive to the USB 2.0 or 3.0 port on your set-top box before turning on the device. In some cases, the order of connection matters: if the recovery does not see the flash drive when booting, try reconnecting it to another port or using a USB hub with its own power supply, since standard ports on TV boxes often do not provide enough current to operate external drives.

โš ๏ธ Attention: Before starting work, make sure that there is no important data on the external drive, since during the preparation process or if you accidentally select the formatting option, all information on The flash drive can be permanently deleted.
๐Ÿ’ก

Use flash drives with a capacity of 16 GB or more with high write speed (class 10 and above). Slow memory cards can cause a timeout of the recording process and damage to the backup file.

Launch TWRP and navigate the menu

After the media is connected, you need to boot into recovery mode. On most Android consoles, this is done by holding down a special button (often a reset button or a hidden button inside the socket) while connecting the power cable. An alternative method is to use the command Reset or hidden button inside the socket AV) when connecting the power cable. An alternative method is to use the command adb reboot recovery via a computer if USB debugging is enabled on the set-top box.

Interface Team Win Recovery Project is optimized for touch control, but on TV boxes that do not have a touchscreen, navigation is carried out using the remote control, mouse or keyboard. The volume or direction buttons on the remote usually act as a cursor mover, and the OK or Enter button confirms the selection. If the cursor is not displayed, try connecting a regular computer mouse - this will greatly simplify interaction with the menu.

In the main menu you will see several large buttons responsible for the main functions: Install, Wipe, Backup, Restore, Mount and Settings. We are interested in the button Backup. When you click on it, a screen for selecting partitions for backup will open. The interface may differ slightly depending on the version of TWRP and the design theme, but the logic of operation remains the same for all assemblies.

What to do if the screen is black when loading into TWRP?

If after loading into recovery the screen remains black, but the set-top box responds to buttons (a sound is heard or the indicator is on), try connecting it to the TV via another HDMI port or using adapter Sometimes display drivers in recovery cannot determine the correct resolution automatically.

Selecting partitions for backup

The partition selection screen displays a list of all available partitions of the device. To create a full backup that can restore the system after a failure, you need to select a specific set of partitions. By default, TWRP often offers to select only Boot and Data, but for TV set-top boxes this may not be enough.

The critical partitions are Boot (contains the kernel and ramdisk), System (operating system files) and Data (user applications and settings). It is also recommended to include the Vendorsection if it is present separately, since drivers and device-specific libraries are stored there. Skipping a partition Vendor may result in Wi-Fi, Bluetooth, or sound output stopping working after restoration.

  • ๐Ÿ“‚ Boot โ€”contains the boot image and the Linux kernel, required to start the system.
  • ๐Ÿ’พ System โ€”the main partition with Android files, takes up the largest amount of memory.
  • ๐Ÿ”ง Vendor โ€” proprietary drivers and configurations of specific hardware of the set-top box.
  • ๐Ÿ“ Data โ€”all applications, accounts and personal settings you have installed.
  • ๐Ÿ›ก๏ธ EFS / Persist โ€”sections with unique device identifiers (IMEI, MAC addresses), their loss can make the device unsuitable for the network.

Some sections, such as Cache or Dalvik, you can not include them in the backup, since they are generated anew by the system during the first boot. Excluding them will significantly reduce the time it takes to create a copy and save space on external media. However, the section Persist is best always saved separately, since its damage is difficult to fix using software methods.

Section Volume (approximately) Importance Copying time
Boot 32 - 64 MB Critical ~10 sec
System 1.5 - 3 GB Critical 2-5 min
Vendor 200 - 500 MB High 30-60 sec
Data Depends on the user High 5-15 min
๐Ÿ“Š Which partition do you most often forget to include in a backup?
Boot
System
Vendor
Data
EFS/Persist

Setting compression and encryption parameters

After selecting partitions, you need to pay attention to the settings for the copying process, which are located at the bottom of the screen or in the additional slider menu. The key parameter here is the type of data compression. TWRP offers several algorithms, among which the most popular are None (without compression), Gzip, Bzip2 and Zstd.

The use of compression can significantly reduce the size of the final backup file, which is especially important when working with a partition System. The algorithm Zstd is a modern standard that provides an excellent balance between speed and compression ratio. If your set-top box is equipped with a weak processor, choosing too aggressive compression (for example, Bzip2) can lead to the process of creating a copy taking an unreasonably long time and causing the device to overheat.

It is also worth considering the option of encrypting the backup. If you plan to store your backup file in the cloud or on storage media that others can access, including a password is a smart move. However, remember that when restoring the system, you will have to enter this password in the recovery interface, where text entry may be difficult due to the lack of a full keyboard.

โš ๏ธ Attention: When enabling encryption, be sure to write down the password on paper. Losing the password from an encrypted backup makes the file absolutely useless; it is impossible to recover data without it, even by TWRP developers.
๐Ÿ’ก

The optimal choice for most users is Zstd compression without encryption if the backup is stored on personal secure media. This saves space and speeds up the process.

The process of creating and saving a copy

When all the parameters are configured, a slider will appear at the bottom of the screen with the inscription Swipe to Backup (Swipe to create a backup). To start the process, you need to drag the slider to the right. On devices without a touchscreen, this action is emulated by pressing the confirmation button or selecting the corresponding menu item if the interface is adapted for button control.

After launch, a log of performed operations will be displayed on the screen. You will see the current section that is currently being copied, a progress bar and the recording speed. The process can take anywhere from a few minutes to half an hour depending on the amount of data and the speed of your USB drive. At this time, it is not recommended to remove the flash drive or turn off the power of the set-top box.

Upon completion of the process, TWRP will display a message indicating that the backup was successfully created. The files will be saved on external media in a folder /TWRP/BACKUPS/, inside which a subfolder with a unique device identifier (serial number or ID) is created. Inside this folder there will be a directory with the date and time of creation of the copy, containing image files with the extension .win or .img.

โ˜‘๏ธ Checklist for a successful backup

Done: 0 / 5

Restoring the system from backup copy

Creating a backup makes sense only if you know how to restore it. The Restore procedure mirrors the process of creating a copy. To do this, you need to boot into the mode again TWRP, go to the menu Restore and select the desired file from the list, which is automatically pulled from the connected USB drive.

Before starting the recovery, the system may warn that existing data will be overwritten. This is expected behavior, since the backup returns the system to the state in which it was at the time the copy was created. If you restore only the partition Boot after a failed kernel installation, your personal data on the partition Data will remain intact.

In some cases, after restoring the firmware on TV set-top boxes, you may need to clear the Dalvik/ART cache. This can be done through the menu Wipe -> Advanced Wipe, selecting only the item Dalvik / ART Cache. After this, you should reboot the system (Reboot -> System). The first boot after recovery may take longer than usual, as the system will optimize applications.

โš ๏ธ Attention: Never try to restore a backup created on another device, even if the set-top box models seem the same to you. Differences in motherboard revisions or memory versions can lead to a โ€œbrickedโ€ device.

Frequent problems and their solutions

Despite the streamlined process, users may encounter a number of common errors. One of the most common problems is partition mounting error or USB drive writing error. This is often due to the fact that the file system of the flash drive is damaged or is not supported by the recovery kernel. In this case, formatting the drive directly using TWRP via the menu helps (be careful, this will delete all data on the flash drive!). Wipe -> Format Data (be careful, this will delete all data on the flash drive!).

Another common situation is a โ€œhangingโ€ process at a certain percentage, for example, 99% when copying the Data partition. This may indicate the presence of bad sectors on the internal memory of the set-top box or that some process in the system is blocking access to files. In such cases, it is recommended to completely clear the cache and close all running applications before creating a backup.

If TWRP does not see the internal drive or displays the error "Unable to mount storage", the problem may lie in the drivers or recovery version. Try updating TWRP to the latest version available for your specific processor model. It is also worth checking whether data encryption is enabled on the device itself, since some older versions of recovery cannot work with encrypted partitions of Android 10 and higher without entering the unlock password.

Why does backup take up more space than free memory?

TWRP copies used data blocks, but the file system structure and service data may take up additional space place. In addition, if lossless compression is selected, some types of files (already compressed videos or archives) will not decrease in size, and section headers will add their own volume.

Is it possible to make a backup without a computer, only from a flash drive?

Yes, this is the standard scenario for TWRP on TV set-top boxes. A computer is only needed for the initial installation of the recovery itself. The process of creating and restoring a copy occurs completely autonomously inside the device if there is a connected USB drive.

What should you do if, after restoration, the set-top box goes into an endless reboot (bootloop)?

Try performing a data reset (Factory Reset) through the Wipe menu in TWRP after restoration. If this does not help, the backup may have been created with an incompatible version of the system or may have been damaged. Try restoring only the Boot and Vendor partitions, leaving Data clean.

How to transfer a backup from a flash drive to a computer for reliable storage?

Simply remove the flash drive after TWRP is completed and connect it to the PC. Copy the entire folder with the date from the directory TWRP/BACKUPS to your computerโ€™s hard drive. To restore in the future, simply return this folder back to the flash drive in the same directory structure.

Does the Android OTA update affect existing backups?

No, backup files on external media remain unchanged. However, after updating the system, the old backup will contain an outdated version of the software. It is recommended to create a new backup copy after each major system update or installation of important security patches.

Is it possible to restore a backup to a set-top box with a different amount of memory?

It is highly not recommended. Restoring an image of the Data partition from a 16 GB device to a device with 8 GB memory will result in a write error and possible file system corruption. The partition sizes must be the same or the target partition must be larger than the source one.