Skip to content

doctor: Add check for adb devices  #1852

@arushikesarwani94

Description

@arushikesarwani94

Describe the Feature

I'd like to propose a feature for doctor that will verify if the android device is attached correctly by listing the available devices. This could be a non-required check/ Warning ● in Common category to notify users of whether there is an attached device or not. This will allow users to differentiate device connection issues like : USB debugging enabled, developer options enabled etc. from others.

At times, restarting the adb server through adb kill-server; adb start-server might be helpful seeing this check failure rather than struggling to understand why the app launch is failing.

Possible Implementations

Fetch available devices (adb device) and emulators (emulator -list-avds)

Test Plan

  1. Build cli codebase using : node ./scripts/build.js && yarn build:debugger
  2. Link the cli-doctor using : yarn link
  3. In the example React Native app(Awesome Project), run yarn link "@react-native-community/cli-doctor"
  4. Run the CLI Doctor using : npx @react-native-community/cli doctor

Related Issues

#1765(Android)
#1676(iOS)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions