Open Bug 1878937 Opened 2 years ago Updated 9 months ago

Documentation does not state the need for having adb

Categories

(Testing :: mozregression, enhancement)

enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: xerd2bjwh, Unassigned)

References

Details

Steps to reproduce:

I installed mozgression-gui, connected my phone and tried to start a bisection.

Actual results:

The process failed at the first step with the message: "gve is not runnable: [WinError 2] The system cannot find the specified file: adb is not executable."

Expected results:

The documentation of mozregression should have told me to download the Android SDK Platform Tools, e.g. from https://developer.android.com/tools/releases/platform-tools, unzip them, add the folder with adb.exe to the system path and only then start mozregression-gui. (At least any mention that the Android Debug Bridge is required and not included in the download but can be obtained here or there would be tremendously helpful.)

We don't need the whole of the Android SDK, only adb.

Firefox's about:debugging lazily downloads adb as needed, and we should ideally use the same (bug 1231950). To find it manually:

  1. Visit about:debugging and click on "Enable USB devices" (documentation). This download adb
  2. Visit about:profiles and look for "Local Directory". Copy its path, append /adb/ (maybe \adb\ on Windows?). The program name is adb.exe on Windows, just adb on macOS and Linux.
  3. To make sure that mozregression can find adb, append the path from step 2 in the PATH environment variable.

For those interested in patching mozregression to support this, Firefox's logic to download the adb binary is at:

adb is launched by mozregression via https://github.com/mozilla/mozregression/blob/1564c18dae4d726ea386e881d3fadb4624d99766/mozregression/launchers.py#L445-L454. By default, it launches adb (without absolute directory path, so whatever executable adb can be located from one of the items in PATH can be used): https://searchfox.org/firefox-main/rev/a5d7b5634b073a6b9e0d9f0f7df163d10cba478b/testing/mozbase/mozdevice/mozdevice/adb.py#398-402

See Also: → 1231950
You need to log in before you can comment on or make changes to this bug.