This tool automatically detects Android devices advertising ADB services over the network and establishes an ADB connection without user intervention. It's designed to run in the background, making it perfect for developers who frequently connect to Android devices for debugging or automation tasks.
This tool was developed to automate the task of launching a scrcpy window for the user's phone. It likely has other use cases, but it was not developed with those in mind.
- Automatic Device Detection: Automatically detects when the configured Android device is advertising its ADB service over the network.
- Seamless Connection: Establishes an ADB connection to the detected device without requiring manual input.
- Custom Script Execution: Optionally runs a custom script upon successfully connecting to the device, allowing for automated task execution (In my case this is a scrcpy-noconsole window).
- Background Operation: Runs silently in the background, without opening a terminal window.
- Windows Defender (and probably other antivirus software) does not like the exe, and doesn't permit it to execute.
- ADB installed and added to your system's PATH.
- An Android device.
- Familiarity with Android developer settings.
Download the latest release. The process runs from a standalone executable, there is no installation.
Run the executable. It is a command line tool and when launched without options it will create a terminal wizard to configure the android device and to automate its own startup.
If you choose to automate the connection you will be asked to specify a command to run when the connection is made, in my case the command is scrcpy-noconsole
This was created using pyinstaller on python 3.9.13
- Clone the repository.
- Install packages:
pip install -r requirements.txt
- Run PyInstaller with the script:
pyinstaller --onefile --hidden-import=zeroconf._utils.ipaddress --hidden-import=zeroconf._handlers.answers -w .\AutoADB.py
This project is licensed under the MIT License - see the LICENSE file for details.