Overview
The WhatsApp Forensic Tool runs natively on Linux and macOS using the start.sh launcher script. The tool automatically handles Python installation (on Linux), virtual environment setup, and ADB configuration.
Prerequisites
Linux Requirements
Distribution : Any modern Linux distribution (Ubuntu, Debian, Fedora, Arch, etc.)
Python : 3.8 or higher (auto-installed on Debian/Ubuntu systems)
Package Manager : apt, yum, pacman, or equivalent
USB Support : libusb (usually pre-installed)
Permissions : User account with sudo privileges (for Python/ADB installation)
macOS Requirements
macOS Version : 10.13 (High Sierra) or later
Python : 3.8+ (install via Homebrew)
Homebrew : Package manager for installing dependencies
Xcode Command Line Tools : For development tools
The start.sh script automatically detects your OS and adapts accordingly.
Installation
Linux Installation
Ubuntu/Debian
Fedora/RHEL
Arch Linux
Clone Repository
git clone https://github.com/cedroid/whatsapp-forensic-tool.git
cd whatsapp-forensic-tool
Run Launcher
bash start.sh
# or
./start.sh
The script will automatically:
Detect if Python 3 is installed
Install Python 3 via apt if missing (requires sudo)
Create virtual environment
Install dependencies
Launch the application
Auto-Installation Command :# What start.sh runs if Python is missing:
sudo apt-get update && sudo apt-get install -y python3 python3-venv python3-pip
Install Git & Python
sudo dnf install -y git python3 python3-pip python3-virtualenv
Clone and Run
git clone https://github.com/cedroid/whatsapp-forensic-tool.git
cd whatsapp-forensic-tool
chmod +x start.sh
./start.sh
Install Dependencies
sudo pacman -S git python python-pip
Clone and Run
git clone https://github.com/cedroid/whatsapp-forensic-tool.git
cd whatsapp-forensic-tool
chmod +x start.sh
./start.sh
macOS Installation
Install Homebrew (if not installed)
/bin/bash -c "$( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Python 3
macOS Monterey+ includes Python 3, but Homebrew version is recommended for latest features.
Clone Repository
git clone https://github.com/cedroid/whatsapp-forensic-tool.git
cd whatsapp-forensic-tool
Run Launcher
chmod +x start.sh
bash start.sh
If the script fails, ensure you have Xcode Command Line Tools:
How start.sh Works
The launcher script performs intelligent platform detection:
#!/bin/bash
# 1. Detect Environment (NOT Termux)
if [[ " $OSTYPE " == "linux-gnu" * ]]; then
# Linux detected
elif [[ " $OSTYPE " == "darwin" * ]]; then
# macOS detected
fi
# 2. Check Python 3 Installation
if ! command -v python3 & > /dev/null; then
# Attempt auto-install on Linux
sudo apt-get update && sudo apt-get install -y python3 python3-venv python3-pip
fi
# 3. Create Virtual Environment
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
# 4. Activate Virtual Environment
source venv/bin/activate
# 5. Install Dependencies
pip install -r requirements.txt
# 6. Launch Application
python main.py
The virtual environment isolates dependencies, preventing conflicts with system Python packages.
Permission Issues
chmod: Permission Denied
Issue : Can’t make start.sh executable
Solution :
# Check file ownership
ls -la start.sh
# Take ownership if needed (Linux)
sudo chown $USER : $USER start.sh
chmod +x start.sh
# Or run with bash directly
bash start.sh
Script Execution Blocked
macOS Issue : “start.sh cannot be opened because it is from an unidentified developer”
Solution :
# Remove quarantine attribute
xattr -d com.apple.quarantine start.sh
# Or run with bash
bash start.sh
ADB Installation
Automatic Download
The tool auto-downloads ADB platform tools:
Downloads from: https://dl.google.com/android/repository/platform-tools-latest-linux.zip
Extracted to: adb/platform-tools/adb Downloads from: https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
Extracted to: adb/platform-tools/adb
Package Manager Installation
Alternatively, install ADB via package manager:
Ubuntu/Debian
Fedora
Arch Linux
macOS (Homebrew)
sudo apt-get update
sudo apt-get install -y android-tools-adb android-tools-fastboot
Verify ADB Installation
# Check if ADB is accessible
which adb
adb version
# Start ADB server
adb start-server
# List connected devices
adb devices
Expected output:
List of devices attached
ABC123XYZ device
USB Permissions (Linux)
Understanding udev Rules
Linux requires udev rules for non-root ADB access.
Without proper udev rules, you’ll need to run ADB as root (not recommended).
Setting Up USB Permissions
Create udev Rules File
sudo nano /etc/udev/rules.d/51-android.rules
Add Device Rules
Add these lines (covers most manufacturers): # Google/Pixel/Nexus
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
# Xiaomi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", GROUP="plugdev"
# OnePlus
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev"
# Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
# HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
For other manufacturers, find the vendor ID using lsusb with device connected.
Set Permissions
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Add User to plugdev Group
sudo usermod -aG plugdev $USER
Log out and log back in for group membership to take effect.
Reload udev Rules
sudo udevadm control --reload-rules
sudo udevadm trigger
Restart ADB Server
adb kill-server
adb start-server
adb devices
Finding Device Vendor ID
If your device isn’t recognized:
# Connect device and run:
lsusb
# Example output:
# Bus 001 Device 010: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device
# ^^^^ This is the vendor ID
# Add to udev rules:
SUBSYSTEM = ="usb", ATTR {idVendor}== "18d1" , MODE="0666", GROUP="plugdev"
macOS Security & Permissions
System Integrity Protection (SIP)
macOS SIP may restrict certain operations:
If encountering permission errors :
Grant Terminal Full Disk Access :
System Preferences → Security & Privacy → Privacy
Full Disk Access → Add Terminal.app
Allow ADB Connections :
First ADB connection will prompt for permission
Click “Allow” in System Preferences
Gatekeeper Issues
Error : “adb cannot be opened because the developer cannot be verified”
Solution :
# Remove quarantine from ADB directory
xattr -dr com.apple.quarantine adb/
# Or approve in System Preferences
# Security & Privacy → General → "Allow Anyway"
Common Unix Issues
Issue: “python3: command not found”
Linux (Debian/Ubuntu)
Linux (Fedora)
macOS
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv
sudo dnf install -y python3 python3-pip
# Install Homebrew first, then:
brew install python3
Issue: “venv: command not found”
Cause : Missing python3-venv package (Linux)
Solution :
# Ubuntu/Debian
sudo apt-get install -y python3-venv
# Fedora
sudo dnf install -y python3-virtualenv
# Then retry start.sh
./start.sh
Issue: “No devices found” (Linux)
Troubleshooting Steps :
Check USB Connection
lsusb | grep -i android
# or
lsusb | grep -i samsung # or your device brand
Device should appear in the list.
Verify udev Rules
ls -la /etc/udev/rules.d/51-android.rules
cat /etc/udev/rules.d/51-android.rules
Check User Groups
groups $USER
# Should include "plugdev"
If not: sudo usermod -aG plugdev $USER
# Log out and back in
Restart ADB as Non-Root
# Kill any root ADB instances
sudo adb kill-server
# Start as regular user
adb start-server
adb devices
Check USB Debugging Authorization
Look at your phone screen
Tap “Allow” when prompted to authorize computer
Check “Always allow from this computer”
Issue: “Permission denied” when accessing device
Cause : Incorrect udev rules or missing group membership
Solution :
# Check current permissions
adb devices
# If showing "no permissions"
# 1. Fix udev rules (see USB Permissions section)
# 2. Ensure user in plugdev group:
sudo usermod -aG plugdev $USER
# 3. Log out and back in
# 4. Restart ADB
adb kill-server
adb start-server
adb devices
Issue: Virtual environment activation fails
Error : source: venv/bin/activate: No such file or directory
Solution :
# Remove corrupted venv
rm -rf venv
# Recreate
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
Issue: “pip: command not found” in venv
Cause : Virtual environment not properly created
Solution :
# Install pip for system Python first
# Ubuntu/Debian:
sudo apt-get install -y python3-pip
# macOS:
brew install python3 # includes pip
# Then recreate venv:
rm -rf venv
python3 -m venv venv
source venv/bin/activate
Issue: macOS “SSL: CERTIFICATE_VERIFY_FAILED”
Cause : Python installed without SSL certificates
Solution :
# For Homebrew Python:
brew reinstall python3
# For Python.org installer:
cd "/Applications/Python 3.x/"
sudo "./Install Certificates.command"
Package Manager Differences
Installing ADB Across Distributions
Debian/Ubuntu sudo apt-get install android-tools-adb
Fedora/RHEL sudo dnf install android-tools
Arch Linux sudo pacman -S android-tools
macOS (Homebrew) brew install android-platform-tools
Advanced Usage
Running Without start.sh
For manual control:
# Create and activate venv manually
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run application
python main.py
# Deactivate venv when done
deactivate
Running with System Python (Not Recommended)
# Install dependencies globally
pip3 install --user -r requirements.txt
# Run with system Python
python3 main.py
Using system Python can cause dependency conflicts. Virtual environments are strongly recommended.
ADB over WiFi (Advanced)
Find Device IP
adb shell ip addr show wlan0 | grep inet
Connect Wirelessly
adb connect 192.168.1.XXX:5555
adb devices
Disconnect USB cable. Device should remain connected.
Use Fast Storage Store backups on SSD/NVMe for faster I/O.
Adjust USB Autosuspend Disable USB autosuspend for stable connections: # Disable for current session
echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend
Monitor Resource Usage Use htop to monitor Python/ADB resource usage.
Next Steps
Quick Start Guide Learn the basic workflow
Windows Guide Platform guide for Windows users
Android/Termux Guide Run directly on Android without PC
Troubleshooting Advanced troubleshooting guide