back to top

How to Create and Restore App Backups Via ADB Commands

Follow Us
placeholder text

This guide will show you the steps to create and restore an app backup via ADB commands. Are you looking for a way to create and restore app backups on your Android device? While Google’s sync feature keeps track of the list of installed apps, it does not back up their data. This means that when you restore an app, only the app itself will be downloaded and installed without any of its data. This can be time-consuming, especially if you have to set up the app from scratch and resync the server data.

Additionally, this feature is only supported on a limited number of apps. However, do not worry; a hidden and underrated method allows you to create and restore app backups via ADB commands. So, let us get started!

How do I create and restore an app backup via ADB commands?

The prerequisites

Before we begin, there are a few requirements for creating and restoring app data. Make sure to checkmark each one.

  1. Download and extract the Android SDK Platform Tools.
  2. Enable USB debugging on your device and connect it to your PC using a USB cable.

Create an app backup via ADB commands.

To create an app backup using ADB commands, follow these steps:

  1. Find the app’s package name for which you want to take a backup (e.g., pl.solidexplorer2).
  2. Open the Command Prompt by typing “CMD” in the address bar of the platform tools folder and pressing Enter.
  3. In the Command Prompt window, enter the following command, replacing package-name and package-name-backup with the appropriate values:
adb backup -apk package-name -f package-name-backup.ab

For example, if the package name is pl.solidexplorer2, the command will be:

adb backup -apk pl.solidexplorer2 -f pl.solidexplorer2.ab
  1. On your device, you will be prompted to tap on “Back Up My Data.”
  2. The app will now be backed up in APK format, and its backup will be saved in the platform tools folder as an AB file.

Restore App Backup via ADB Commands

To restore an app backup using ADB commands, follow these steps:

  1. Install the saved APK file that you obtained from the platform tools folder.
  2. In the Command Prompt, enter the following command, replacing package-name-backup with the actual name of the backup file:
adb restore package-name-backup.ab

For example, if the backup file is pl.solidexplorer2.ab, the command will be:

adb restore pl.solidexplorer2.ab
  1. On your device, you will be prompted to tap on “Restore My Data.”
  2. The restoration process will begin and may take a few seconds.
  3. Once the process is complete, launch the app and continue using it from where you left off.

That is it! These are the steps to create and restore app backups via ADB commands. If you have questions or need further assistance, please ask in the comments section. We’ll be happy to help.

FAQs (Frequently Asked Questions)

Q1: Is it necessary to enable USB debugging to create and restore app backups via ADB commands?

USB debugging must be enabled on your device to use ADB commands to create and restore app backups. It allows your device to communicate with the computer and execute commands.

Q2: Can I use this method to back up and restore any apps on my Android device?

This method should work for most apps, but some exceptions might exist. It’s always a good idea to test this method on a less important app before applying it to critical apps. You can proceed with other apps if the backup and restore process is successful.

Q3: Will this method work on newer Android versions?

According to Google, this method has been deprecated in newer Android versions. However, the exact version number at which it was deprecated is not explicitly mentioned. It is testing this that Youthod on your device is recommended to see if it works.

Q4: Can I back up app data without backing up the APK file?

Yes, it is possible to back up only the app data without including the APK file. You can omit the -apk flag in the ADB backup command to do so. However, remember that restoring the app data without the APK file may result in compatibility issues if the app has been updated or modified.

Q5: Can I restore app backups from one device to another?

Yes, you can transfer and restore app backups from one device to another if both devices have USB debugging enabled. To restore the app backup on the target device, follow the same steps mentioned in this guide.