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) => {