This Kotlin script demonstrates how to connect to an Android device using the Android Debug Bridge (ADB) tool. The script has been tested and is working on Android versions 10, 11, 12 and 13.
Usage Clone the repository or copy the script to your machine. Modify the deviceIp variable in the script to match the IP address of your Android device. Modify the adbPath variable in the script to match the path to the ADB executable on your machine. Open a terminal and navigate to the directory where the script is located. Run the script using the command kotlin .kt.
Notes This script requires Kotlin to be installed on your machine. You can download it from the official Kotlin website. You must have ADB installed on your machine and the adb executable must be in your system PATH. This script requires ADB to be installed on your machine. You can download it via termux buy doing the command pkg install adb. Make sure that your Android device is connected to the same network as your machine and that ADB debugging is enabled on the device. This script is provided as-is and the author accepts no responsibility for any damage or loss of data that may occur from using it. Author This script was written by Taylor Christian Newsome (Twitter @ClumsyLulz).
For more information on the author, please visit Twitter.com/ClumsyLulz or navigate to ObsidianIntel.com.