So I recently upgraded to Windows 10 and also upgrade my OnePlus One to CyanogenMode 12 (Lollipop). Decided I would do a bit of Android development, so I’ve spent most of the weekend trying to locate some ADB drivers which work with my computer and phone. So far I found nothing.
After trying a number of different versions of the Samsung drivers, following countless guides and shaking my phone very hard, I noticed an option on the phones Developer options called ADB over network. My first thoughts were “this was too good to be true”, but lo and behold, after some investigation it’s far easier than locating and installing drivers which allow me to connect my OnePlus One to my Windows machine for ADB debugging (although, brain surgery is probably easier than that).
So here is how you do it.
Add ADB to your system path
The first step is to add the adb.exe file to your Windows system path. (Don’t worry, it sounds more complicated than it is).
Get the SDK location
First, launch Android Studio. (If you don’t already have it, download it from here).
Now navigate to Tools > Android > SDK Manager to load the SDK Manager.
Take note of (copy) the Android SDK Location at the top of the Default Settings screen.
Add the SDK location/platform-tools to your system path
Now right click the start button and select System to load the System Settings.
Select Advanced system settings.
Click on Environment Variables near the bottom of the System Properties box.
Locate Path from the System Variables section. Single click the row and select Edit…
Be careful not to change any of the other text. Add a semicolon (;) to the end of the line, and paste the SDK path you copied earlier followed by “/platform-tools”. Then click OK on the Edit System Variable screen, Environment Variables screen, System Properties screen and close the System screen.
Enable ADB over network on your OnePlus One
The next step is to enable ADB over network. Before you continue, make sure your Android device and computer are connected to the same network.
First, open the phones Settings.
Scroll down the settings and select Developer options. (Note: if you don’t see this option, then select About Phone and then tab Build number repeatedly to activate developer mode).
Ensure that Developer options is set to On.
Scroll down the Android debugging section and turn on Android debugging. Then tap ADB over network.
Read the warning and tap OK if you wish to continue.
ADB over network should now be enabled. Take note of the IP address and port that appears in settings (you will need this in the next step).
Connect ADB to the device over the network
Now open Command Prompt (I use cmder in the screenshots below, but it’s the same as windows Command Prompt) and type the following command to check you added ADB to your system path correctly:
If you followed the Add ADB to your system path section correctly the output will look something like this
Now type the following command replacing <ip_address> with the IP and port number noted down previously:
adb connect <ip-address>
If done correctly, the output will look something like this:
Run your project in Android Studio
Finally, open a project in Android Studio, and click Run.
You should see your OnePlus One as a device in the list.
Thank you for reading, I hope you found this useful!