Overview
The WhatsApp Forensic Tool can run directly on your Android device using Termux, eliminating the need for a PC and ADB. This mode provides superior access to internal storage and system files compared to ADB-based extraction.What is Termux?
Termux is a powerful terminal emulator and Linux environment for Android that provides:- No Root Required: Works on unrooted devices
- Real Linux: Full bash shell with package management
- Python Support: Run Python scripts natively
- Storage Access: Direct filesystem access with proper permissions
- Offline Operation: No PC or internet required after setup
Termux allows the forensic tool to access Android’s internal storage directly, bypassing ADB limitations.
Why Use Termux Mode?
Advantages Over PC/ADB Mode
Direct Storage Access
Access all WhatsApp backup locations including:
/sdcard/WhatsApp/Databases/sdcard/Android/media/com.whatsapp- Internal app directories (with permissions)
No PC Required
Perform forensic analysis entirely on the target device.
Better Performance
No USB transfer overhead—direct filesystem operations.
Portable
Carry the tool on your device for field analysis.
When to Use Termux Mode
- No PC available: On-site forensic analysis
- ADB issues: USB driver problems or ADB failures
- Android 11+: Scoped storage restrictions limiting ADB access
- Root analysis: Combine with root access for deeper inspection
- Privacy: All operations local to device
Installation
Method 1: Deploy from PC (Recommended)
The easiest way is to deploy from your PC using the tool’s built-in deployment feature.Install Termux on Android
IMPORTANT: Install Termux from F-Droid, NOT Google Play Store.
- Download F-Droid: f-droid.org
- Install F-Droid APK
- Open F-Droid → Search “Termux”
- Install Termux and Termux:API (optional)
Enable USB Debugging on Android
On your Android device:
- Settings → About Phone
- Tap “Build Number” 7 times (enables Developer Options)
- Settings → Developer Options
- Enable “USB Debugging”
- Connect device to PC via USB
- Authorize computer when prompted
Select 'Deploy to Termux'
From the main menu:
- Select option 6 (or equivalent): “Deploy to Termux (Downloads)”
- Wait for file transfer to complete
/sdcard/Download/whatsapp-forensic-tool/Method 2: Manual Installation on Termux
If you don’t have PC access:How Termux Mode Works
Environment Detection
The tool automatically detects Termux environment:Launcher Behavior in Termux
Thestart.sh script has special Termux detection:
If you run
start.sh from Downloads, it automatically moves itself to $HOME for proper operation.Storage Access & Permissions
Understanding Termux Storage
Termux has its own isolated filesystem:- Termux Home:
$HOME→/data/data/com.termux/files/home - Shared Storage:
~/storage/→ Symlinks to Android storage - SD Card:
~/storage/shared→/sdcard/
Setting Up Storage Access
Run Storage Setup
~/storage/ with symlinks:~/storage/shared→/sdcard~/storage/downloads→/sdcard/Download~/storage/dcim→/sdcard/DCIM- etc.
WhatsApp Backup Locations Accessible in Termux
The tool searches these paths:Using the Tool in Termux
First Run
Main Menu Differences
In Termux mode:- Scan Devices: Shows “localhost (Termux)” instead of ADB devices
- Dump Backups: Directly accesses filesystem (no ADB pull)
- Deploy to Termux: Option hidden (already running in Termux)
- Device Info: Limited to Termux environment info
Example Workflow
Dump Backups
Select option 2: “Dump Backups from Device”Tool automatically:
- Scans
/sdcard/WhatsApp/Databases - Finds
msgstore.db.crypt14/15files - Copies to
~/whatsapp-forensic-tool/backups/localhost/
Termux-Specific Features
TermuxManager Class
The tool uses a specialized manager for Termux operations:Storage Access Differences
- ADB Mode (PC)
- Termux Mode
Access Method:
adb pullLimitations:- Requires USB debugging
- Android 11+ scoped storage restrictions
- Cannot access
/data/data/without root
/storage/emulated/0/WhatsApp/Databases/storage/emulated/0/Android/media/com.whatsapp
Common Termux Issues
Issue: “Permission denied” when accessing storage
Cause: Storage permissions not granted Solution:Issue: “pkg: command not found”
Cause: Termux not properly installed or corrupted Solution:- Uninstall Termux
- Reinstall from F-Droid (NOT Play Store)
- Run
pkg update
Issue: Python installation fails
Error:E: Unable to locate package python
Solution:
Issue: “No space left on device”
Cause: Termux internal storage full Solution:Issue: “pip install” fails with SSL errors
Cause: Missing SSL certificates or outdated CA bundle Solution:Issue: Tool doesn’t detect Termux environment
Symptom: Tries to use ADB instead of local filesystem Solution:Issue: Cannot find WhatsApp backups
Troubleshooting:Advanced Termux Usage
Running in Background
Keep the tool running even when Termux is backgrounded:Automating Backups
Create a script to auto-copy backups:Accessing Root Files (Rooted Devices)
If your device is rooted:Installing Additional Tools
Useful Termux packages:Termux Workflow Best Practices
Use Persistent Sessions
Use
tmux to keep sessions alive when switching apps.Backup to External Storage
Store backups on SD card to save Termux internal space.
Regular Updates
Keep Termux and packages updated:
Monitor Storage
Check space before operations:
Termux vs ADB: Feature Comparison
| Feature | ADB Mode (PC) | Termux Mode |
|---|---|---|
| Setup Complexity | Medium (USB drivers, ADB) | Easy (install Termux) |
| PC Required | Yes | No |
| Storage Access | Limited (scoped storage) | Full (with permissions) |
| Performance | USB transfer overhead | Direct filesystem |
| Android 11+ Support | Limited | Full |
| Media Extraction | Yes (via ADB pull) | Yes (direct copy) |
| Root Access | Via ADB root | Via tsu (if rooted) |
| Portability | Requires PC setup | Fully portable |
| Network Operation | Possible (ADB over WiFi) | Native |
Next Steps
Quick Start
Learn the basic workflow
Decryption Guide
Understand encryption key formats
Windows Guide
Platform guide for Windows users
Troubleshooting
Advanced troubleshooting
Termux Resources
- Official Wiki: wiki.termux.com
- F-Droid: f-droid.org/packages/com.termux
- Community: r/termux
- GitHub: termux/termux-app
