in src/extension-runners/firefox-android.js [74:119]
async run() {
const {
adbBin,
adbHost = DEFAULT_ADB_HOST,
adbPort,
ADBUtils = DefaultADBUtils,
} = this.params;
this.adbUtils = new ADBUtils({
adbBin,
adbHost,
adbPort,
});
await this.adbDevicesDiscoveryAndSelect();
await this.apkPackagesDiscoveryAndSelect();
await this.adbForceStopSelectedPackage();
// Create profile prefs (with enabled remote RDP server), prepare the
// artifacts and temporary directory on the selected device, and
// push the profile preferences to the remote profile dir.
await this.adbPrepareProfileDir();
// NOTE: running Firefox for Android on the Android Emulator can be
// pretty slow, we can run the following 3 steps in parallel to speed up
// it a bit.
await Promise.all([
// Start Firefox for Android instance if not started yet.
// (Fennec would run in an temporary profile and so it is explicitly
// stopped, Fenix runs on its usual profile and so it may be already
// running).
this.adbStartSelectedPackage(),
// Build and push to devices all the extension xpis
// and keep track of the xpi built and uploaded by extension sourceDir.
this.buildAndPushExtensions(),
// Wait for RDP unix socket file created and
// Create an ADB forward connection on a free tcp port
this.adbDiscoveryAndForwardRDPUnixSocket(),
]);
// Connect to RDP socket on the local tcp server, install all the pushed extension
// and keep track of the built and installed extension by extension sourceDir.
await this.rdpInstallExtensions();
}