A powerful command-line tool for capturing Android screenshots and screen recordings directly to your local machine without third-party apps or manual transfers.
- Instant Screenshots: Capture Android device screens with a single command
- Screen Recording: Record device activity for specified durations
- App Targeting: Launch and capture specific apps by package name
- Background Blur Testing: Special mode for security testing of app preview blurring
- No Third-Party Apps: Uses built-in Android tools, no app installation needed
- Local Storage: Files saved directly to your computer, no cloud uploads
- Emulator Support: Works with Android emulators including Corellium devices
- Streamlined Workflow: Capture screenshots and recordings without interrupting your development flow
- Documentation: Easily create visual documentation for your apps
- Bug Reporting: Capture and share visual evidence of issues
- Demo Creation: Record app demos directly from your development environment
- Automation Friendly: Integrate into testing scripts easily
- Background Blur Testing: Test if sensitive apps properly blur content in the app switcher view
- POC Collection: Capture proof of security findings actual pain point of mine for creating this tool
- Works on Emulators: Test on platforms where manual screenshots are difficult (like
Corellium
)
- Python 3.6+
- Android Debug Bridge (ADB) installed and set to your PATH
- USB debugging enabled on your Android device
- Connected Android device or emulator
pip3 install snapdroid
-
Clone this repository:
git clone https://github.com/dr34mhacks/snapdroid.git cd snapdroid
-
Install the package:
# Method A: Using the installation script ./install.sh # Method B: Using pip directly pip install -e .
Make sure ADB is installed:
- macOS:
brew install android-platform-tools
- Linux:
apt install adb
- Windows: Download from developer.android.com
Connect your Android device and enable USB debugging
SnapDroid - Android Screenshot and Screen Recording Tool
options:
-h, --help show this help message and exit
--screenshot, -ss Capture a screenshot
--screenrecord, -sr SCREENRECORD
Record the screen for specified seconds
--out OUT Output directory for saved files (default: current directory)
--background Navigate to app switcher before capturing (pentest app preview blur test)
--package PACKAGE Specify the target app package name (optional override for foreground app detection)
--delay DELAY Delay in seconds after navigating to app switcher (default: 1)
--examples Show usage examples
--version Show version information
Take a screenshot:
snapdroid -ss

Record the screen for 10 seconds:
snapdroid -sr 10

Save to a specific directory:
snapdroid -ss --out ~/Screenshots
Capture a specific app by package name:
snapdroid -ss --package com.example.app
Test background blur in app switcher:
snapdroid -ss --background

Record a specific app for 5 seconds:
snapdroid -sr 5 --package com.example.banking.app
Show all examples:
snapdroid --examples

Show version information:
snapdroid --version
SnapDroid Video Demonstration:
Many apps containing sensitive information should implement proper blurring when shown in the app switcher (recent apps) view. SnapDroid makes it easy to test this security feature:
-
Launch the target app:
snapdroid -ss --package com.example.banking.app --background
-
SnapDroid will:
- Launch the specified app
- Navigate to the app switcher
- Capture a screenshot
- Save it locally for analysis
-
Examine the screenshot to verify proper content blurring
This is particularly useful on emulators like older Corellium devices where taking screenshots of the app switcher can be challenging through normal means.
No device detected:
- Ensure USB debugging is enabled on your device
- Check connection with
adb devices
- Try restarting ADB with
adb kill-server && adb start-server
Permission denied errors:
- Make sure your device has authorized the ADB connection
- Check for permission prompts on your device
App won't launch:
- Verify the package name is correct
- Try launching the app manually first
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Created by @dr34mhacks - feel free to contact me!