Skip to content

Commit dde630e

Browse files
authored
Merge pull request #2 from auanasgheps/dev
docs: clarity improvements
2 parents 2a0eed6 + d18590b commit dde630e

3 files changed

Lines changed: 36 additions & 31 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,15 @@ After a successful run, the archive will be organized as follows:
7272

7373
The script runs on **Linux, macOS, and Windows** (Python 3.10+).
7474

75-
> ⚠️ **Run the script on the same machine where the media files are physically stored.** Processing files over a network share (NFS, SMB, etc.) will be significantly slower.
75+
> ⚠️ If you have WhatsApp on Android, **run the script on the same machine where the media files are physically stored.** Processing files over a network share (NFS, SMB, etc.) will be significantly slower.
7676
7777
---
7878

7979
## Prerequisites
8080

8181
- **Python 3.10+** required
82-
- **Android**: End-to-end encrypted backup must be **enabled** in WhatsApp before pulling the database
82+
- **Android**: End-to-end encrypted backup must be **enabled** in WhatsApp before pulling the database. Root is not required
8383
- **iOS/iPadOS**: End-to-end encrypted backup must be **disabled**
84-
- **ADB** required for automatic retrieval (`--mode adb`)
8584

8685
See [docs/prerequisites.md](docs/prerequisites.md) for full setup instructions: E2E backup configuration, database extraction (Android and iOS), contacts pull, and locating your media folder.
8786

@@ -94,7 +93,7 @@ Always do a dry run first:
9493
```bash
9594
python3 wa_media_archiver.py \
9695
--msgstore /path/to/msgstore.db \
97-
--wa_root /path/to/WhatsApp \
96+
--wa_root /path/to/WhatsApp/storage \
9897
--output /path/to/output \
9998
--contacts /path/to/wa_contacts \
10099
--dry-run

‎docs/prerequisites.md‎

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ For iOS encrypted backup decryption, the script uses `iphone-backup-decrypt`. Yo
2121
pip install iphone-backup-decrypt
2222
```
2323

24+
> 💡 Windows Users: your Python environment may not have pip in the PATH. If `pip install` doesn't work for you, `use py -m pip install`.
25+
2426

2527
---
2628

@@ -37,6 +39,8 @@ Settings → Chats → Chat Backup → End-to-end Encrypted Backup → Turn On
3739
Enable it and note the **cryptographic key** — a long alphanumeric string.
3840
**Store it somewhere safe**; you will need it every time you pull a fresh backup. If you lose this key, you will lose access to all your backups.
3941

42+
When asked, create the end-to-end ecrypted backup.
43+
4044
> If this step is skipped, the `.crypt15` backup file cannot be decrypted and the script will not work on a non-rooted device.
4145
4246
**iOS / iPadOS users** — End-to-end encrypted backup must be **disabled**. If it is enabled, the database inside the iPhone backup is encrypted in a way that cannot be read by this script. Disable it in WhatsApp before creating your device backup.
@@ -45,11 +49,30 @@ Enable it and note the **cryptographic key** — a long alphanumeric string.
4549

4650
## 3. Android Setup
4751

52+
53+
### Your WhatsApp Media Folder
54+
55+
Before you run the script, you need your WhatsApp (Media) folder on disk - actually, the folder called `WhatsApp` that **contains** the `Media` subfolder.
56+
You need to copy this folder from your phone: you can use [Syncthing](https://syncthing.net/) to ease the process.
57+
58+
```
59+
/path/to/WhatsApp/
60+
├── Databases/
61+
└── Media/
62+
├── WhatsApp Images/
63+
├── WhatsApp Video/
64+
└── WhatsApp Audio/
65+
```
66+
67+
Pass the path to the `WhatsApp/` folder (not `Media/`) to the script via `--wa_root`.
68+
69+
> ⚠️ **Run the script on the same machine where the media files are physically stored.** Processing files over a network share (NFS, SMB, etc.) will be significantly slower — the script hashes and copies every file in the archive. Running locally is strongly recommended.
70+
4871
### Obtaining the Database
4972

5073
#### Recommended — Automatic Retrieval (`--mode adb`)
5174

52-
The simplest approach for most users. Connect your phone via USB with USB Debugging enabled, then let the script handle the pull and decryption automatically.
75+
This is the simplest approach for most users. Connect your phone via USB with USB Debugging enabled, then let the script handle the pull and decryption automatically.
5376

5477
> 💡 **ADB required.** Install it before running `--mode adb`:
5578
> - **Linux**: `sudo apt install adb` (Debian/Ubuntu) or `sudo dnf install android-tools` (Fedora)
@@ -62,13 +85,15 @@ Run the script with `--mode adb`:
6285
python3 wa_media_archiver.py \
6386
--mode adb \
6487
--e2e your_cryptographic_key \
65-
--wa_root /path/to/WhatsApp \
88+
--wa_root /path/to/WhatsApp/storage \
6689
--output /path/to/output
6790
```
6891
> 💡 On Windows, replace `\` with `` ` `` (PowerShell) or `^` (cmd.exe).
6992
7093
The script pulls the encrypted backup and contacts directly from the device and decrypts on the fly. No separate steps needed.
7194

95+
> Please note that this is just a simple example: you can add many options to customize the run, please see [docs/running-the-script.md](docs/running-the-script.md).
96+
7297
---
7398

7499
#### Alternative — Manual Pull
@@ -115,7 +140,7 @@ Alternatively, skip the manual decrypt and let the script handle it by passing t
115140
python3 wa_media_archiver.py \
116141
--msgstore /path/to/msgstore.db.crypt15 \
117142
--e2e your_cryptographic_key \
118-
--wa_root /path/to/WhatsApp \
143+
--wa_root /path/to/WhatsApp/storage \
119144
--output /path/to/output
120145
```
121146

@@ -140,25 +165,6 @@ Pass the file to the script with `--contacts`.
140165

141166
> 💡 You only need to repeat this if your contacts have changed significantly since the last run.
142167
143-
---
144-
145-
### Your WhatsApp Media Folder
146-
147-
The script needs a copy of your WhatsApp (Media) folder on disk - actually, the folder that **contains** the `Media/` subfolder.
148-
You need to copy this folder from your phone: you can use [Syncthing](https://syncthing.net/) to ease the process.
149-
150-
```
151-
/path/to/WhatsApp/
152-
├── Databases/
153-
└── Media/
154-
├── WhatsApp Images/
155-
├── WhatsApp Video/
156-
└── WhatsApp Audio/
157-
```
158-
159-
Pass the path to the `WhatsApp/` folder (not `Media/`) to the script via `--wa_root`.
160-
161-
> ⚠️ **Run the script on the same machine where the media files are physically stored.** Processing files over a network share (NFS, SMB, etc.) will be significantly slower — the script hashes and copies every file in the archive. Running locally is strongly recommended.
162168

163169
---
164170

‎docs/running-the-script.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ usage: wa_media_archiver.py [-h]
2626
| `-msg` / `--msgstore` | No | Path to `msgstore.db`, `msgstore.db.crypt15`, or `ChatStorage.sqlite`. Not needed with `--ios_backup`. Defaults to `msgstore.db` in the current folder |
2727
| `-e2e` / `--e2e_key` | If encrypted | Your cryptographic key for `.crypt15` decryption |
2828
| `-c` / `--contacts` | No | Path to the `wa_contacts` file exported via ADB (Android only) |
29-
| `-wa` / `--wa_root` | Android / iOS pre-extracted | Root path of your WhatsApp folder. Android: folder containing `Media/`. iOS pre-extracted: `AppDomainGroup-group.net.whatsapp.WhatsApp.shared` folder. Not required with `--ios_backup` or `--mode restore` |
29+
| `-wa` / `--wa_root` | Android / iOS pre-extracted | Root path of your WhatsApp folder from mass storage. Android: this contains the `Media/` folder. iOS pre-extracted: `AppDomainGroup-group.net.whatsapp.WhatsApp.shared` folder. Not required with `--ios_backup` or `--mode restore` |
3030
| `--ios_backup` | iOS (recommended) | Path to the iPhone backup directory (the folder containing `Manifest.db`). Mutually exclusive with `--wa_root` |
3131
| `--ios_password` | No | Password for an encrypted iPhone backup. Only needed when the backup is encrypted |
3232
| `--ios_contacts` | No | Path to `ContactsV2.sqlite` for iOS contacts. Auto-extracted from `--ios_backup` if omitted |
@@ -62,7 +62,7 @@ The examples below use `\` to split long commands across multiple lines. Replace
6262
python3 wa_media_archiver.py \
6363
--mode adb \
6464
--e2e your_cryptographic_key \
65-
--wa_root /path/to/WhatsApp \
65+
--wa_root /path/to/WhatsApp/storage \
6666
--output /path/to/output \
6767
--dry-run
6868
```
@@ -74,7 +74,7 @@ python3 wa_media_archiver.py \
7474
```bash
7575
python3 wa_media_archiver.py \
7676
--msgstore /path/to/msgstore.db \
77-
--wa_root /path/to/WhatsApp \
77+
--wa_root /path/to/WhatsApp/storage \
7878
--output /path/to/output \
7979
--contacts /path/to/wa_contacts \
8080
--dry-run
@@ -86,7 +86,7 @@ python3 wa_media_archiver.py \
8686
python3 wa_media_archiver.py \
8787
--msgstore /path/to/msgstore.db.crypt15 \
8888
--e2e your_cryptographic_key \
89-
--wa_root /path/to/WhatsApp \
89+
--wa_root /path/to/WhatsApp/storage \
9090
--output /path/to/output \
9191
--dry-run
9292
```
@@ -127,7 +127,7 @@ python3 wa_media_archiver.py \
127127
```bash
128128
python3 wa_media_archiver.py \
129129
--msgstore /path/to/msgstore.db \
130-
--wa_root /path/to/WhatsApp \
130+
--wa_root /path/to/WhatsApp/storage \
131131
--output /path/to/output \
132132
--since 2025-01-01 \
133133
--limit 100 \

0 commit comments

Comments
 (0)