- Home /
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?
Have you found a solution for this? I'm having the same issue.
I'm having the same problem in Unity 5.6.1f1 and artofcode's answer doesn't work for me.
Answer by artofcode · Jan 11, 2017 at 05:46 PM
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.
It worked. Thank you very much. I was doing the same thing for some reason :)
Worked without port also, founded device ip with this commandline> adb shell ip route
(see IP after 'src')
Answer by liortal · Jul 15, 2016 at 09:18 AM
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):
Answer by bhavinbhai2707 · Aug 24, 2017 at 04:02 AM
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!!
Answer by AdaluteGames · Sep 01, 2019 at 11:33 PM
yea but that doesnt make sense since it needs to be online to see the ip address right?
Answer by Carolinetis · May 22, 2020 at 09:39 AM
@AdulateGames I believe @bhavinbhai2707 meant that the mobile data connection should be off, so the device connects to the WiFi.
Your answer
Follow this Question
Related Questions
Android Device can't able to connect with Profiler 1 Answer
Android build freezes on attaching unity3D profiler 0 Answers
Puzzle: Why game app on Android takes up much more memory than Unity Profiler reports? 0 Answers
perfHUD & Unity 0 Answers
Error Building Player: Win32Exception. No solution works 1 Answer