I am developing an app for Android that controls a robot using the FTC SDK, and I need to be able to make small changes to motor values in the code and re-install it to test the new code. My problem is that I need to do this a lot of times, and the system of taking the phone out of the mount (which takes a while) and plugging it into my computer to upload, waiting for it to upload, turning off the power to the robot, plugging the phone back in to the robot, and turning the power back on has started slowing our progress down a lot. I was wondering if there was any way I could install the new code on the phone without taking it out of the mount.
Our phone is connected to a usb hub with a webcam and the hardware controller, so I was wondering if attaching a wireless usb transmitter to the hub and my computer would still let the phone show up on the android studio connections manager and let me install it.
So if anyone has done this before, or knows about any way to make this work, thank you for the help!
Asked
Active
Viewed 2,160 times
3

Beckett O'Brien
- 176
- 2
- 16
-
1Possible duplicate of [Run/install/debug Android applications over Wi-Fi?](https://stackoverflow.com/questions/4893953/run-install-debug-android-applications-over-wi-fi) – Nikos Hidalgo Nov 15 '19 at 16:25
-
1@NikosHidalgo Thank you for the response! I wasn't able to find that post, but I will try it. I forgot to add that the phone is running in wifi direct mode, and I don't know if this will still work, but I will check. Thank you! – Beckett O'Brien Nov 15 '19 at 16:43
-
1I only thought of that thread because I have referred to it again in the past. Hopefully it works in your case as well! – Nikos Hidalgo Nov 15 '19 at 16:51
-
1i would just create an APK and use bluetooth to send it to the device, then just install it, it will save you from using android studio to install the app. Or send it through mail, slack etc if you have wifi access. – Nigel Brown Nov 15 '19 at 17:55
-
1Thank you for the suggestion, someone on the FTC subredit suggested this guide: https://blog.jcole.us/2017/04/13/wireless-programming-for-ftc-robots/ – Beckett O'Brien Nov 15 '19 at 20:32
1 Answers
3
Yes. First make sure that the robot phone has developer mode and USB debug enabled.
(Do this by going to settings -> software info and click on build number ten times, then go settings -> developer options and enable USB Debug)
Then, go into the robot controller phone and under the three dots at the top right select program and manage. Connect your computer to the shown internet name and password.
Next if you are on Windows plug in the phone and run the following code in command prompt,
pushd "%userprofile%\AppData\Local\Android\sdk\platform-tools"
adb disconnect
adb tcpip 5555
adb connect 192.168.49.1
popd
PAUSE
If you are on Mac plug in the device and run the following code in terminal,
cd ~/Library/Android/sdk/platform-tools
./adb disconnect
./adb tcpip 5555
./adb connect 192.168.49.1:5555
Finally, disconnect the phone, go back to android studio and happy wireless coding.

Nick227889
- 81
- 6