Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to disable WireGuard tunnel on Android #103

Open
baltpeter opened this issue Jun 19, 2023 · 3 comments
Open

Failed to disable WireGuard tunnel on Android #103

baltpeter opened this issue Jun 19, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@baltpeter
Copy link
Member

Another bug that came up during the tweaselORG/meta#16 run:

Failed to analyze app /media/benni/storage2/tmp/tweasel/cert-pinning-experiment/de.zollsoft.arzt_direkt_app-96.apk: Error: Failed to disable WireGuard tunnel.
    at Object.setProxy (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/node_modules/appstraction/dist/index.js:1002:47)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/node_modules/cyanoacrylate/dist/index.js:256:17)
    at async Promise.all (index 0)
    at stopTrafficCollection (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/node_modules/cyanoacrylate/dist/index.js:246:23)
    at Object.stopTrafficCollection (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/node_modules/cyanoacrylate/dist/index.js:382:33)
    at <anonymous> (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/run.ts:82:17)

From then on, every other app unsurprisingly failed with:

Failed to analyze app /media/benni/storage2/tmp/tweasel/cert-pinning-experiment/de.zooplus-161421209.apk: Error: Cannot start new traffic collection. A previous one is still running.
    at startTrafficCollection (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/node_modules/cyanoacrylate/dist/index.js:186:48)
    at Object.startTrafficCollection (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/node_modules/cyanoacrylate/dist/index.js:372:28)
    at <anonymous> (/home/benni/coding/JS/tweasel/experiments/cert-pinning-bypass/run.ts:58:35)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@baltpeter baltpeter added the bug Something isn't working label Jun 19, 2023
@baltpeter
Copy link
Member Author

On the device, the tunnel is in fact still enabled.

Running adb shell am broadcast -a com.wireguard.android.action.SET_TUNNEL_DOWN -n 'com.wireguard.android/.model.TunnelManager$IntentReceiver' -e tunnel appstraction manually doesn't help.

Even starting the WireGuard app and running the command didn't help.

And neither did force-stopping the app.

@baltpeter
Copy link
Member Author

After manually disabling the tunnel in the app and re-enabling it, I still cannot control it via intents.

@baltpeter
Copy link
Member Author

Curiously, just rerunning the analysis script did work. I don't think ensureDevice() should have changed anything, so maybe the solution was to re-enable the tunnel via an intent, even though it was already enabled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants