Open Bug 1522149 Opened 6 years ago Updated 2 years ago

[remote-dbg-next] devtools/shared/adb should own the logic to find correct binary

Categories

(DevTools :: about:debugging, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: remote-debugging-technical-debt)

Spawned from https://github.com/mozilla/devtools-adb-extension/pull/15

We are currently very strict in the list of platforms supported for ADB. There is a json file in the addon that describes which platform should use which binaries:

https://github.com/mozilla/devtools-adb-extension/blob/dac824a0c556e857c5a3df03c82b1259aafdf641/extension/adb.json

{
  "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 we expect the strings above (WINNT, x86_64,....) to match exactly the information we get about the current OS when we unpack ADB:

https://searchfox.org/mozilla-central/rev/330daedbeac2bba296d663668e0e0cf248bc6823/devtools/shared/adb/adb-binary.js#119-121

However in practice we have 4 flavors of the binaries: linux32, linux64, macos and windows. The addon should probably still describe which binaries are available, but there should be a mapping logic in our devtools module.

We should be able to say "windows" and "aarch64" ? -> use the windows binary ; without hardcoding new mappings in the addon.

Priority: -- → P3
Blocks: 1524731

is there an eta for this landing?

It is not a priority for us at the moment, but if it breaks on infra I can land a simple workaround. Do you have instructions so that I can test my changes on try?

Flags: needinfo?(jmaher)

we will have access to try in 2-3 weeks time (waiting on machines to be available), if this will be deployed by then, no worries. If we get try access sooner we can follow up in this bug.

Flags: needinfo?(jmaher)

filter on: remote-debugging-m2-reserve-cleanup

Whiteboard: remote-debugging-technical-debt

Following up on this bug for movement.

General try access to the windows10-aarch64 machines are under testing, and may come before or on first week of March. We are ready to test any changes that are made for this bug.

No longer blocks: 1524731

We landed an initial fix in Bug 1524731 to unblock the failing test in aarch64 platforms. After this fix, we still have a complex JSON file in the addon + some logic in the adb-binaries module in m-c to accommodate for aarch64. The goal of this bug is to simplify the JSON file and move all the logic to adb-binaries to pick the right binary for a given OS+architecture pair.

Renaming the bug, since basic aarch64 support is now fixed.

Summary: [remote-dbg-next] Add Windows/aarch64 support in ADB → [remote-dbg-next] devtools/shared/adb should own the logic to find correct binary
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.