This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ADB connection unstable, making Streamline/GA almost unusable

In both Streamline and Graphics Analyzer, when connecting to an Android device, the target device would briefly appear in the devices list, but then disappear, showing "No targets have been detected" (Streamline) / "Unable to validate ADB" (GA), and reappear after a few seconds - the cycle repeats, as if I have a loose connection.

In very rare occasions, the app was able to get through the "flashing" phase and show me the app to capture, and if I start capture then, the app works just fine afterwards, with constant output and no disconnections. However, it's nowhere near reliable.

I've tried different USB ports, cables and even target devices, but all of them exhibit the same behaviour. Also note that my ADB setup is fine all this time, as I can "adb shell" to my device and it stays connected.

Product: DS 2021.0 Gold Evaluation, with Streamline 7.6 / Graphics Analyzer 5.8

OS: Windows 10 64-bit

Parents
  • The "Unable to validate ADB" hint inspired me to poke around, and after some attempts, I found out that Streamline/GA connects fine on Android SDK platform-tools version ≤r28.0.1 - anything above that exhibits the same symptom as the latest. Not sure why this is the case...

Reply
  • The "Unable to validate ADB" hint inspired me to poke around, and after some attempts, I found out that Streamline/GA connects fine on Android SDK platform-tools version ≤r28.0.1 - anything above that exhibits the same symptom as the latest. Not sure why this is the case...

Children
  • Hi Andy, 

    Thanks for the additional debug info.

    It sounds like you end up with two different versions of adb running, and they end up fighting each other, where the newer one kills the server of the older one. 

    A couple of things to test:

    • When it fails do you have any other software / shell trying to use an adb connection?
    • In Streamline, check it's finding the latest version of adb (Window -> Preferences -> External Tools)
    • In Graphics Analzer, check it's finding the latest version of adb (Edit -> Preferences -> Graphics Analyzer)

    Cheers, 
    Pete

  • Hi Peter,

    Supposedly nothing is using ADB concurrently - since you've mentioned it, I did "adb kill-server" prior to launching to be sure, yet with the latest platform-tools, the above symptoms still show. Furthermore, I didn't have to kill-server with platform-tools r28.0.1, it "just works".

    Yes I already manually appointed adb paths during earlier tests, either to the latest or to r28.0.1.

    Thanks,

    Andy

  • Thanks Andy.

    We're investigating and will let you know when we have something.

    Cheers, 
    Pete

  • Hi Andy

    We typically test Streamline against r30 so it is surprising you are having this issue. Additionally, I have tested with r31 platform tools and cannot reproduce this issue. Are you sure there are no other users of adb running at the same time (for example Android Studio).

    Assuming there are not, can you please provide us with the log output from the following steps. These commands will allow us to report the output from each 'adb' command that Streamline issues, hopefully to identify the specific command that is failing:

    From windows command prompt:

    CD C:\Program Files\Arm\Development Studio 2021.0\bin\    (or whatever the install path is + bin)
    SET DEVTEST_LOG_TO_SCREEN=true
    streamline.exe -consolelog > %USERPROFILE%\streamline.log     (or some other writable location)


    Then please send us the streamline.log file.

    NB: The file may (if it is able to get that far) contain output from running adb which contains the names of packages that are installed on the device, so please review if their is anything you would not like to share first. Mostly you will find lots of "adb forward --list" / "adb devices" and similar.

  • Hi Ben,

    Log here (too large for forum attachment).

    While this log was captured...

    • The device was found and added to the devices list
    • The package list loads, but while doing so, both lists alternate a few times between empty and loading states
    • Towards the end of loading (~85%), the package list starts another loading procedure
    • The package list alternates between the two loading progress pies, until the latter finishes, and finally serves the result

    Is there a similar logging method for Graphics Analyzer? The symptoms are more pronounced there (e.g. app often stops responding).

    Side note: I just discovered ARM Mobile Studio which is free and comes with SL/GA as well (sharing the same problem). However, as MS Starter Edition doesn't come with support, I'll stick to using DS for debugging until the trial runs out.

    Thanks,
    Andy

  • Hi Ben, any discoveries from that log?

  • Hi Andy, Thanks for the log. There's nothing particularly wrong in the log you sent, but it does look like it is doing eveything twice, which is unexpected. There were some changes in the package scanning and device enumeration in the very latest version of Streamline (version 7.7) which is available in Mobile Studio 2021.1 and will be released in the next version of Arm DS as well. Can you please give MS Starter Edition a quick try and see if you see the same results in the latest edition or not.

  • Hi Ben, same thing with MS. My DS trial license is expiring soon so I'll have to use MS to try out future advice from here on out.