use adbkit instead of adbkit-fb
Summary: Finally we are able to switch back from our adbkit-fb fork to the original `adbkit`. Replacing all imports Reviewed By: jknoxville Differential Revision: D17343236 fbshipit-source-id: e6dd328f1a956544e8be2ab768aa270972463c6b
This commit is contained in:
committed by
Facebook Github Bot
parent
b3de081f68
commit
e33f72bb21
@@ -5,8 +5,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {FlipperDevicePlugin, Device} from 'flipper';
|
||||
import adb from 'adbkit-fb';
|
||||
import {FlipperDevicePlugin, Device, AndroidDevice} from 'flipper';
|
||||
import adb, {Client as ADBClient} from 'adbkit';
|
||||
import TemperatureTable from './TemperatureTable';
|
||||
|
||||
import {
|
||||
@@ -23,10 +23,6 @@ import {
|
||||
} from 'flipper';
|
||||
import React from 'react';
|
||||
|
||||
type ADBClient = any;
|
||||
type AndroidDevice = {
|
||||
adb: ADBClient;
|
||||
};
|
||||
type TableRows = any;
|
||||
|
||||
// we keep vairable name with underline for to physical path mappings on device
|
||||
@@ -131,7 +127,6 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin<
|
||||
any,
|
||||
any
|
||||
> {
|
||||
adbClient: ADBClient;
|
||||
intervalID: NodeJS.Timer | null = null;
|
||||
state: CPUState = {
|
||||
cpuCount: 0,
|
||||
@@ -150,9 +145,6 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin<
|
||||
}
|
||||
|
||||
init() {
|
||||
const device = (this.device as any) as AndroidDevice;
|
||||
this.adbClient = device.adb;
|
||||
|
||||
this.updateHardwareInfo();
|
||||
this.readThermalZones();
|
||||
|
||||
@@ -188,7 +180,7 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin<
|
||||
}, 'cat /sys/devices/system/cpu/possible');
|
||||
}
|
||||
executeShell = (callback: ShellCallBack, command: string) => {
|
||||
return this.adbClient
|
||||
return (this.device as AndroidDevice).adb
|
||||
.shell(this.device.serial, command)
|
||||
.then(adb.util.readAll)
|
||||
.then(function(output: {toString: () => {trim: () => string}}) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"main": "index.tsx",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"adbkit-fb": "2.10.1"
|
||||
"adbkit": "^2.11.1"
|
||||
},
|
||||
"title": "CPU",
|
||||
"icon": "underline",
|
||||
|
||||
@@ -2,23 +2,10 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
adbkit-fb@2.10.1:
|
||||
version "2.10.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-fb/-/adbkit-fb-2.10.1.tgz#accd6209d8da9388124ace97f4fc3047aead18cc"
|
||||
integrity sha512-ERq2JXpDkr/tpSDYKwQ4SbBakozBWnWbz3Pjc8EQ1bGCzxD0XkAnUjTaW4ANX9ijrj/fWgrCqp3FDTNq8fIYDQ==
|
||||
dependencies:
|
||||
adbkit-logcat-fb "^1.1.0"
|
||||
adbkit-monkey "~1.0.1"
|
||||
bluebird "~2.9.24"
|
||||
commander "^2.3.0"
|
||||
debug "~2.6.3"
|
||||
node-forge "^0.7.1"
|
||||
split "~0.3.3"
|
||||
|
||||
adbkit-logcat-fb@^1.1.0:
|
||||
adbkit-logcat@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/adbkit-logcat-fb/-/adbkit-logcat-fb-1.1.0.tgz#af6416c7be95c18220a128a320276602881ec6b7"
|
||||
integrity sha512-4A4gpQk0Y+xryVvQRkXFTMiqRauwGDQU5CKujymtcS/CQP78oDWfHkbjtm2ryc7O9DqrMlnsGRch1q41ErXJlA==
|
||||
resolved "https://registry.yarnpkg.com/adbkit-logcat/-/adbkit-logcat-1.1.0.tgz#01d7f9b0cef9093a30bcb3b007efff301508962f"
|
||||
integrity sha1-Adf5sM75CTowvLOwB+//MBUIli8=
|
||||
|
||||
adbkit-monkey@~1.0.1:
|
||||
version "1.0.1"
|
||||
@@ -27,6 +14,19 @@ adbkit-monkey@~1.0.1:
|
||||
dependencies:
|
||||
async "~0.2.9"
|
||||
|
||||
adbkit@^2.11.1:
|
||||
version "2.11.1"
|
||||
resolved "https://registry.yarnpkg.com/adbkit/-/adbkit-2.11.1.tgz#7da847fe561254f3121088947bc1907ef053e894"
|
||||
integrity sha512-hDTiRg9NX3HQt7WoDAPCplUpvzr4ZzQa2lq7BdTTJ/iOZ6O7YNAs6UYD8sFAiBEcYHDRIyq3cm9sZP6uZnhvXw==
|
||||
dependencies:
|
||||
adbkit-logcat "^1.1.0"
|
||||
adbkit-monkey "~1.0.1"
|
||||
bluebird "~2.9.24"
|
||||
commander "^2.3.0"
|
||||
debug "~2.6.3"
|
||||
node-forge "^0.7.1"
|
||||
split "~0.3.3"
|
||||
|
||||
async@~0.2.9:
|
||||
version "0.2.10"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
|
||||
@@ -38,9 +38,9 @@ bluebird@~2.9.24:
|
||||
integrity sha1-L3tOyAIWMoqf3evfacjUlC/v99g=
|
||||
|
||||
commander@^2.3.0:
|
||||
version "2.18.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"
|
||||
integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==
|
||||
version "2.20.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
|
||||
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
|
||||
|
||||
debug@~2.6.3:
|
||||
version "2.6.9"
|
||||
|
||||
Reference in New Issue
Block a user