Recover files from corrupted, damaged, or formatted flash drives and storage devices with a modern, user-friendly Python tool.
- Features
- Screenshots
- Installation
- Quick Start
- Usage
- How It Works
- Output Structure
- Supported File Types
- Performance
- Troubleshooting
- Advanced Usage
- Limitations
- Legal & Contributing
- Support
- Raw Disk Scanning: Low-level scan for file signatures
- File Signature Detection: 20+ file types (JPEG, PNG, PDF, DOC, MP3, ZIP, etc.)
- Deleted File Recovery: Recover files after deletion or formatting
- Progress Tracking: Real-time progress bar
- Comprehensive Logging: Detailed logs for every operation
- User Interface: GUI (tabbed) & CLI for advanced users
- Drive Analysis: File system health & corruption checks
- Recovery Reports: JSON reports of recovered files
- Multi-platform: Windows, Linux, macOS
- Large File Handling: Efficient, chunked processing
- File Verification: MD5 hash for recovered files
- Batch Processing: Recover multiple types at once
- Cancellable: Stop recovery anytime
git clone https://github.com/geloxh/Advance-Driver-Recovery-Tool
cd File-Name
pip install -r requirements.txt
python main.pyPrerequisites:
- Python 3.7+
- Administrator/root privileges (for raw disk access)
Install dependencies:
pip install -r requirements.txtWindows users:
pip install pywin32More info: pywin32 on PyPI
python main.pyTabs:
- File Recovery
- Drive Analysis
- Recovery Log
python main.py --cliSteps:
- Select drive
- Choose output directory
- Monitor progress
Uses a database of magic numbers to identify file types:
FILE_SIGNATURES = {
b'\xFF\xD8\xFF': {'ext': '.jpg', 'name': 'JPEG Image'},
b'\x89\x50\x4E\x47': {'ext': '.png', 'name': 'PNG Image'},
b'\x25\x50\x44\x46': {'ext': '.pdf', 'name': 'PDF Document'},
# ... and many more
}- Drive detection
- Raw scanning (1MB chunks)
- Signature matching
- File extraction
- Verification (checksum)
- Reporting (JSON)
- Detects corruption, permission, and accessibility issues
- Checks free space
- Read-Only: Never writes to source drive
- Safe Recovery: Output to separate location
- Original Data Preserved
- Robust Error Handling: Graceful failures, detailed logs, user-friendly messages
Recovered Files:
recovered_000001_20231201_143022.jpg
recovered_000002_20231201_143023.pdf
recovered_000003_20231201_143024.mp3
Recovery Report (JSON):
{
"recovery_session": {
"timestamp": "2023-12-01T14:30:22",
"total_files_recovered": 150,
"output_directory": "./recovered_files"
},
"recovered_files": [...],
"file_type_summary": {
"by_type": {
"JPEG Image": {"count": 45, "total_size": 15728640},
"PDF Document": {"count": 12, "total_size": 8388608}
}
}
}| Category | File Types | Extensions |
|---|---|---|
| Images | JPEG, PNG, GIF, BMP, TIFF | .jpg, .png, .gif, .bmp, .tiff |
| Documents | PDF, MS Office, RTF | .pdf, .doc, .rtf |
| Audio | MP3, WAV | .mp3, .wav |
| Video | MP4 | .mp4 |
| Archives | ZIP, RAR, 7-Zip | .zip, .rar, .7z |
| Executables | Windows PE, Linux ELF | .exe, .elf |
- Memory Efficient: 1MB chunks, configurable
- Fast: Multi-threaded scanning (GUI), optimized matching
- Large Drive Support: Handles multi-TB drives, file size limits
- Future: Resumable operations planned
Permission Denied
- Run as Administrator (Windows) or with sudo (Linux/Mac)
- Ensure drive is not in use
No Files Recovered
- Drive may be severely corrupted or physically damaged
- Try other recovery tools
Slow Performance
- Large drives take time
- Scan specific partitions
- Use SSD for output
Error Messages
- "Cannot access drive": Disconnected, permissions, or hardware failure
- "No file signatures found": Encrypted, severe corruption, or wrong drive
Extend FILE_SIGNATURES:
FILE_SIGNATURES[b'\x50\x4B\x03\x04'] = {'ext': '.docx', 'name': 'Word Document'}Script for multiple drives (Linux/Mac):
for drive in /dev/sd*; do
python main.py --cli --drive $drive --output ./recovery_$drive
donefrom main import FlashDriveRecovery
recovery = FlashDriveRecovery()
count = recovery.scan_raw_disk('/dev/sdb1', './output')
report = recovery.generate_recovery_report('./output')- Cannot recover overwritten data
- File fragmentation may cause incomplete recovery
- Encrypted files remain encrypted
- Some proprietary formats may not be recognized
- Physical drive damage may prevent access
- Only use on drives you own or have explicit permission to access
- Respect privacy and data protection laws
- Do not use for unauthorized data access
- Consider professional data recovery services for critical data
- Fork the repository
- Create a feature branch
- Add comprehensive tests
- Submit a pull request
- Research the file signature (magic number)
- Add to
FILE_SIGNATURESdictionary - Test with sample files
- Update documentation
This tool is provided for educational and legitimate data recovery purposes. Users are responsible for compliance with applicable laws and regulations.
For issues and questions:
- Check the troubleshooting section
- Review the logs for error details
- Ensure you have the latest version
- Consider professional data recovery services for critical data
Disclaimer: This tool is provided as-is without warranty. Always backup important data and use professional data recovery services for critical situations.