Wireless Deploying & Debugging
Getting debug information or deploying to your Smartphone while it is in the Gear VR Headset is impossible due to the only USB port being used by the Gear VR Headset.
However, you can work around this issue by using your Smartphone's Wi-Fi connection to send debug information to your development PC.
You can even deploy projects in this manner; however, it is extremely slow when compared to using the USB cable.
In the following section, we will cover all you need to know about setting up your Smartphone so that it can send debug information and be deployed over Wi-Fi.
Please note that for this to work, you have to have your development PC and Galaxy Note 4 on the same network.
Next, open up a Windows Command Shell by first pressing the Windows Key + R and then entering CMD in the Run dialogue box that is opened.
Then press either the Enter key on your keyboard or just click on the OK button with your mouse.
Once the OK button has been toggled, a Windows Command Line window like the following should now be displayed.
Now, enter the following command to see what your Smartphone's IP address is and make sure to take note of it. The IP address you want to use is the one that comes after inet.
adb shell ip -f inet addr show wlan0
Next, enter the following command to change the network connection to TCP and set the port that it should be listening to.
adb tcpip 5555
Once the port has been set, it is now time to connect to the Smartphone by entering the following command and pressing the Enter key.
adb connect 000.000.000.000 - Replace with your devices IP Address.
You should now see a message that says connected to with the IP address of your device.
To make sure you are connected to Wi-Fi, enter adb devices into the command line window and press the Enter key, and you will now see that in the List of devices attached the IP Address used above is now the only attached device.
With your Smartphone and PC now connected to one another via the network, you can now begin to get debug information from your Smartphone or even deploy projects to your phone without having to use the USB cable.
However, keep in mind that deploying to your Smartphone from your PC over the network is slower than using the USB cable.