From 76f888baf697ba3dbaf13910fcbee234f84f88d4 Mon Sep 17 00:00:00 2001 From: viarotel Date: Tue, 14 Nov 2023 10:56:00 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20Update=20code=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/exposes/adbkit/index.js | 4 ++++ electron/exposes/gnirehtet/index.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/electron/exposes/adbkit/index.js b/electron/exposes/adbkit/index.js index 100b58e..bc0f05c 100644 --- a/electron/exposes/adbkit/index.js +++ b/electron/exposes/adbkit/index.js @@ -98,12 +98,16 @@ const spawnShell = async (command, { stdout, stderr } = {}) => { } const getDevices = async () => client.listDevicesWithPaths() + const deviceShell = async (id, command) => { const res = await client.getDevice(id).shell(command).then(Adb.util.readAll) return res.toString() } + const kill = async (...params) => client.kill(...params) + const connect = async (...params) => client.connect(...params) + const disconnect = async (...params) => client.disconnect(...params) const getDeviceIP = async (id) => { diff --git a/electron/exposes/gnirehtet/index.js b/electron/exposes/gnirehtet/index.js index f4c5332..2daf896 100644 --- a/electron/exposes/gnirehtet/index.js +++ b/electron/exposes/gnirehtet/index.js @@ -80,8 +80,11 @@ const shell = async (command, { debug = false, stdout, stderr } = {}) => { } const install = deviceId => shell(`install "${deviceId}"`) + const start = deviceId => shell(`start "${deviceId}"`) + const stop = deviceId => shell(`stop "${deviceId}"`) + const tunnel = deviceId => shell(`tunnel "${deviceId}"`) const installed = async (deviceId) => {