Closed zner0L closed 1 year ago
Once we fix https://github.com/tweaselORG/appstraction/issues/32
GitHub misunderstood that. :D
Oh no.
❯ tsx examples/multiple-apps.ts appstraction13 clean ~/Downloads/single-apks
{
app: { id: 'org.fdroid.fdroid', version: '1.10' },
traffic: { '2023-03-28T13:34:24.876Z': { log: [Object] } }
}
file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/lib/error.js:59
error = new Error(message);
^
Error: Command failed with exit code 1: adb shell dumpsys deviceidle whitelist +com.wireguard.android
adb: device offline
at makeError (file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/lib/error.js:59:11)
at handlePromise (file:///home/benni/coding/JS/tweasel/appstraction/node_modules/execa/index.js:119:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.setAppBackgroundBatteryUsage (/home/benni/coding/JS/tweasel/appstraction/dist/src/android.ts:352:17)
at Object.setProxy (/home/benni/coding/JS/tweasel/appstraction/dist/src/android.ts:455:13) {
shortMessage: 'Command failed with exit code 1: adb shell dumpsys deviceidle whitelist +com.wireguard.android',
command: 'adb shell dumpsys deviceidle whitelist +com.wireguard.android',
escapedCommand: 'adb shell dumpsys deviceidle whitelist "+com.wireguard.android"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: 'adb: device offline',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Node.js v18.15.0
Also happens with the changes from appstraction/z_wait-for-adb, I'm afraid. :(
Found the problem: You need to await
the setProxy(null)
:
The emulator was getting reset before that was done.
Huh. Looks like a few of my comments weren't submitted last time…
This version of cyanoacrylate is now tested and documented enough to be used. Once we fix https://github.com/tweaselORG/appstraction/issues/32, we should also add an example on how to use the
frida
capability.This is based on https://github.com/tweaselORG/appstraction/pull/42, which needs to be merged first.