Need to create backup current android state via custom TWRP Recovery or restoration, but still poorly understand this? This article will show you how to do it!

Create a backup through TWRP recovery

Before you do backup make sure you have it installed:

Also make sure you have enough free space on the internal memory or external (memory card), if available and there is a slot.

Creating a Backup

Now after you have entered the custom TWRP recovery, go to " Section BACKUP". Depending on the device, certain sections will be available to you, by marking which you can create backups:

  • Boot- the kernel (kernel, zImage) of the Android OS, responsible for loading and operating the system
  • System- system, firmware
  • Datainstalled applications, updates and personalization
  • Cache- cache (various temporary files)
  • Recovery - Recovery partition
  • .android_secure - applications installed on the memory card
  • Efs - IMEI on Samsung devices
  • modem - modem (communication)

In order to create a full-fledged backup TWRP, with which you can always restore to the desired state, you need to mark the sections:

  1. Boot
  2. System
  3. Data
  4. Cache

If you have a memory card, you can also make a backup on it, for this there will be a button at the bottom of the screen Storage: ……….»

And so, to make a backup, go to « Backup» -> « Select sections» -> if you need to change the memory for saving or leave it as it is

In order to start creating a backup, you need to pull the slider located at the bottom from left to right

after which the process will begin, which will continue for quite a long time.

At the end, if the copy was successfully created, you will be notified " Backup Complete«.

More on creating a backup in TWRP

You can activate additional options when creating a backup in TWRP:

  • Enable compression
  • Skip MD5 generation during backup
  • Disable Free Space Check

Enable compression- enabling compression (archiving / compression), which will save the backup copy (reducing the backup up to 2x - 3x times).

Skip MD5 generation during backup- when creating a backup, a check of the integrity of the backup is automatically created, which will allow in the future if it is “broken” not to break the device ( on a note: If you rename the backup, it will no longer pass the test).

Disable Free Space Check- if the partition is not completely filled, that is, there is free space, then if you check this item, TWRP Recovery will cut it off and allow you to create a smaller backup (additional compression). Use this option at your own risk.

Restore Android from backup using TWRP recovery

If “something went wrong” and your Android won’t boot or doesn’t work well and you have a backup you created, then it will help restore your device to working order.

Recovery from backup

Go to section "Restore" and select available backups

Mark which partitions to restore and pull the slider at the bottom to start the process
When finished, you will be prompted to reboot into normal mode android workReboot System.

Do you still have questions? Write them in the comments, tell us what you did or vice versa!

That's all! More useful articles and instructions, see the section. Stay with the site, it will be even more interesting!

If you want to back up apps or games on Android, it's best to use the program, but if you need to backup the entire system, it's easier to install the universal ROM Manager app. It has many functions that will come in handy when flashing the device.

With ROM Manager, you can also flash your smartphone or tablet. How to do this is described in detail on our website. For the application to work, you need root permissions, which can be obtained using programs, or.

So, install ROM Manager from Google Play, open the application and follow the instructions in the instructions:

1. First of all, you need to install ClockWorkMod (modified Recovery). To do this, select the "Recovery Setup" item in the main menu of the program. It may also be called "Install ClockWorkMod".

3. In the menu that appears, click on "Install ClockWorkMod".

4. ROM Manager will require root access, after which the ClockWorkMod installation process will begin.

5. Now you can proceed to create an Android backup. To do this, in the main menu of the program, select "Save current ROM".

6. In the window that appears, you can change the name of the backup. At the end, click OK.

7. After that, your device will go into ClockWorkMod Recovery and the backup will begin. This process It may take a long time, so don't worry.

8. If you want to restore the system, open "Backups", select the saved backup and click "Restore" in the next window.

All in all, ROM Manager is a truly versatile application. With it, you can install CWM, create a backup copy of the system and restore it if necessary, and also flash your android smartphone or tablet.

About five years ago, smartphones were exclusively for people who needed their functionality. Today, thanks to the development of the Android device market, almost everyone has these gadgets. The platform is quite well customizable and develops rapidly - every year new major versions are released, and during the year, manufacturers pamper users several times with updates to existing versions of the OS. Because of this trend, it is very important to know and be able to do firmware backup so that in case of an unsuccessful update or in any other situation, you can make a quick rollback to a working system and at the same time not lose your data and information.
In principle, there are quite a few ways to make a backup, but the most common and convenient are install custom recovery with this feature. The most popular recovery alternatives are CWM (ClockworkMod recovery) and TWRP (Team Win Recovery Project). CWM- one of the very first such projects - it is quite minimalistic and is controlled exclusively by "iron buttons" - volume buttons and the off key. It has only the most necessary functionality (including the backup function). TWRP a more advanced project. He has touch control, as well as quite a few features, the most useful of which is perhaps the built-in file manager, which will allow you to copy your data from internal memory to a flash drive if the phone refuses to boot.
Let's take a quick look at each of these two recovery alternatives, see also how to backup with them, and show you another way that allows you to do it right from a working system. We will also consider options for backing up only certain data (SMS, MMS, etc.)

CWM


ClockworkMod recovery is a modified unofficial recovery, which is produced for almost any more or less popular phone model. Installation is possible both instead of the standard recovery, and in parallel with it. With it, you can install unofficial firmware, create backups, reset user data and format partitions. You can also create separate partitions on a memory card, etc.

To make a backup file system your Android device you need to go to CWM recovery (on different phones this procedure may vary slightly). Then you need to use the volume buttons to go to backup and restore and select either Backup (full backup of the entire system) or advanced backup- this will allow you to select the partitions you want to keep (most often these are data and boot), which will save you time and space on the flash drive.

Video about installing ClockworkMod recovery

TWRP


TeamWin recovery is also a modified unofficial recovery, which is available for most models Android devices. It allows you to do much more with the device than the standard recovery and than CWM, but is less common than the latter. TWRP will allow its users to:

  • install unofficial and official firmware;
  • install fixes and additions;
  • supports connection in ADB mode;
  • create backup copies of both the complete firmware and its individual parts;
  • format partitions and create them.


To make a backup using TeamWin recovery, you need to go into it, go to the Backup item and make a snapshot of the system, and you can choose which system partitions you need to save.

Video about installing eamWin recovery

Restoring from a backup

To begin with, for greater safety, you need to transfer the folder with the saved firmware to HDD computer, write to optical disc, upload to the cloud, etc. In this case, even if you lose the flash drive, you will always have the opportunity to roll back the system to the old state. Then you will need to enter the recovery again and select the Restore item, and then mark the partitions that you want to restore (in the case of CWM, you will need to go to Advanced restore). After waiting for the operation to complete, restart the device.

Another way to backup a partition

If you are not satisfied with the previous methods, then there is one more, much less commonly used, but with its help you will definitely save all the links and file rights. To implement it, you need a phone with root rights , which has a terminal emulator installed.
First, open a terminal emulator and type:
su
After that, a window for confirming root rights should appear (if you have not confirmed them before. Then type:
dd if=/dev/block/"block number" of=/sdcard/system.img bs=4096
Where instead of "block number" you must write the number of the section you want to save. To restore the partition, the resulting file will need to be flashed via fastboot, like a regular img image.

Saving SMS, MMS and other content

If you would like to move to new system, then you only need to recover old messages and possibly some files. The files will remain on your memory card, so you should not worry about this, but text messages will have to be saved manually. AT Google Play there are many free programs, to save them - you just have to choose the most convenient one.
It is also worth noting that Android has well-developed functions for saving application data and restoring applications themselves, therefore, you will not need to worry about this operation - the system will do everything for you.

As the well-known IT wisdom says, system administrators are divided into those who do not make backups, and those who already do backups. I think everyone at least once after a firmware or failure had to set up a phone / tablet from scratch. But it is not necessary to do this at all if there is a saved backup. In this article, we will look at different types of backup (backup copy) of the contents of Android devices for all occasions.

Introduction

Having rooted a smartphone, the average user begins to experiment with the device and install various interface modifications, themes, fonts, new kernels, firmware, radio and root applications. As a permanent, long-standing and active user forums w3bsit3-dns.com and XDA Developers, I can say that very often such experiments end with questions with the wording: “The phone does not boot, what should I do?”

Even after reading the instructions very carefully, you can make a typo or press the wrong button, and then get a bootloop - eternal loading phone with repeated bootanimation. In the worst case, you can get a "brick" - the phone will not turn on at all. This happens very rarely, and, frankly, you need to try very hard to, for example, kill flash memory. Usually, what users consider a “brick” can be successfully restored with the help of simple manipulations. And a backup will help us a lot in this.

Basic backup functions that will satisfy most ordinary users, suggests Google itself. In the phone settings there is a tab "Accounts", in which you can check the necessary checkboxes. After flashing or resetting the device to factory settings or activating a new android phone it will restore contacts, history and tabs Chrome browser, notes Google Keep, photos, app data, calendar events, and so on. In recent Android versions you can restore the desktop with all shortcuts and automatically install all previously installed applications.

However, Google cannot back up everything. System and application settings will be reset, saved passwords (or rather, authentication tokens) will disappear, applications from third-party markets will not be reinstalled. Therefore, we need tools that can save everything in general. We will talk about them.

WARNING

Most of the applications described in the article require root and BusyBox.

Backup applications and their data.

I myself follow the "clean install" approach. When switching to a new firmware, it is easier for me to set up programs from scratch. Yes, and the appearance of bugs in this case is reduced to nothing, especially when switching to the next major version of the firmware. But many users find it more convenient to save application settings and restore them to new firmware. This is especially true for third party programs which are not in the market. I will focus on the two most popular applications with millions of downloads.

Titanium Backup

The most powerful tool for backing up, restoring, freezing and deleting applications along with their data (including system and pre-installed by the manufacturer). Allows you to set up automatic scheduled backups without closing applications, and transfer any application to an SD card. You can store different backups of one application, save SMS, MMS, call history, browser bookmarks, points WiFi access in the form of an XML file. Can sync all backups to Dropbox, Box and Google Drive. With this application, it is easy to make any user application a system one, add encryption, link the application to the market after restoration (for further updates). A convenient feature is the creation of an update.zip archive based on a backup of applications and data, which can be flashed from the recovery console to restore applications and settings.

One of the most useful uses of Titanium Backup is to transfer applications and their settings between devices. As an example, I will show how to make the popular whatsapp messenger on a tablet without a sim card. When searching for a program in the market, the description page will indicate that this program not supported on your device. Even if you download and install the APK, to activate the program, you need to dial to the device, which a tablet without a SIM card (or LTE with a tariff without voice calls or a diler cut from the firmware) cannot do.

So, go to Titanium, look for desired application, click on it and click "Save" in the pop-up menu. If you swipe left in the menu, you can call additional functions. The same menu can be called by a long tap on the application in the list. After the script has been processed, the notification panel will display new entry about creating a successful backup. For convenience, I advise you to configure the program to upload backups to the cloud. Synchronization can be configured on the third tab - "Schedules". We press "Start" on the item "Synchronization with Google Drive", and a notification in the curtain will report on successful completion.

On the tablet, we launch Titanium and synchronize backups with the cloud. At the same time, the just made backup from the phone is downloaded. WhatsApp will be at the very end of the list of programs. A strikethrough name means that the program is not installed on the tablet. Click on the program and select "Restore" from the pop-up menu. All. You can run WhatsApp.

Helium - App Sync and Backup

The main difference of the program is the ability to work without superuser rights (the application uses the standard backup manager available in any Android version 4.0 and up. - Ed.). At the same time, some of the functions have been cut down and a companion application on your computer is required. The program will allow you to backup the user dictionary, messages and call logs, Wi-Fi access points. System applications cannot be backed up, even if there is a root. Also, redundancy may be prohibited by the developers of some programs. They will be at the bottom of the list. For example, the same WhatsApp cannot be backed up.

Helium remembers all the devices on which it was launched and allows you to restore backups separately on different devices Oh. Backups can be stored on a memory card or in the cloud (Google Drive, Box, Dropbox), as well as scheduled. Another feature of the application is that it is easy to transfer data between devices, for example, starting a game on one device, you can continue it on another.

IMEI

It is not uncommon for cellular communications and the Internet to stop working after the firmware. This is a sure sign that the IMEI (International Mobile Equipment Identity) has fallen off. This number is unique to each machine and is used to identify the device on the network. If it fails, it can reset to zero, and the device will no longer see the network.

To avoid such cases, I advise you to make a backup of the EFS partition containing IMEI in advance: using programs from the market, manually through the console (adb shell) or on the device through a terminal emulator. It is worth noting that for different devices, the partition table can radically differ depending on the chips used. In the case of Nexus 4, you need to enter the following commands in the terminal:

Backup IMEI:

Su dd if=/dev/block/mmcblk0p8 of=/sdcard/m9kefs1.img dd if=/dev/block/mmcblk0p9 of=/sdcard/m9kefs2.img

Repair IMEI:

Su dd if=/sdcard/m9kefs1.img of=/dev/block/mmcblk0p8 dd if=/sdcard/m9kefs2.img of=/dev/block/mmcblk0p9

Nexus 5 does not have a separate EFS partition. Therefore, you need to back up sections 12 and 13, containing not only IMEI, but also other data:

Su dd if=/dev/block/mmcblk0p12 of=/sdcard/modemst1.img dd if=/dev/block/mmcblk0p13 of=/sdcard/modemst2.img

Recovery is carried out by a similar team.

Photos and videos

After unsuccessful firmware or, for example, damage or theft of the phone, the most unpleasant sensations are the loss of the videos and photos taken. After all, applications can be reinstalled, passwords can be restored if necessary, and photos, if you do not make sure in advance, will be lost forever. And in the market there are programs for every taste to save your photos and videos. Let's consider a few of them.

Google+

The standard program from the "corporation of good", pre-installed on all stock firmware. I have been using it for a long time and on all devices (on this moment The albums contain more than 10,000 photos). Automatically syncs all captured photos with private Picassa albums (soon the same feature will appear in Google Drive). Photos will be available on all devices that are signed in to the same account. If you have Internet access, all photos can be viewed even on a new device by logging in to Google account. A nice bonus - auto-correction of some photos, creating collages from similar photos and GIF animations from a series of photos. Auto-creatives also appear automatically - cutting to music from many photos and videos taken on the same day. When you change where you take photos and videos, Stories and Travels usually appear.

Other options

  • MEGA- gives by default a storage of 50 GB, has flexible settings, a synchronization client for a computer and an extension for the Chrome browser. Different modes browsing, the ability to open folders for other users.
  • Mail.ru cloud- 100 GB for new users. It has a nice interface and a client for a computer.
  • dropbox- interesting in that it has a companion application Carousel, which can not only automatically upload photos, but also clean the smartphone from those that have already been downloaded.

INFO

Important backups are best stored in the cloud or on your computer so that you can use them even after a complete wipe of the device.

Backup of arbitrary files

There are also various programs for backing up files on the SD card. In general, they have similar features and differ in interface or supported cloud services.

Foldersync

Material Design, support for Amazon Cloud Drive, Box, Dropbox, FTP, Google Drive, Mega, OneDrive, SMB/CIFS, WebDav, Yandex Disk. It has a built-in file manager, many settings, filters, convenient planning. Ability to configure two-way synchronization, transfer hidden files, Wi-Fi transmission setup / Mobile Internet, Tasker support, pin code protection, the ability to synchronize subfolders.

DataSync

Ability to synchronize between devices via Bluetooth, schedule, application data, files and folders. Automatic two-way data synchronization will save game progress and automatically download it to all connected devices when data changes on one of them.

Dropsync

Advanced sync client with Dropbox. Photo and video upload, battery level monitoring, Wi-Fi / 3G / 4G / WiMax connections and adaptation according to user preferences, customizable auto-sync interval, Tasker plugin, the ability to select the synchronization mode: only download, download and delete, only download, mirror download and more.

In fact, this is an analogue of the desktop Dropbox client with on-the-fly synchronization (as in the Linux version of the client, file changes are tracked using the inotify mechanism, so everything is synchronized at once, and not at certain intervals).

INFO

For Linux / UNIX users, rsync backup for Android is suitable, which will allow you to send and receive files from remote server via SSH. Has Tasker support.

Full device backup

Nandroid backup (from NAND - the type of memory used in modern smartphones) - a complete backup of the entire firmware along with applications, data and settings. The function is supported by TWRP or CWM. In addition, a backup can be made directly from Android using the Online nandroid backup program. The already considered Titanium, as well as the Nandroid manager, will help restore individual data. First, let's see how to make a backup from the recovery console.

CWM

To create a backup, you must select the item Backup and Restore, and then Backup to / sdcard. Before clicking, you can select the backup format or release unused data. To restore, select the item Backup and Restore and then Restore from / sdcard. If you select Advanced restore from / sdcard, you can specify boot, system, data, cache, sd-ext partitions for recovery separately.

For greater safety, the resulting backup can be transferred to a computer. But there is one catch here. The fact is that if the device has an “external” (real) memory card, CWM will place a backup in it and it will be available for saving on the computer using standard means (clockworkmod/backup/date-and-time-backup directory on the memory card ). It's all right here.

A lyrical digression, or a declaration of love for Nexus devices

If you look at the partition structure of Nexus devices using the adb shell busybox fdisk /dev/block/mmcblk0 command (you need root and installed from the BusyBox market), you can see the following picture (see screenshot "Partition structure on Nexus 5 and Nexus 4" ).

The aboot partition is the primary bootloader. It can be damaged if, for example, you flash the kernel or bootloader from another device or pull the cord out of the phone during the flashing process. At the same time, the partition table flies and the phone stops loading into the bootloader and recovery, and also stops responding to fastboot and adb commands.

The average user thinks it's a "brick" and carries the phone in service center, where he pays more than a hundred dollars for a new one to replace the supposedly burnt board. In fact, in partition 15 for the Nexus 4 and partition 11 for the Nexus 5, there is a bootloader backup - abootb. This is one of the reasons why it is almost impossible to kill the Nexus, because the backup bootloader can be restored without any problems.

Turn off the smartphone and turn it on while pressing the keys . Then simultaneously press and hold the combination of buttons (works only if the main loader is killed). After that, we connect the device to the computer (now it will be detected and ADB will work) and copy the backup bootloader to the main section with commands

$ adb shell su

The partition table will be restored, and if necessary, you can further flash the desired bootloader.

However, in smartphones without a memory card slot or in its absence, the backup will be invisible to the user. This is due to the fact that the internal memory mount points have changed since version 4.2 in Android to allow for multi-user operation. The virtual (internal) memory card itself is mounted in / data / media, and the CWM backup is also located there. But the main user's data is in /data/media/0, and it is this directory that is then mounted as /sdcard. Therefore, the backup will remain inaccessible with standard means and without root permissions.

You can get a backup from / data / media using file manager with superuser rights or by connecting a smartphone to a computer in recovery mode. Next, enter adb command shell and then ls /sdcard/clockworkmod/backup/ to find the directory with the latest backup. We transfer the backup with the following command:

$ adb pull /sdcard/clockworkmod/backup/2015-04-20.15.46.18\"D:\Nexus5\Backup\Nandroid\2015-04-20.15.46.18"

where the numbers are the backup found earlier, corresponding to the date and time of occurrence, and at the end is the path on the computer for storing the backup, which can be arbitrary.

TWRP

To create a backup, press the Backup button and mark the necessary partitions with crosses (not sure - select all). Additionally, you can remove encryption, enable compression, skip creating an MD5 hash and choose to save to a USB - OTG flash drive. As a result, the backup will be in the /sdcard/twrp/backups/date-and-time-backup directory. Unlike CWM, it will be available regardless of the presence of a memory card. To restore, click Restore and select the one you need.


INFO

The market has a large number of programs for a separate backup and recovery of SMS, calls, contacts, kernels, recovery, and so on.

nandroid manager

It is a one-stop tool to manage all Nandroid backups. With the help of Nandroid Manager, you can restore applications and data from Nandroid, SMS, call log, Wi-Fi hotspots, saved paired Bluetooth devices, user dictionary. The application sees the backups created in both custom recovery, and allows you to rename them and search for information in separate databases inside the backup.

Features of Nandroid Manager

Online nandroid backup

Allows you to make a backup on a device that is working in normal mode, without rebooting into recovery. In the settings, you can select the following options:

  • Backup name - each time manually / according to the UTC time zone / according to the phone's time zone / based on the firmware version number, including the creation time.
  • Backup type - CWM / TWRP with or without compression.
  • Mode - normal (full) / selection of partitions for copying. When you select the latter, a list with a choice opens.
  • Backup location.
  • The number of backups to store is from "all" to 10 (when overflowing, the older ones are deleted).
  • Saving Yaffs2 sections as Tar files.
  • Excluding Dalvik Cache from the backup.

The program supports uploading backup files to the cloud, FTP or Google Drive. Customizable schedule available for automatic backups, from "every day" to "every 30 days" with the option "only when the device is charging". In addition, actions for Tasker are supported using the plugin.

Backup with ADB

A way, so to speak, for geeks. We connect the smartphone to the computer, turn on USB debugging. Next, we use the adb backup command, which has the following keys:

  • -f FILE - location and file name of the created backup on the computer. If this parameter is not present, the backup will be created in the current folder named backup.ab. On Windows, paths with spaces and special characters must be enclosed in quotation marks.
  • -apk | -noapk - whether or not to save the APK application in the backup. The default is not to save.
  • -system | -nosystem - whether to save system applications in the backup. The default is to save. Selecting -nosystem will prevent saving system applications when the -all switch is given.
  • -all - backup all installed applications, including system ones.
  • -shared | -noshared - whether to include application data and the contents of the memory card in the backup. The default is not to save.
  • - here you can write a list of applications that will be backed up. Ignores -nosystem.

Accordingly, to perform a full backup, we use the following command:

$ adb backup -f "D:\Backup\ADB-2015-04-20.ab" -apk -shared -all -system

After that, Now unlock your will appear in the console device and confirm the backup operation, and a notification on the phone asking you to confirm the operation and set an optional backup password. The backup process itself can take more than forty minutes, so there is no need to be nervous. To restore, use the “adb restore path-to-file” command, for the example above it will be:

$ adb restore "D:\Backup\ADB-2015-04-20.ab"

We confirm the request on the phone, enter the password (if set during backup) and wait for recovery, which can take even longer than creating the backup itself.

INFO

You can find out the IMEI numbers of all your devices linked to Google (including older ones) on the page google.com/settings/dashboard by expanding the Android list.

Conclusion

I hope this article will help you save time and nerves when experimenting with the device. And even the loss or theft of the phone will not become a tragedy with backups of photos and applications stored in the cloud.

You can restore data for an available date or create an archive from current data or data from a backup.

File recovery

In order to restore files from a backup, you need to open the " File archive" (opens by default) and select a date available for recovery from the drop-down list. Next, select folders and / or files and click on the restore icon . The data you have selected will be transferred to your account, all files will be set to 700 rights. The time required to complete this operation varies depending on the size of the data, a confirmation will be sent to the administrative email upon completion of the restoration.

There is also an icon next to each file or directory.
When you click on it, the data you selected will be archived and posted in the root of your account. The execution time of this operation also varies depending on the size of the data; upon completion of archiving, a confirmation will be sent to the administrative email.

Database recovery

Database recovery is done in the same way. You need to open the tab Database", select the desired date, then select the database and click on the restore icon or upload the database backup archive to the root of the account.

Archiving current data

If you select " instead of date Current state", then next to the files, folders or database there will be only one icon , by clicking on which you can upload an archive created from the current files or database to the root directory of your account.

Quest History

On the tab " Quest History" You can track the progress of restoring from backups.

Backup on demand

With this function you can create a backup copy of your entire account (files and database). This copy is kept indefinitely and one copy is always free of charge.

In order to create a copy, it is enough to write any comment for it, for example, "Before updating the engine on all sites", then click on the " Create an eternal backup"

The time it takes to create a copy depends on the total size and number of files and databases. After creating the first copy, each additional one will cost 2 rubles per day.