-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated Windows abd command - Create new Linux & MacOS releases - Allows you start/stop Bluetooth and WiFi services remotely - Improved README docs
- Loading branch information
Hifumi
committed
Jun 30, 2022
1 parent
186e5a4
commit 703979a
Showing
3 changed files
with
133 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,5 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
releases/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,60 @@ | ||
# Droid | ||
Droid is a remote communications script created to communicate with an Android device on the local network over the Android debug bridge (adb) in a much easier way | ||
Droid is a remote communications script created to communicate with Android devices on the local network over the Android debug bridge (adb) | ||
|
||
NOTE: Script does require Android platform tools (adb) to be installed | ||
NOTE: Script does require Android debug bridge (adb) to be installed before | ||
|
||
First release is now available! Versions for Linux and macOS are currently available. | ||
|
||
## Usage | ||
```bash | ||
python3 droid.py -ip 127.0.0.1 | ||
./droid -ip 127.0.0.1 | ||
``` | ||
|
||
## Options | ||
``` | ||
-ip, --ip_address | IP address of the Android device | ||
-up, --upload | Name & location of the APK to upload (ex: ~/Downloads/ApkName.apk) | ||
-rm, --remove | Removes the old APK with the same package name | ||
-c, --connect | Connects to 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 (ex: com.android.ui) | ||
-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 | ||
-ps, --push | Name & location of the file on your local machine | ||
-loc, --location | Location on the Android device to push or remove the selected file | ||
-rmf, --file | Remove a specified file from the Android device | ||
-f, --file | Name of the file on your local machine (ex: ~/Downloads/ApkName.apk) | ||
-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 | ||
``` | ||
|
||
I would recommend running this command before doing anything else to confirm you can successfully connect to the Android device on your network | ||
```bash | ||
python3 droid.py -ip 127.0.0.1 -c | ||
./droid -ip 127.0.0.1 -c | ||
``` | ||
|
||
## Example(s) | ||
This example connects to the Android device (127.0.0.1 is an example), removes the specified APK package (`com.android.ui`), and then uploads a new APK called `test_apk_v1.apk` | ||
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` | ||
```bash | ||
./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) | ||
```bash | ||
./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: | ||
```bash | ||
python3 droid.py -ip 127.0.0.1 -c -rm -p com.android.ui -up ~/Downloads/test_apk_v1.apk | ||
./droid -ip 127.0.0.1 -d | ||
``` | ||
|
||
This example connects to the Android device (127.0.0.1 is an example) and downloads an image | ||
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): | ||
```bash | ||
python3 droid.py -ip 127.0.0.1 --download /sdcard/cool_pic.png | ||
./droid -ip 127.0.0.1 -bl=start | ||
``` | ||
|
||
Once you're finished working within the Android environment, you can run this command to disconnect: | ||
You can `stop` the service by running this command (starting the service uses the `start` argument): | ||
```bash | ||
python3 droid.py -ip 127.0.0.1 -d | ||
./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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters