Skip to content

Instantly share code, notes, and snippets.

@TraceM171
Created December 24, 2024 18:46
Show Gist options
  • Save TraceM171/0e6bd8f930cddb5e468e9e6d0460d22a to your computer and use it in GitHub Desktop.
Save TraceM171/0e6bd8f930cddb5e468e9e6d0460d22a to your computer and use it in GitHub Desktop.

How to Extract All Data from WhatsApp

Follow these steps to extract all your WhatsApp data, including messages, in a secure and comprehensive way.


Disclaimer:

This guide is intended to help you access your own data only. Unauthorized access to data that does not belong to you may violate privacy laws and terms of service. Use this guide responsibly.


Steps

  1. Open WhatsApp on an Android phone that contains all the messages you want to extract.
  2. Go to Backup Settings:
    • Navigate to Settings -> Chats -> Chat backup (path may vary in future versions of WhatsApp).
  3. Manage End-to-End Encrypted Backup:
    • If backup encryption is disabled, proceed to Step 4.
    • If encryption with a password is enabled, disable it and proceed to Step 4.
    • If encryption with a 64-digit encryption key is enabled and you don’t know the key, disable it and proceed to Step 4.
    • If encryption with a 64-digit encryption key is enabled and you know the key, proceed to Step 5.
  4. Enable Backup Encryption:
    • Choose to use a 64-digit encryption key.
    • After the key is generated, take note of it, as it will be needed later.
  5. Download ADB:
    • Download the Android Debug Bridge (ADB) tool from its official website on your PC.
  6. Enable USB Debugging:
    • On your Android phone, enable USB debugging in the Developer Options.
    • Note: Each phone may require different steps to enable USB debugging; refer to your device’s documentation or search online for specific instructions.
    • Connect the phone to your PC via USB.
  7. Extract WhatsApp Data Using ADB:
    • Execute the following commands in a terminal or command prompt:
      adb pull /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Databases ./Databases
      adb pull /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Backups ./Backups
  8. Decrypt the Encrypted Files:
    • Use the encrypted .crypt15 files and the 64-digit encryption key with the tool wa-crypt-tools.
    • Example command:
      wadecrypt <64digitkey> msgstore.db.crypt15 msgstore.db
  9. View the Decrypted Database:
    • The decrypted .db files can be opened and viewed using any SQLite explorer.
    • Investigate the database design to navigate the decrypted results. The structure is straightforward, and table names are descriptive.

Notes:

  • This guide assumes basic familiarity with terminal commands and ADB setup.
  • Handle the 64-digit encryption key and decrypted data carefully to ensure your privacy and security.
@TraceM171
Copy link
Author

Anyone know if something similar is possible on iOS?

I currently do not have access to an iOS device for testing. However, I anticipate that the process might be somewhat challenging on iOS systems. If you manage to successfully implement it and are willing to share your approach, I would be glad to include your contribution in this tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment