Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

ADB profiling data do not show up in profiler window

Discussion in 'Editor & General Support' started by kaiyum, Nov 7, 2018.

  1. kaiyum

    kaiyum

    Joined:
    Nov 25, 2012
    Posts:
    627
    I followed this guide: https://docs.unity3d.com/540/Documentation/Manual/Profiler.html
    My unity version: Unity LTS 2017.4.9f1
    Platform: Android

    I did "build and run" according to the guide:
    upload_2018-11-7_18-29-3.png

    I plugged the phone via USB cable. The adb console shows this:
    upload_2018-11-7_18-30-27.png

    And the profiler window looks like this:
    upload_2018-11-7_18-31-58.png

    See, there is no data coming up! :(:(
    I tried this too:
    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.
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,323
    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

    Code (CSharp):
    1. ~$ adb forward tcp:34999 localabstract:Unity-com.portbliss.GAMENAME
    2. ~$ 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.
     
  3. kaiyum

    kaiyum

    Joined:
    Nov 25, 2012
    Posts:
    627
    Thanks @MartinTilo .
    adb forward tcp:34999 localabstract:Unity-com.portbliss.GAMENAME

    This worked for me. :)
    On WiFi, the framerate is horrible. On cable it works like a magic :)
     
    friuns3 and MartinTilo like this.
unityunity