Most Android app developers conduct their testing on a real device by connecting a USB cable linking the PC with an Android device. Often times, testing your app with a local device is better than just running it through a few emulators. The thing is, we’re one step away from charging our device wirelessly, so why should developers, of all people, use old-fashioned cables?
Here’s how to configure the whole thing.
How to Install APK over WiFi Without Any Cable
1. Make sure your PC and Phone are connected to the same WiFi Network. Alternatively, they both should have a Static IP Address.
2. Start Android Studio and leave it running in the background.
3. Open CMD and type adb devices.
Note: If you get “adb is not Recognized as an internal or external command” go to Users\”YourName”\AppData\Local\Android\android-sdk\platform-tools. Once you get there, hold the Shift key, right-click inside the last folder and select Open command window here. Type adb devices again and it should work like a charm.
4. Open up a port by typing adb tcpip 6666.
5. Pick up your phone and go to Settings > Wi-Fi > “Your Network” and copy your IP.
6. Return to PC and type in CMD window adb connect “YOUR IP” (replace this with your IP)
7. Remove USB cable and type adb devices to see whether you’re still connected.
8. Congrats! Now you can test your apps wirelessly.