28 May 2020: We’ve updated the article with some new details and 2 whole new sections!
This article is a continuation of Getting Unity Remote for Android to work on Windows. If you haven’t read that, I suggest you take a look at the article and make sure that Android Build Support (and its accompanying Unity-native SDK, NDK and JDKs) is installed, and that you have tried installing the Google USB Driver.
There are also some simple troubleshooting tips listed in that article that you should try first, before you attempt the ones here.
For ease-of-use, here are some quick links to the respective sections:
- Using Android Debug Bridge (adb)
- Enabling other Developer Options
- SDK, NDK and JDK installation issues
- Bonus: Hiding Developer Options again
Using Android Debug Bridge (adb)
In some cases, you’ll find that regardless of what you do, Unity Remote just doesn’t seem to work. In this case, it might be because your computer is unable to detect your Android device.
adb.exe is a command-line tool included with Android SDKs, and it can help with that.
If you are using Unity 2019.1 and above, you don’t have to download anything to access
adb.exe — it comes with Unity’s Android Build Support module, if you installed the Android SDK included with it. You should be able to find
C:\Program Files\Unity\Hub\Editor\[YOUR_UNITY_VERSION]\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools, unless you installed Unity in a custom folder.
A possible alternative location for the file is
C:\Program Files\Unity\Editor\[YOUR_UNITY_VERSION]\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools. Alternatively, you can search your drive for
adb.exe to find the folder.
If you try clicking
adb.exe to run it, you will find that nothing much happens. That’s because
adb.exe is a command line application, which means you need to run it in Window’s Command Prompt to use it.
- To open the Command Prompt, press Windows + R on your computer to open the Run dialog. Type in
cmd, and instead of pressing Enter, press Ctrl + Shift + Enter to run the program as an Administrator.
- We will need to navigate to the folder where
adb.exeis in the Command Prompt before we can access the program. Type
cdinto the Command Prompt, followed by the path of the directory
adb.exeis in, i.e.
cd C:\Program Files\Unity\Hub\Editor\[YOUR_UNITY_VERSION]\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools.
adb devices command once you are in the
platform-tools folder containing
adb devices command runs
adb.exe and lists all the devices that the Android SDK is currently detecting.
C:\Program Files\..\platform-tools>adb devices List of devices attached * daemon not running; starting now at tcp:5037 * daemon started successfully a1b2c3d4e5f6g7 device
If you get an output similar to the green highlighted section above, restart 1) the Unity Editor and; 2) your Unity Remote, then; 3) unplug and plugin your Android device, then try running Unity Remote again. If it still doesn’t work, try the instructions on the next paragraph.
If you don’t get an output, it means that your Android device is not being read, and this is probably what is causing Unity Remote to not work. You might want to try a different USB cable, a different USB port, or a different device altogether.
Alternatively, you can run the following on
adb to restart it, and then run
adb devices again.
C:\Program Files\..\platform-tools>adb kill-server C:\Program Files\..\platform-tools>adb start-server * daemon not running; starting now at tcp:5037 * daemon started successfully C:\Program Files\..\platform-tools>adb devices List of devices attached a1b2c3d4e5f6g7 device
Article continues after the advertisement:
Enabling other Developer Options
For some people, Unity Remote has managed to work after they’ve enabled the Stay awake option in Developer Options.
For others, it started working after they changed their USB configuration (again, in Developer Options) from MTP (Media Transfer Protocol) to PTP (Picture Transfer Protocol).
Depending on your device model, the USB configuration setting might be found in another tab instead of Developer Options.
If you can’t find the option that allows you to change your connection to PTP, take a look at this article from another site.
SDK, NDK or JDK installation issues
While installing the Android SDK, NDK and JDK alongside Unity’s Android Build Support, some people have reported the following issues:
- OpenJDK installs halfway and stops without any notice. You can look at this Unity Forum topic about this issue.
- The Unity-native SDK or NDK is not compatible with the current project. If you get this, you’re just plain unlucky.
If you run into this issue, one way to go around it is to find people who have managed to get Unity Remote working on their computers and devices, or, at the very least, has a working Android Build Support module with the SDK, NDK and JDK installed.
Why? So that you can copy the SDK, NDK and / or JDK files on their Unity installation over. By the way, only copy the ones that don’t work — you probably don’t need all 3!
Bonus: Hiding Developer Options again
For some of you, when you’re done messing with Unity Remote, you might want to hide Developer Options again on your device. You know, what with cybersecurity being a buzzword nowadays and all.
Just head into Developer Options again, and tap the knob on the top right. This will also turn off USB debugging and set the rest of your Developer Options back to their defaults.
As with our previous Unity Remote article, if you:
- Find any errors in this article, or;
- Find a method that gets Unity Remote to work, that is not listed in this article;
Please leave a comment with the details! This article will be constantly updated with new findings, and you’ll be doing a public service to everyone else who is or will be going through the same battle of getting Unity Remote to work.
Article continues after the advertisement: