How to Create a Secure Encrypted Backup of SMS and Call Logs on Android (No Root)

9 min read Step‑by‑step guide to back up your SMS messages and call logs on Android without root, encrypt the backup, and extract it safely using ADB and open‑source tools. October 07, 2026 08:00 How to Create a Secure Encrypted Backup of SMS and Call Logs on Android (No Root)

Before you start

Gather the following items before you begin. Skipping any of these can cause the backup to fail or leave your data exposed.

  • Android device running Android 9 or later. Newer versions may limit the ADB backup feature, but the steps still work on most devices.
  • PC (Windows, macOS or Linux) with adb installed and available in the system PATH.
  • Java Runtime Environment (JRE) – required to run the Android Backup Extractor (ABE) tool.
  • Android Backup Extractor (ABE) – a small .jar file that can decrypt and unpack the .ab backup created by ADB.
  • At least 500 MB of free storage on your PC for the intermediate files.
  • A USB cable you trust for data transfer.
  • Make sure the phone is charged to ≥50 % to avoid interruptions.

All steps are performed without rooting the device, so the backup respects the app‑level permissions granted by Android.

What the process does

ADB’s backup command creates a single .ab file that contains the selected app’s data. By adding the -encrypted flag you protect the file with a password you choose. The file is then unpacked with ABE, which produces a .tar archive. Inside the archive you’ll find XML files such as mmssms.xml (SMS/MMS) and contacts2.xml (call logs). These XML files can be opened with any text editor or converted to CSV for easier reading.

Step‑by‑step backup

  1. Install ADB on your PC

    If you already have the Android SDK, you can skip this. Otherwise, download the platform‑tools package from the official Android developer site, extract it, and add the folder to your PATH.

    # Example for Linux/macOS
    wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip -O platform-tools.zip
    unzip platform-tools.zip -d $HOME
    export PATH=$HOME/platform-tools:$PATH
    
  2. Enable USB debugging on the phone

    Open Settings → About phone → tap Build number seven times to unlock Developer options. Then go to Settings → System → Developer options → enable USB debugging. Confirm any prompt that appears on the device.

  3. Verify the ADB connection

    Connect the phone via USB, then run:

    adb devices

    You should see a device ID followed by device. If you see unauthorized, accept the RSA key prompt on the phone.

  4. Back up SMS/MMS

    Run the following command. Replace YOUR_PASSWORD with a strong passphrase you will remember. The password will never be stored on the phone.

    adb backup -f sms_backup.ab -apk -nosystem -encrypted YOUR_PASSWORD com.android.providers.telephony

    The phone will display a confirmation dialog. Tap Back up my data. When prompted for a password, type the same YOUR_PASSWORD and confirm.

  5. Back up Call Logs

    Call logs are stored in the same provider package, so the previous backup already contains them. If you prefer a separate file, repeat the command with a different filename:

    adb backup -f calllog_backup.ab -apk -nosystem -encrypted YOUR_PASSWORD com.android.providers.contacts
  6. Decrypt and extract the backup

    Download android-backup-extractor (ABE) and place abe.jar in a convenient folder.

    Run the extractor for each .ab file:

    java -jar abe.jar unpack sms_backup.ab sms_backup.tar YOUR_PASSWORD

    If you created a separate call‑log backup, unpack it the same way.

  7. Retrieve the XML files

    Extract the .tar archive (any archive tool will do). Inside you will find a folder structure like:

    apps/com.android.providers.telephony/f/00000001.xml

    The file mmssms.xml holds all SMS/MMS messages. For call logs, look for contacts2.xml inside the contacts provider folder.

  8. Verify the extracted data

    Open the XML files with a text editor. You should see entries such as:

    <sms address="+1234567890" date="1633024800000" type="1" body="Hello!" />

    If the files are readable, the backup succeeded and the encryption was correctly removed by ABE.

Optional: Convert XML to a readable spreadsheet

Many users prefer CSV over raw XML. A quick way is to use the free Python script below (requires Python 3).

import xml.etree.ElementTree as ET
import csv, sys

def sms_to_csv(xml_path, csv_path):
    tree = ET.parse(xml_path)
    root = tree.getroot()
    with open(csv_path, 'w', newline='', encoding='utf-8') as f:
        writer = csv.writer(f)
        writer.writerow(['address','date','type','body'])
        for sms in root.iter('sms'):
            writer.writerow([
                sms.get('address'),
                sms.get('date'),
                sms.get('type'),
                sms.get('body')
            ])

if __name__ == '__main__':
    if len(sys.argv) != 3:
        print('Usage: python sms_to_csv.py input.xml output.csv')
        sys.exit(1)
    sms_to_csv(sys.argv[1], sys.argv[2])

Run it like python sms_to_csv.py mmssms.xml sms.csv. Open the resulting sms.csv in Excel or Google Sheets.

Troubleshooting

  • Backup command finishes instantly with an empty file

    This usually means the device’s backup service is disabled. Go to Settings → System → Backup and ensure “Back up to Google Drive” (or similar) is turned on. The ADB backup command relies on that service.

  • ADB reports “cannot open backup file”

    Check that the destination folder on your PC is writable and that you have enough free space. Use an absolute path, e.g. adb backup -f C:\backups\sms_backup.ab ….

  • ABE says “Incorrect password”

    Make sure you typed the same password you entered on the phone. Passwords are case‑sensitive. If you forget it, the backup cannot be decrypted – you’ll need to create a new backup.

  • XML files are empty or missing

    Some manufacturers (especially those with heavy custom skins) block ADB backup for the telephony provider. In that case, you can fall back to third‑party apps like “SMS Backup & Restore” which store their own encrypted XML files. The tutorial’s workflow still applies; just replace the ADB step with the app’s export.

  • Android 12+ refuses to create a backup

    Starting with Android 12, the adb backup command is deprecated and may be disabled by the OEM. If the command fails with “Backup disabled”, you must use an app‑based solution (e.g., “SMS Backup & Restore”) or root the device.

Safety notes

Never store the password you use for encryption in an insecure place (plain‑text notes, email, etc.). If an attacker obtains the .ab file and the password, all your messages and call logs are exposed.

After you have verified the XML/CSV files, consider securely deleting the original .ab and .tar files. On Windows you can use “cipher /w:”, on macOS/Linux use shred or srm.

That’s it! You now have an encrypted backup of your SMS and call logs that can be stored offline, transferred to another device, or archived for future reference—all without rooting your Android phone.

User Comments (0)

Add Comment
We'll never share your email with anyone else.