ADB Unlock, Screenshot & Scrcpy Tool
A user-friendly Python GUI application for managing Android devices. This tool allows you to unlock devices, take screenshots, mirror the device screen, and transfer photos with drag-and-drop functionality.
Features
- Unlock Devices: Easily unlock an Android device using ADB.
- Take Screenshots: Capture and save screenshots from the connected Android device.
- Screen Mirroring: Use Scrcpy for real-time screen mirroring and control.
- Photo Transfer: Drag and drop photos to transfer them to the connected device.
Requirements
Software
- Python 3 (with Tkinter installed):
- Tkinter comes bundled with most Python installations. If not, install it using the instructions below.
- ADB (Android Debug Bridge): Ensure it is installed and added to your system PATH.
- Scrcpy: Install and add it to your system PATH for screen mirroring.
- Devices Configuration: Create a
devices.jsonfile in the same directory as the script to store device serials.
Example devices.json:
{
"devices": [
"emulator-5554",
"emulator-5556",
"device_serial_1",
"device_serial_2"
]
}
Tkinter Installation (if not already installed)
- Debian/Ubuntu:
sudo apt-get install python3-tk - macOS (Homebrew):
brew install python-tk(Tkinter is usually included by default). - Windows: Tkinter is typically included in the official Python installer.
Installation of ADB and Scrcpy
- ADB:
- Download the Android SDK Platform Tools from Google.
- Add the folder containing
adbto your system PATH.
- Scrcpy:
- Installation instructions for various platforms can be found on the Scrcpy GitHub page.
- Add the Scrcpy binary to your system PATH.
How to Run
- Clone or download the repository containing this script.
- Ensure
devices.jsonis in the same directory. - Run the script:
python script_name.py - Follow the on-screen instructions to select a device and perform actions.
How to Use
-
Device Selection:
- Select a device from the dropdown menu populated using
devices.json.
- Select a device from the dropdown menu populated using
-
Unlock Device:
- Click the "Unlock Device" button to unlock the selected device.
-
Take Screenshot:
- Enter a name for the screenshot (e.g.,
screenshot.png). - Click the "Take Screenshot" button to save the screenshot to the default folder.
- Enter a name for the screenshot (e.g.,
-
Screen Mirroring:
- Set the maximum FPS for Scrcpy (optional).
- Click "Start scrcpy" to mirror and control the device screen.
-
Photo Transfer:
- Drag and drop a photo file into the input field or manually provide its path.
- Click "Push Photo" to transfer the photo to the device.
Dependencies
This project relies only on Python’s standard library:
jsonsubprocessostkinter
No External Python Packages Required
All required modules come bundled with Python. However, ensure:
adbis installed and on your PATH.scrcpyis installed and on your PATH.
Troubleshooting
- ADB or Scrcpy Commands Not Found:
- Ensure ADB and Scrcpy are installed and added to your system PATH.
- Tkinter Module Not Found:
- Follow the installation instructions for your operating system to install Tkinter.
- Device Not Listed:
- Ensure the device is connected and
adb deviceslists it.
- Ensure the device is connected and
Contributing
Feel free to submit issues or contribute improvements to the project. Fork the repository and submit a pull request with your changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Description
Languages
Python
92.4%
Shell
7.6%