Skip to content

Add a doctor validator warning for multiple adb installations #9709

Closed

Description

@tvolkert

Just helped track down an issue an internal customer was having whereby multiple adb instances were fighting each other:

  • /usr/bin/adb existed as part of the adb Debian package that was installed on the user's system. It seemed to be restarting its server automatically when killed because of an entry in init.d
  • $ANDROID_HOME/platform-tools/adb was the user's preferred adb instance and was also the instance detected by flutter tools since it lived in a proper SDK folder structure.

There was initially an issue whereby one adb client process would detect a mismatch between the client and server versions and restart the appropriate server, and in so doing, it'd echo a message to the terminal that flutter tools mistook for a device line (fixed in #9693).

Once that issue was fixed, the two adb servers still seemed to be fighting each other, causing the preferred adb to show no connected devices even though there were devices connected. The solution we eventually found for this was uninstalling /usr/bin/adb (via sudo apt-get remove adb)...

This experience, along with reports within the Flutter team of multiple adb instances not playing nicely with each other and with Flutter tools, means we probably want to add a doctor validator that will warn the user if multiple adb binaries are detected.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: flutter doctorProblem related to the "flutter doctor" tool
    on May 1, 2017
  2. added this to the milestone on May 1, 2017
  3. amoghe commented on Sep 5, 2017

    @amoghe

    👍

    Experience report

    I ran into a similar situation myself. In my case android-tools-adb (the debian pkg that brings in /usr/bin/adb) did not add an init script, however since I was using it to force the adb connection over tcp it wasn't clear to me which adb flutter was preferring to use (resulting the in the client/server mismatch message)

    This bug got me thinking in the right direction and I was finally able to run the adb using the the adb that is present in the platform-tools dir of the android sdk installation (running doctor with the -v option showed which adb flutter preferred to use)

    Hope this experience report helps you craft the appropriate warning message to emit in the output of a doctor invocation.

  4. modified the milestones: 3: Current Milestone, on Dec 18, 2017
  5. Hixie commented on Dec 18, 2017

    @Hixie
    Contributor

    @tvolkert What did you have in mind here? Comparing which adb to the adb that we know about and seeing if they are different?

  6. tvolkert commented on Dec 18, 2017

    @tvolkert
    ContributorAuthor

    Yeah that'd be one signal.

    Also, just warning if there exists a /usr/bin/adb at all since it'll never be what we detect as the Android SDK location.

  7. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    and removed on Apr 23, 2018
  8. christopherfujino commented on Jan 14, 2020

    @christopherfujino
    Contributor

    Related to #6514

  9. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  10. removed this from the milestone on Jun 2, 2020
  11. removed this from the milestone on Jun 2, 2020
  12. 3 remaining items

  13. added
    P3Issues that are less important to the Flutter project
    and removed
    P2Important issues not at the top of the work list
    on May 30, 2024
  14. added
    team-androidOwned by Android platform team
    and removed
    team-toolOwned by Flutter Tool team
    triaged-toolTriaged by Flutter Tool team
    P3Issues that are less important to the Flutter project
    on Jun 27, 2025
  15. added
    P3Issues that are less important to the Flutter project
    triaged-androidTriaged by Android platform team
    on Jul 1, 2025
  16. github-actions commented on Jul 14, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  17. locked as resolved and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: contributor-productivityTeam-specific productivity, code health, technical debt.t: flutter doctorProblem related to the "flutter doctor" toolteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions