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:
Andrey Goncharov
2023-05-18 09:56:41 -07:00
committed by Facebook GitHub Bot
parent e2d5cc4607
commit 898e9c3b07
10 changed files with 262 additions and 134 deletions

View File

@@ -9,7 +9,7 @@
import {DeviceType} from 'flipper-common';
import AndroidDevice from './AndroidDevice';
import {Client as ADBClient} from 'adbkit';
import {DeviceClient} from '@u4/adbkit';
import {FlipperServerImpl} from '../../FlipperServerImpl';
export default class KaiOSDevice extends AndroidDevice {
@@ -18,7 +18,7 @@ export default class KaiOSDevice extends AndroidDevice {
serial: string,
deviceType: DeviceType,
title: string,
adb: ADBClient,
adb: DeviceClient,
abiList: Array<string>,
sdkVersion: string,
) {