Put in ADB
To backup details of an Android application, you will want to join your Android machine to a Linux Laptop working with a USB cable. At the time connected you will want “Android Debug Bridge” or “adb” command line utility to interact with your cell phone.
To put in ADB in Ubuntu, use the command specified underneath:
You can set up ADB in other Linux distributions from the bundle supervisor. You can also down load executable binaries for ADB from here.
Allow USB Debugging on Your Cellular phone
To interact with your Android unit working with the “adb” command on your Linux Computer, you will need to empower USB debugging on your Android product initially.
To enable USB debugging, you will have to enable the “Developer options” menu on your Android product. This can be accomplished by going to the “Settings > About phone” menu on your Android device and tapping on “Build number” around seven instances. Based on your Android device, the location of the “Build number” alternative can be various. You can use the lookup bar in procedure configurations to obtain it speedily.
Soon after you tap seven occasions on “Build number”, a new entry called “Developer options” must be readily available in the procedure settings of your Android unit. Go to “Developer options” and empower “USB debugging”, as demonstrated in the screenshot under:
Authenticate ADB Relationship
Join your Android machine to Linux Computer by means of a USB cable. Run the command down below to initiate authorization:
You really should get a prompt similar to this on your Android device:
Click on the “Allow” solution to authenticate your Android system. You can also look at the “Always allow for from this computer” possibility to mechanically authenticate your Android unit on subsequent connections.
Following a productive connection, you really should see some output in the terminal exhibiting the serial variety of your Android unit.
If you see an “unauthorized” string as a substitute of “device” in entrance of the serial variety, one thing went completely wrong and your device could not be authenticated. To retry, unplug the USB cable, reconnect your Android product to your Linux Pc and repeat the authentication steps stated previously mentioned.
Get Offer ID
Now that your Android unit is linked to your Linux Personal computer and authenticated with ADB, you are completely ready to choose software backup. But to do so, you will first need to have the offer ID for the software you want to backup.
You can obtain the package deal ID making use of two approaches. The initially approach requires going to the Engage in Shop listing for your ideal application. You will obtain offer ID soon after “id=” characters, as highlighted in yellow under. You can also get website link for a listing from the Participate in Retail store application by itself by hunting for the application and using the “share” element to duplicate the website link to the clipboard.
In the next method, you can use an adb command to get package deal names and their IDs. Operate the command beneath to do so.
$ adb shell pm list deals -f | awk ‘print $NF’ FS=/
You will get some output like this:
The still left hand side in every line in the output will give you a trace about the application name, whilst the right hand side (following “=” symbol) will give you package ID. You can also make use of the “grep” command to quickly come across your desired package ID.
$ adb shell pm listing packages -f | awk ‘print $NF’ FS=/ | grep vlc
Run Backup Command
Now that your Android machine is linked to your Linux Personal computer, authenticated to an ADB connection and you have a deal ID, you are ready to consider software backup. To do so, run a command in the following structure:
$ adb backup -apk <package_id>
For instance, to backup VLC participant on Android, you will will need to operate the subsequent command:
$ adb backup -apk org.videolan.vlc
You can take out the “-apk” switch if you never want to backup the “.apk” package file for your ideal application.
On newer Android versions, you might be asked to encrypt backup employing a password. When prompted, enter a password for the backup.
Wait around for the backup system to complete. You should really now have a “backup.ab” file that contains details backup. You can also source a custom made title for the backup file utilizing the “-f” change.
$ adb backup -f vlc_backup.ab -apk org.videolan.vlc
When the method stated higher than should really function with most 3rd celebration Android applications, certain Android apps, specifically pre-set up program apps, do not allow having backups of application knowledge by means of the “adb” command. The backup procedure doesn’t give any warning that backups are disabled in this sort of instances. If the backup file is very small (a lot less than 1KB), your application info might not have been backed up appropriately as backups could be disabled for it.
Restore the Backup
You can restore a “.ab” backup file on your Android unit employing the command under:
Replace “backup.ab” identify as expected. Keep in thoughts that restoring backups may not work if the application does not guidance having backups by way of ADB in the to start with place.
Investigate Contents of the Backup
You can take a look at the contents of a “.ab” file utilizing a utility called “Android Backup Extractor”. You can download it from here. As soon as downloaded, you should have a “abe.jar” file on your method.
To use it in Linux, you will have to have to have Java mounted on your process. You can install Java in Ubuntu utilizing the command beneath:
$ sudo apt put in default-jre
You can set up Java in other Linux distributions by seeking for the term “OpenJDK runtime” in the offer manager.
To extract a “.ab” backup file to a “backup.tar” extractable archive, operate a command in the following format:
$ java -jar abe.jar unpack backup.ab backup.tar <password_you_entered_during_backup>
Exchange the file names as required. In the final aspect of the command, provide the password in simple textual content. Right here is an case in point of the command:
$ java -jar abe.jar unpack vlc_backup.ab backup.tar 1234
You can now freely examine the “.tar” file and extract the info to look through the backup documents.
You can backup application info as a result of the “adb” command as extended as the software lets it. It is the most trusted way available these days to backup and restore software details in Android, although Google has been imposing some limits on information backups with each iteration of a new Android edition.