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.json file 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 adb to 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

  1. Clone or download the repository containing this script.
  2. Ensure devices.json is in the same directory.
  3. Run the script:
    python script_name.py
    
  4. Follow the on-screen instructions to select a device and perform actions.

How to Use

  1. Device Selection:

    • Select a device from the dropdown menu populated using devices.json.
  2. Unlock Device:

    • Click the "Unlock Device" button to unlock the selected device.
  3. 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.
  4. Screen Mirroring:

    • Set the maximum FPS for Scrcpy (optional).
    • Click "Start scrcpy" to mirror and control the device screen.
  5. 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 Pythons standard library:

  • json
  • subprocess
  • os
  • tkinter

No External Python Packages Required

All required modules come bundled with Python. However, ensure:

  • adb is installed and on your PATH.
  • scrcpy is 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 devices lists it.

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
No description provided
Readme 31 KiB
Languages
Python 92.4%
Shell 7.6%