Ship (or use Desktop Fx) Android ADB with mozregression
Categories
(Testing :: mozregression, defect)
Tracking
(Not tracked)
People
(Reporter: kbrosnan, Unassigned)
References
Details
(Keywords: nightly-community)
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment 4•5 years ago
|
||
Not working on this right now, probably still a good idea. Another alternative might be to use a pure-python adb alternative like adb shell: https://github.com/JeffLIrion/adb_shell -- but I couldn't get it working immediately in my testing
Updated•3 years ago
|
Comment 5•7 months ago
|
||
Firefox's logic to download the adb binary is at:
- downloading xpi containing adb: https://searchfox.org/firefox-main/rev/a5d7b5634b073a6b9e0d9f0f7df163d10cba478b/devtools/client/shared/remote-debugging/adb/adb-addon.js
- The URL of the xpi URL to download is taken from the
devtools.remote.adb.extensionURLpref with#OS#replaced with the OS-specific part (source). - I wondered how stable the URL is; it was last changed 3 years ago in bug 1800985.
- The URL of the xpi URL to download is taken from the
- The downloaded
adbbinary is used at: https://searchfox.org/firefox-main/rev/a5d7b5634b073a6b9e0d9f0f7df163d10cba478b/devtools/client/shared/remote-debugging/adb/adb-binary.js
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
To reuse Firefox's logic, the mozregression implementation would have to download the xpi like Firefox, extract the adb binary from it, and then override the adb parameter. This could be done conditionally, if there is no adb executable found in $PATH.
Description
•