Commit Graph

11 Commits

Author SHA1 Message Date
Daisuke Akatsuka
4f3436e304 Bug 1507126: Execute adb shell command to specified device. r=jdescottes
Depends on D14313

Differential Revision: https://phabricator.services.mozilla.com/D14708

--HG--
extra : moz-landing-system : lando
2018-12-18 01:44:15 +00:00
Julian Descottes
3c74b5f444 Bug 1508956 - Refactor AdbDevice to have an async initialize step;r=daisuke
The model information is duplicated between adb runtime and adb device.
This allows to keep the information in a single place.

Differential Revision: https://phabricator.services.mozilla.com/D14307

--HG--
extra : moz-landing-system : lando
2018-12-19 18:06:28 +00:00
Julian Descottes
b77ab873fa Bug 1492700 - Split adb.js in several files;r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D13473

--HG--
rename : devtools/shared/adb/adb.js => devtools/shared/adb/commands/list-devices.js
rename : devtools/shared/adb/adb.js => devtools/shared/adb/commands/prepare-tcp-connection.js
rename : devtools/shared/adb/adb.js => devtools/shared/adb/commands/run-command.js
rename : devtools/shared/adb/adb.js => devtools/shared/adb/commands/shell.js
rename : devtools/shared/adb/adb.js => devtools/shared/adb/commands/track-devices.js
extra : moz-landing-system : lando
2018-12-05 20:47:34 +00:00
Julian Descottes
49a9d44d6b Bug 1492700 - Fold FirefoxOnAndroidRuntime.detect in scanner.detectRuntimes;r=daisuke
Depends on D12763

Differential Revision: https://phabricator.services.mozilla.com/D12764

--HG--
extra : moz-landing-system : lando
2018-11-27 12:51:14 +00:00
Julian Descottes
5e8457cd7d Bug 1492700 - Stop exposing shell() on adb-device because it only forwards to ADB;r=daisuke
Depends on D12762

Differential Revision: https://phabricator.services.mozilla.com/D12763

--HG--
extra : moz-landing-system : lando
2018-11-27 12:50:57 +00:00
Julian Descottes
47188bc4cd Bug 1492700 - adb-device.js should export AdbDevice and not Device;r=daisuke
Depends on D12761

Differential Revision: https://phabricator.services.mozilla.com/D12762

--HG--
extra : moz-landing-system : lando
2018-11-27 12:50:45 +00:00
Mark Banner
ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Daisuke Akatsuka
dcbc040145 Bug 1494169 - Part 2: Connect to USB device. r=jdescottes
Depends on D6880

Differential Revision: https://phabricator.services.mozilla.com/D6881

--HG--
extra : moz-landing-system : lando
2018-09-28 04:27:44 +00:00
Hiroyuki Ikezoe
0a417befc7 Bug 1481691 - Drop root relevant stuff and push and pull. r=jedescottes
As far as I can tell they were all for FirefoxOS.
2018-08-10 16:32:21 +09:00
Hiroyuki Ikezoe
17cff22452 Bug 1469054 - ESLint: lint fix for adb-device.js. r=jdescottes
MozReview-Commit-ID: AYvHsiirrtt

--HG--
extra : rebase_source : b541f85809cb48b05f3ffe90b720ccea71db908d
2018-08-09 14:27:56 +09:00
Hiroyuki Ikezoe
bdd6379e19 Bug 1469054 - Adapt device.js in the adbhelper addon into devtools. r=jdescottes
The diff;
 --- /home/hiro/adbhelper/device.js	2018-07-19 06:18:41.613011481 +0900
 +++ devtools/shared/adb/adb-device.js	2018-08-06 10:18:38.808496752 +0900
 @@ -4,9 +4,7 @@

  "use strict";

 -const { ConnectionManager } =
 -  require("./devtools-require")("devtools/shared/client/connection-manager");
 -const adb = require("./adb");
 +const { ADB } = require("devtools/shared/adb/adb");

  /**
   * A Device instance is created and registered with the Devices module whenever
 @@ -21,34 +19,18 @@ function Device(id) {
  }

  Device.prototype = {
 -  /**
 -   * DEPRECATED: This is specific to how we connect to Firefox OS.  Use cases
 -   * that interact with other kinds of devices should likely use the more
 -   * general |forwardPort| method directly.
 -   */
 -  connect(remotePort) {
 -    let port = ConnectionManager.getFreeTCPPort();
 -    let local = "tcp:" + port;
 -    let remote = "localfilesystem:/data/local/debugger-socket";
 -    if (remotePort) {
 -      remote = "tcp:" + remotePort;
 -    }
 -    return adb.forwardPort(local, remote)
 -              .then(() => port);
 -  },
 -
    type: "adb",

 -  shell: adb.shell.bind(adb),
 -  forwardPort: adb.forwardPort.bind(adb),
 -  push: adb.push.bind(adb),
 -  pull: adb.pull.bind(adb),
 -  reboot: adb.reboot.bind(adb),
 -  rebootRecovery: adb.rebootRecovery.bind(adb),
 -  rebootBootloader: adb.rebootBootloader.bind(adb),
 +  shell: ADB.shell.bind(ADB),
 +  forwardPort: ADB.forwardPort.bind(ADB),
 +  push: ADB.push.bind(ADB),
 +  pull: ADB.pull.bind(ADB),
 +  reboot: ADB.reboot.bind(ADB),
 +  rebootRecovery: ADB.rebootRecovery.bind(ADB),
 +  rebootBootloader: ADB.rebootBootloader.bind(ADB),

    isRoot() {
 -    return adb.shell("id").then(stdout => {
 +    return ADB.shell("id").then(stdout => {
        if (stdout) {
          let uid = stdout.match(/uid=(\d+)/)[1];
          return uid == "0";
 @@ -58,7 +40,7 @@ Device.prototype = {
    },

    summonRoot() {
 -    return adb.root();
 +    return ADB.root();
    },

    getModel() {

MozReview-Commit-ID: FlbKPm6VDs5

--HG--
extra : rebase_source : 92a4d061963a1d261243fb6865cdeea283c8870d
2018-08-09 14:27:56 +09:00