Update adbkit and logcat to maintained librarys
Summary: We were using an old unmaintained/abandonned library for communicating with adb server https://github.com/openstf/adbkit This was giving me issues i couldnt figure out when running flipper server. There is a popular fork written in typescript here https://github.com/DeviceFarmer/adbkit but it uses blue bird for promises. There is a fork of the fork here which i have chosen to use which is the same api as above but with es6 promises, https://github.com/UrielCh/adbkit. Both forks have a slightly different api to the original. In the original library there was a single client and any command directed at a particular device had a serial as the first argument In the new libraries you create a DeviceClient where the serial is baked in and you don't need to supply this argument every time allow-large-files Reviewed By: lblasa Differential Revision: D45569652 fbshipit-source-id: 2a23c0eaa12feaebdccadb3d343e087c0d5708d5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e2d5cc4607
commit
898e9c3b07
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
import CertificateProvider from '../../utils/CertificateProvider';
|
||||
import {Client} from 'adbkit';
|
||||
import {Client} from '@u4/adbkit';
|
||||
import * as androidUtil from './androidContainerUtility';
|
||||
import {csrFileName, extractAppNameFromCSR} from '../../utils/certificateUtils';
|
||||
|
||||
@@ -98,7 +98,7 @@ export default class AndroidCertificateProvider extends CertificateProvider {
|
||||
const appName = await extractAppNameFromCSR(csr);
|
||||
const deviceId = await this.getTargetDeviceId(appName, destination, csr);
|
||||
await androidUtil.push(
|
||||
this.adb,
|
||||
this.adb.getDevice(deviceId),
|
||||
deviceId,
|
||||
appName,
|
||||
destination + filename,
|
||||
@@ -113,7 +113,7 @@ export default class AndroidCertificateProvider extends CertificateProvider {
|
||||
csr: string,
|
||||
): Promise<{isMatch: boolean; foundCsr: string}> {
|
||||
const deviceCsr = await androidUtil.pull(
|
||||
this.adb,
|
||||
this.adb.getDevice(deviceId),
|
||||
deviceId,
|
||||
processName,
|
||||
directory + csrFileName,
|
||||
|
||||
Reference in New Issue
Block a user