How to Back Up and Restore Data in Android 12 ?
open-android-backup
is a simple, interactive backup utility built on top of ADB (Android Debug Bridge).
It supports:
- Backup and Restoring files and apps.
Pre-requisites
Type-C To USB Wire
- Connect your Axon Android board to a host PC using:
- Type-C1 Port (device side) → USB-A (host side) cable (Host PC).
- In Host PC
- Install
adb
tool into host pc system -
sudo apt update sudo apt install p7zip-full adb curl whiptail pv bc secure-delete zenity
- Install
- In Axon
- Type-C1 port with Android Debug (ADB) enabled.
- Developer Options → USB Debugging turned ON.
- Type-C1 port with Android Debug (ADB) enabled.
In host pc. Verify ADB connection
adb devices
On the Host PC
git clone https://github.com/mrrfv/open-android-backup.git
cd open-android-backup
sudo chmod +x backup.sh
Backing Up Data
Run the script:
./backup.sh
The script will:
-
Detect your connected Android device.
Note :
Select do not want to use hook -
Prompt backup options via
whiptail
. -
Save backups under:
Mention the path in which you want to take back your files within your host PC./home/<username>/
hostpc ~/open-android-backup ./backup.sh Less than 100GB of free space available in the current directory. You may encounter issues if working with large backups. Please enable developer options and USB debugging on your device, connect it to your computer and set it to file transfer mode. Then, press Enter to continue. Samsung users may need to temporarily disable 'Auto Blocker' first. * daemon not running; starting now at tcp:5037 * daemon started successfully If you have connected your device correctly, you should now see a message asking for access to your phone. Allow it, then press Enter to go to the last step. Tip: If this is not the first time you're using this script, you might not need to allow anything. List of devices attached 5xxx1221xdxxx device Can you see your device in the list above, and does it say 'device' next to it? If not, quit this **script (Ctrl-C)** and try again. If you can see your device, press Enter to continue.
-
Select Connection method as
Wired option
. -
Select ‘tar’ option
-
Compression level 5 would be enough.
-
Select no option in hook.
Open Android Backup creates a temporary folder that contains all the data exported from your device. Leftovers from this folder might remain on your storage device, even after a successful backup or restore. The options below allow you to securely erase this data, making it harder for law enforcement and other adversaries to view your files. Your choice will also apply to cleanups, i.e. if the script has previously crashed without removing the files. Fast is considered insecure and can only be recommended on encrypted disks. Slow takes more time than the former, and it's safe enough for most people (2 passes). Extra Slow is only recommended for the paranoid (Gutmann method). Press Enter to pick your data erase mode.
-
Select Fast option for the Data erase mode option.
-
Select Backup option.
-
Mention Path name where you want to take backup.
-
Select the categories of data to backup.
[*] Applications Installed apps [*] Storage Photos, downloads, other files [ ] Contacts People, SMS and call logs
-
Now, all applications are going to be backed up
-
Set protected password for data backup image.
-
You will be shown like text below and you can get backup from there.
Creating archive: /home/<usrename>/open-android-backup-10-11-2025-12-44-13.7z
-
When it sucessfully runs,
Cleaning up after backup/restore... Using the 'Fast' data erase mode. Cleanup complete. Backed up successfully.
open-android-backup-DD-MM-YYYY-HH-MM-SS.7z file will be generated.
Restore Data
Pre-requisites
- Board should be flashed with android image before following below steps.
Steps to Follow
-
Proceed and select same option while taking backup.
-
Now, Select Restore option.
-
Enter Password as you have set before.
-
Select the categories of data to restore.
-
Process will be started. It may take some time, so wait till it completes.
Data restored!