ADB profiling data do not show up in profiler window

I followed this guide: Unity - Manual: The Profiler Window
My unity version: Unity LTS 2017.4.9f1
Platform: Android

I did “build and run” according to the guide:

I plugged the phone via USB cable. The adb console shows this:

And the profiler window looks like this:

See, there is no data coming up! :(:frowning:
I tried this too:
3865642--327844--upload_2018-11-7_18-33-14.png

Still no luck. I can profile via wifi but its horribly slow. So slow that I can not even play on mobile while I am profiling in PC; looked like I was rendering images one in every seconds or so. So I thought adb profiling can give it a good shot.

The Manual pages you linked to are for Unity 5.4 and have been updated for 2017.4 where the port changed to 34999.
That doesn’t explain why build & run doesn’t work though. I’m assuming you’re not disconnecting the phone, restarting the app or killing adb daemon?
This could be a bug. You could try if it works with a different Unity version or device or file a bug report directly.
As a workaround, you could also try build and install it manually, then go to cmd and enter

~$ adb forward tcp:34999 localabstract:Unity-com.portbliss.GAMENAME
~$ adb shell am start -n com.portbliss.GAMENAME/com.unity3d.player.UnityPlayerActivity -e 'unity'

And then choosing that target through the drop down in the Profiler window.

While it shouldn’t make a difference, maybe also try the Auto Connect Profiler option. But really, this should be working and I don’t have enough insight into debugging via adb. Wifi usually does it for me.

5 Likes

Thanks @MartinTilo .
adb forward tcp:34999 localabstract:Unity-com.portbliss.GAMENAME
This worked for me. :slight_smile:
On WiFi, the framerate is horrible. On cable it works like a magic :slight_smile:

2 Likes

I don’t know what magic is this, but it solved the problem for me!
Connecting a Nokia 2 Android device, to a mac
Nokia 2 is connected to a different wifi, than mac
but whatever that command is doing, it fixes it.
I have the data in profiler now.
(Funny, that in build settings, under run device, I could see my device. Also with adb devices.
But profiler could not connect to it)