use ANDROID_ADB_SERVER_PORT in adbkit

Summary: Using `ANDROID_ADB_SERVER_PORT` env var to create adbkit instance.

Reviewed By: jknoxville

Differential Revision: D13987361

fbshipit-source-id: 2283b52466f8ad536aa3a8320a4ee8f4ce97321a
This commit is contained in:
Daniel Büchele
2019-02-07 06:33:37 -08:00
committed by Facebook Github Bot
parent 8a5b5a0cba
commit 0ad13a0606
2 changed files with 8 additions and 2 deletions

View File

@@ -79,7 +79,11 @@ export default (store: Store, logger: Logger) => {
); );
} }
}) })
.then(adb.createClient), .then(() =>
adb.createClient({
port: process.env.ANDROID_ADB_SERVER_PORT || '5037',
}),
),
'createADBClient.shell', 'createADBClient.shell',
).catch(err => { ).catch(err => {
console.error( console.error(

View File

@@ -75,7 +75,9 @@ export default class CertificateProvider {
constructor(server: Server, logger: LogManager) { constructor(server: Server, logger: LogManager) {
this.logger = logger; this.logger = logger;
this.adb = adb.createClient(); this.adb = adb.createClient({
port: process.env.ANDROID_ADB_SERVER_PORT || '5037',
});
this.certificateSetup = reportPlatformFailures( this.certificateSetup = reportPlatformFailures(
this.ensureServerCertExists(), this.ensureServerCertExists(),
'ensureServerCertExists', 'ensureServerCertExists',