Android Device Can't Able To Connect With Profiler Window

I want to get performance analytics of my game using Profiler so I have exported build with Autoconnect Profile setting enabled.

After this process build installed within an Android device but it can’t able to run the game, it just displaying black screen nothing else. Profiler can’t able to connect with connect device, I was getting this kind of list:

Now android device showing just black screen and profiler not moving ahead, it just remains connected with Editor only.

I have tried to connect and disconnect my Android device multiple time but nothing changed in this. Please give me some suggestion into this so I can start my debugging process.

I have already gone through this post:

After 2 Days:
Still my Autoconnect Profiler build not working in Android build without that its working fine - what is the solution for me?
Android device just showing black screen - no unity logo splash screen nothing else happening.
After spending few minutes, I require to press Home button of device to close the game.

Hi @siddharth3322 !

Is it possible for you to connect when using direct IP? Could you please check see what is the phone’s IP and enter it into menu item.
Sometimes Autoconnect Profiler might embed wrong IP into player. Could you please check if boot.config file inside the APK contains correct IP of the machine where the Editor is running. The problem might arise if boot.config does not contain Editor IP from the same subnet where device is running.

4 Likes

I have connected my Android phone with my office Wi-Fi connection and installed Autoconnect profiler build again my phone. Withing profiler window, I have manually set IP address of my device.
But I can’t able to get connected and I was getting this kind of messages:
4444372--407023--profiler_connecting_timeout.PNG

At above, you have mentioned boot.config file, where can I found this?
and at their shall I require to update IP address?

Make sure there is no firewall blocking the connection. That is a usual issue when connecting trough WiFi.

If you can’t connect with the Editor there is another way to get profiler data - use https://docs.unity3d.com/ScriptReference/Profiling.Profiler-enabled.html runtime API to dump profiler data to disk. Then you need to copy it from the device and open in profiler.

1 Like

Today also same problem started.
My Autoconnect Profiler build is not working with the Android platform.
If I take out build without Autoconnect Profiler then its working fine.

In the Android device, I was just getting black screen nothing else and nothing happening with Profiler window in the Unity editor.
Then what the solution for me into this?
Because I am struggling with game performance and I can’t able to see the Profiler data.

Did you manage to find a solution to this problem?

I’ve noticed for as long as I’ve used Unity that if I build and run from the editor, then the first time the app runs I can connect the profiler. But any consecutive runs (Or even the first run if I install the app via command line (adb install … )) the profiler can’t ‘see’ the application.The drop down list does not contain the device. I can connect to it over WiFi, but I want to connect directly via USB. The option has just never worked for me.

3 Likes

Could you please file a bug - it might be related the virtual connection we create for adb proxy not being reset properly

1 Like

Hey, any update on the matter?

3 Likes

Same issue here. Trying to connect to different devices via USB all day long. Even though devices are listed correctly via “adb devices” and I can install stuff via adb, the profiler simply does not want to connect. It once did for a couple of seconds but after restarting and changing devices it simply does nothing at all… Anyone any good solution for this?

Please keep filing bug reports for this. Even if this leads to duplicated reports. We need to know in as much detail as possible what is still broken on the connection side, e.g. which devices, Unity versions etc. We’re working hard on fixing all these connection issues and everywhere but we’d be very glad for your contribution to solving these once and for all.

Just please make sure to try these on the latest patch release of whichever Unity version you’re on in case we already did.

1 Like

Still doesn’t work.
Editor: Unity 2019.4.9f1 (Windows)
Device: Google Pixel XL (Android 10)

Try to dig into TCP over USB for wire connected devices.
And Multicast for wireless connected devices.

It finally worked for me when I connected the profiler through IP adress AFTER launching the app on the device. It seems to work for me like this even though the app also crashed from time to time. Hope it could help some!

Is this problem Solved?What should I do?

I had to disable AutoConnect profiler for it to work

I succeeded in profiling adding the IP, found under “Settings->About Phone->Status”, manually

5 Likes

Still have this issue in Unity 2020.3.14f1. The Autoconnect Profiler option sometimes causes game freeze on the black screen during the game startup on Android. Also, the Unity profiler doesn’t work when this option is enabled (both via USB and WiFi).
Disabling the option fixes freezes and the profiler.

Same problem here on lastest 2020 lts
im having a way worse performance on that unity version for my oculus quest game, and im not able to compare profiler because i can not even get profiling info

By build and play i was able to profile as long as i dont disconect the usb

1 Like

Yeah this has always been my experience. If I want to profile something it basically means a need to kick off a fresh build (build and run) for the editor to see the device. I don’t know exactly what breaks it, but it breaks often enough that I’ve long given up on being able to profile an existing development build on my device. Always new build. :stuck_out_tongue:

This has also been my experience across multiple android devices and across multiple workstations. I guess everyone just puts up with it.