Unable to connect Profiler to Android

So I’ve had success with profiling an android game before (on Gear VR), but for some unknown reason I am unable to do so now. Some information on the setup:

  • I’m running Unity 5.3.4f1 (pro license).

  • I’ve opened the tcpip port with adb (adb tcpip 5555)

  • Connected to it (adb connect [ip]:5555)

  • Port forwarded (adb forward tcp:54999 localabstract:Unity-[package identifier])

  • Selected the right ‘Active Profiler’ (AndroidPlayer@127.0.0.1:54999)

  • Have the ‘Record’ selected.

  • Build is a development build (and tried with and without auto connect)

  • Firewall disabled

  • Same subnet on the network

  • Android SDK is on 23.0.3 (I’ve read/heard from multiple sources that 24 is broken with Unity).

I can reach the phone with ping just fine. I’ve tried deleting the android manifest file to make sure nothing is in there that could interfere.

But nothing is coming through. No message that it can’t connect or freeze while it tries to connect. It simply accepts the active profiler on the local port just fine, without doing anything after that.

The editor log file doesn’t mention anything related.

Connecting the profiler to the opened port ([ip]:5555) results in a message that it can’t connect.

Is the profiler perhaps broken in 5.3.4f1 ? Updating Unity at this time in the project is going to be quite difficult as various graphics-related things in the game are breaking.

Is there anything else that I can try in order to get the profiler to work?

As @adrian_pavel is asking if I have found a solution for this, here a follow-up: I believe I fixed this by not adding a port number behind the IP address, which I probably started adding at some point for no reasons beyond me.

So where I entered “172.168.x.x:5555”, I now simply enter just the IP address on its own.

Just make sure ur internet connection is off in ur mobile device!!
It’s a minor thing but it stops the profiler to perform it’s task, happened with me alot and turning it off solved my issue everytime!!

yea but that doesnt make sense since it needs to be online to see the ip address right?

@AdulateGames I believe @bhavinbhai2707 meant that the mobile data connection should be off, so the device connects to the WiFi.

Why do you have to perform all these steps ? (e.g: port forward, etc).

Usually, you should be able to have the device on the same WIFI network, and it’ll appear in the profiler window (under active profilers).

I’ve had some cases where it didn’t show up in that list. In those cases, i had to manually look up the device’s IP address in the local subnet, and enter that manually (using the “Enter IP” option):
74086-screen-shot-2016-07-15-at-121939.png