Skip to main content

Droid is a remote communication application created to communicate with Android devices on the local network over the Android debug bridge (adb). Available as a CLI or GUI.

Project description

Droid

Droid is a remote communication application created to communicate with Android devices on the local network over the Android debug bridge (adb). Droid allows you to completely control the Android device using multiple options, including a CLI and a GUI.

IMPORTANT NOTE: Script does require Android debug bridge (adb) to be installed on the system.

Install

Droid can be installed via pip:

pip install droid

Simple usage

droid -ip 127.0.0.1 -c

Options

-h,   --help	    |	Help menu
-v,   --version	    |	Version information for Droid
-ip,  --ip_address  |   IP address of the Android device
-up,  --upload      |   Absolute path of the APK to upload (ex: ~/Downloads/ApkName.apk)
-rm,  --remove      |   Removes the old APK with the same package name (requires the -p flag)
-c,   --connect     |   Connects to the Android device (requires the -ip flag)
-d,   --disconnect  |   Disconnects from the Android device
-r,   --reboot      |   Remotely reboots the Android device
-p,   --package     |   The package name of the APK you would like to replace (ex: com.android.ui)
-dn,  --download    |   Download a file from the Android device
-f,   --file        |   Name of the file on your local machine (ex: ~/Downloads/ApkName.apk)
-fs,  --file_system |   Name & location of the file on the Android device
-loc, --location    |   Location on the Android device to push or remove the selected file (ex: /sdcard/Downloads)
-rmf, --rmfile      |   Remove a file from the Android device (set the absolute path using -loc)
-bl,  --bluetooth   |   Start or stop bluetooth service for the Android device
-w,  --wifi         |   Start or stop wifi service for the Android device
-s,  --screenshot   |   Take a screenshot of the current Android screen
-o,  --output       |   Name of the output file when taking a screenshot (omit the extension)
-l,  --log          |   Outputs Logcat logs in real time to a set file
-g,  --gui          |   A graphical user interface built to communicate with an Android device
-co   --content     |   Update a file on the Android device without downloading it

I would recommend running this command before doing anything else to confirm you can successfully connect to the Android device on your network

droid -ip 127.0.0.1 -c

Example(s)

This example connects to the Android device (127.0.0.1), removes the specified APK package (com.android.ui), and then uploads a new APK called test_apk_v1.apk

droid -ip 127.0.0.1 -c -rm -p com.android.ui -up ~/Downloads/test_apk_v1.apk

This example downloads a test images from the Android device onto your local machine (automatically saves it in the ~/Downloads folder on most platforms)

droid -ip 127.0.0.1 --download /sdcard/cool_pic.png

Once you're finished working within the environment, you can run this command to disconnect from the Android device:

droid -ip 127.0.0.1 -d

We now have the option to control the bluetooth service on Android devices. You can start the service by running this command (stopping the service uses the stop argument):

droid -ip 127.0.0.1 -bl=start

You can stop the service by running this command (starting the service uses the start argument):

droid -ip 127.0.0.1 -w=stop

NOTE: When turning the wifi off, if you are communicating with the Android device remotely, this will result in the device being disconnected and unusable until the network is re-established.

This command will take a screenshot of the current Android screen while monitoring Logcat in real-time:

droid -ip 127.0.0.1 -sl -o screenshot

GUI

You can now double-click the Droid icon to run it on most platforms

If you would like to run the GUI, you can run this command to boot it up. Almost all CLI options are available in the GUI:

droid

# or

droid -g

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

droid-1.4.21.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

droid-1.4.21-py3-none-any.whl (13.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page