Backing up an Android phone without rooting can feel risky because the built‑in backup options are often tied to Google services. Using adb you can create a local .ab backup, encrypt it yourself, verify that the file is intact, and then store it in a cloud drive you control. This tutorial walks you through every step, explains why each action matters, and gives troubleshooting tips for the most common hiccups.
adb and openssl installed..ab file.adb before, the Platform‑Tools package can be downloaded from the official Android developer site.C:\adb or ~/adb).adb version. You should see something like Android Debug Bridge version 1.0.41. If the command is not recognized, add the folder to your system PATH.
setx PATH "%PATH%;C:\adb" then restart the terminal.export PATH=$PATH:~/adb to ~/.bash_profile or ~/.zshrc.openssl version. Most modern OSes ship with OpenSSL already; if missing, install it via your package manager (e.g., brew install openssl on macOS or sudo apt install openssl on Ubuntu).adb devices. You should see a line like RZ8M5C7L device. If the state shows unauthorized, re‑check the prompt on the phone.~/Desktop (macOS/Linux) or C:\Users\YourName\Desktop (Windows).backup.ab with your desired filename:
adb backup -apk -shared -all -f "backup.ab"
-apk includes the APK files of installed apps.-shared backs up files on the shared storage (photos, downloads, etc.).-all backs up all user apps and their data.-f specifies the output file..ab file. Enter the strong passphrase you prepared earlier. You may also leave it blank, but then the file is stored unencrypted on the PC, which defeats the purpose of this guide.The .ab format is a proprietary Android wrapper. Converting it to a .tar archive makes inspection and selective restoration easier.
abe.jar utility from the open‑source Android Backup Extractor project. Place abe.jar in the same folder as your backup.backup.ab and backup.tar as needed):
java -jar abe.jar unpack backup.ab backup.tar
You will be asked for the same password you used in Step 3. Enter it.backup.tar. You can list its contents with tar -tf backup.tar to confirm the extraction succeeded.We will use AES‑256‑CBC encryption, which is widely supported and provides strong confidentiality.
backup.tar.encrypted_backup.bin with your preferred name):
openssl enc -aes-256-cbc -salt -in backup.tar -out encrypted_backup.bin -pbkdf2
-aes-256-cbc selects the cipher.-salt adds a random salt to thwart dictionary attacks.-pbkdf2 uses the modern PBKDF2 key‑derivation function.backup.tar plus a small overhead.It is good practice to generate a checksum before you upload the file. If the cloud copy gets corrupted, you can detect it immediately.
openssl dgst -sha256 encrypted_backup.bin
The output will look like SHA256(encrypted_backup.bin)= a3f5…. Copy the hash string and store it in a secure note (e.g., a password manager).Any service that supports file uploads (Google Drive, Dropbox, OneDrive, pCloud, etc.) works. The key point is that the file is already encrypted, so the cloud provider never sees the raw data.
encrypted_backup.bin into that folder.After you have confirmed the upload succeeded, you can delete the unencrypted backup.tar and the plain backup.ab files to reduce the risk of accidental exposure.
del backup.ab and del backup.tar.
rm backup.ab backup.tar.encrypted_backup.bin only in the cloud (or on an encrypted external drive) unless you need a local copy for quick testing..ab file needs roughly the same size as the data on the phone.-nosystem flag to exclude system apps (they are not usually needed for personal restores).-shared and back up only app data, then copy photos separately via adb pull /sdcard/DCIM.backup.tar) is not corrupted. Re‑run the tar -tf backup.tar command to list its contents.abe.jar that matches the Android version you backed up from. Newer Android releases may add features that older extractors don’t understand..ab file was encrypted twice (e.g., you ran OpenSSL on the original .ab instead of the .tar), you need to decrypt it twice before feeding it to abe.jar.adb restore command directly on the encrypted .ab (after decrypting it back to its original form).encrypted_backup.bin from the cloud to a trusted PC.openssl enc -d -aes-256-cbc -in encrypted_backup.bin -out backup.tar -pbkdf2
Enter the encryption password when prompted..ab file, skip the next step. Otherwise, re‑package the .tar back into .ab using abe.jar pack:
java -jar abe.jar pack backup.tar backup.ab
adb restore backup.ab
Confirm the restore dialog on the phone and enter the original backup password.
.ab/.tar pair can be restored on any Android device, regardless of the Google account attached..tar you can pick individual app data folders or media files without reinstalling every app.adb backup completed without errors.abe.jar successfully unpacked the .ab file.With these steps you now have a reliable, encrypted snapshot of your Android device that lives safely in the cloud and can be restored whenever you need it – all without rooting or installing third‑party backup apps.









