Skip to content

Add a doctor validator warning for multiple adb installations #9709

@tvolkert

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.

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