Closed
Bug 1450305
Opened 7 years ago
Closed 6 years ago
[meta] Convert ADB Helper away from a bootstrapped extension
Categories
(DevTools :: General, enhancement)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jryans, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: meta)
Attachments
(1 obsolete file)
In bug 1449052, add-ons team is plotting removal of support for bootstrapped extensions, which impacts ADB Helper.
This is probably a good moment to reevaluate what we want ADB Helper to be today. The main features of ADB Helper are:
* One-click install of `adb` binaries (packaged inside the add-on)
* Since these are somewhat large, the separate add-on reduces Firefox download size
* JS client code to help Firefox talk to the `adb` binary, for tasks like:
* List Android devices with Firefox
* Connect to Firefox for Android to enable debugging sites
Here are some ideas for what we could convert to:
A. A WebExtension with bundled Experiment which can run privileged code
* This seems the most similar to ADB Helper as it is today
* An demo add-on with this approach: https://github.com/rhelmer/webext-experiment-crashme/
B. Move the "download binaries" piece into Firefox itself (instead of being an add-on)
* On some user action, download `adb` for use by Firefox
* The JS glue code is small and could likely be included in all builds
There are surely other pathways as well... feel free to suggest your own options.
Updated•7 years ago
|
Blocks: remote-debugging-ng-m1
Comment 2•7 years ago
|
||
:aswan suggested to me on IRC is that the new extension can contain a JSON file and devtools extract it. I can imagine the JSON file looks like this;
{
"Linux": {
"x86": [
"linux/adb"
],
"x86_64": [
"linux64/adb"
]
},
"Darwin": {
"x86_64": [
"mac64/adb"
]
},
"WINNT": {
"x86": [
"win32/adb.exe",
"win32/AdbWinApi.dll",
"win32/AdbWinUsbApi.dll"
],
"x86_64": [
"win32/adb.exe",
"win32/AdbWinApi.dll",
"win32/AdbWinUsbApi.dll"
]
}
}
And then, in devtools, we use this just like something like this;
theJSONInfo[Services.appinfo.OS][Services.appinfo.XPCOMABI.split("-")[0]]
Then we can extract each files (e.g. adb.exe) from the extension in devtools. I believe with this approach, we don't need any experiments in the extension. Also note that an advantage of this approach (rather than downloading binaries) is that the extension is signed by @mozilla.org (:arai told me it).
Comment 3•7 years ago
|
||
Here is the very beginning patch. My plan here is to port each feature in the old extension to devtools as a single commit respectively. E.g. 1) unpacking adb binary, 2) launching the binary, etc. etc.
I am also planing to add unit tests (xpcshell tests) in each commit. But I am stuck at the very beginning of this patch. :/ In this patch, I am trying to extract 'adb.json' in the new extension, but it doesn't work in the xpcshell test added in this patch. The code in question actually works in about:debugging content. When the code is invoked in the xpcshell test, ResolveURI [1] in SubstitutingProtocolHandler::NewChannel2() fails. I am suspecting 'moz-extension' protocol isn't registered in the test, but I have no idea how to do that yet.
[1] https://hg.mozilla.org/mozilla-central/file/ff8505d177b9/netwerk/protocol/res/SubstitutingProtocolHandler.cpp#l259
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Moving major about:debugging ng work into milestone 1, leaving m0 for prior bugfix work.
Blocks: remote-debugging-ng-m1
Updated•6 years ago
|
No longer blocks: remote-debugging-ng-m0
Comment 5•6 years ago
|
||
Andrew, what is the current target date to remove bootstrapped extensions?
Flags: needinfo?(aswan)
Comment 6•6 years ago
|
||
The end of the 64 Nightly cycle, currently scheduled for 10/22
Flags: needinfo?(aswan)
Updated•6 years ago
|
tracking-firefox64:
--- → ?
Comment 7•6 years ago
|
||
This turned into a meta bug, unassigning.
Assignee: hikezoe → nobody
Status: ASSIGNED → NEW
Keywords: meta
Summary: Convert ADB Helper away from a bootstrapped extension → [meta] Convert ADB Helper away from a bootstrapped extension
Updated•6 years ago
|
Attachment #8980442 -
Attachment is obsolete: true
Updated•6 years ago
|
Priority: P3 → --
Comment 8•6 years ago
|
||
Tracking the individual dependencies instead of the meta bug.
tracking-firefox64:
? → ---
Comment 9•6 years ago
|
||
All the dependencies have been resolved.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment 10•6 years ago
|
||
\o/
Thank you, Julian!
You need to log in
before you can comment on or make changes to this bug.
Description
•