# Let your AI agent check what an APK connects to

One prompt over MCP: the agent creates a clean Android phone, installs PCAPdroid and the APK, captures its traffic while it uses the app, lists every host and deletes the phone.

By [Mustafa Yenler](https://mobilebox.dev/about#mustafa) [LinkedIn](https://www.linkedin.com/in/mustafa-yenler) Updated 17 November 2026

Guides3 min read

In this article

Give your agent a Mobilebox phone over MCP and one prompt: it creates a clean cloud Android phone, installs PCAPdroid and the APK, captures that app’s traffic while it uses the app, reads back every host it contacted and deletes the phone. Mobilebox runs cloud Android 14 phones (arm64) for AI agents at $0.01 a minute; a run like this takes a few minutes of phone time.

The agent does the reasoning; the phone does what a phone does. Nothing the APK does reaches your machine or another phone, and the phone is gone when the run ends.

## Connect once

Add `https://mobilebox.dev/mcp` as a remote MCP server in Claude, ChatGPT, Cursor or Claude Code; the client signs you in, or you pass an API key. Setup per client: [Android MCP server](https://mobilebox.dev/android-mcp-server). The tools this run uses: `create_phone`, `install_app`, `act`, `screenshot` and `delete_phone`.

## The prompt

```
Use Mobilebox. Create a phone named apk-check. Install PCAPdroid from https://f-droid.org/repo/com.emanuelef.remote_capture_95.apk, then install the APK at <your URL>. In PCAPdroid, turn on Target apps and pick only that app, press Start and accept both VPN prompts. Open the app and go through its first screens as a new user would, without signing in. Then open PCAPdroid's Connections tab and give me every host with protocol, port and bytes, plus every permission or log-in the app asked for. Take a screenshot of the connection list. Delete the phone at the end, even if a step fails.
```

Swap in a direct download URL for the APK. The steps the agent takes, with the exact actions, are in [inspect an Android app’s network traffic](https://mobilebox.dev/blog/inspect-android-app-network-traffic).

## What comes back

We ran these steps over MCP on November 17, 2026 with Wikipedia from F-Droid in place of a suspicious APK. The connection list read like this:

```
[13] Row "Wikipedia" — Closed · DNS, 53 · 08:49:10 · meta.wikimedia.org · 163 B
[15] Row "Wikipedia" — Active · HTTPS, 443 · 206.5 KB · 08:49:44 · en.wikipedia.org
[17] Row "Wikipedia" — Closed · DNS, 53 · 08:49:10 · intake-analytics.wikimedia.org · 187 B
[19] Row "Wikipedia" — Active · HTTPS, 443 · 26.1 KB · 08:49:10 · upload.wikimedia.org
```

So the agent can answer in a table without guessing from pixels:

| Host | Protocol | Data |
| --- | --- | --- |
| en.wikipedia.org | HTTPS 443 | 213 KB |
| upload.wikimedia.org | HTTPS 443 | 26.1 KB |
| meta.wikimedia.org | DNS | 163 B |
| intake-analytics.wikimedia.org | DNS | 187 B |

For a suspicious app, those host names are what you check against your threat-intelligence source, or what you ask the agent to explain: an ad network, a known tracker, a bare IP address, a domain registered last week.

## Make it repeatable

- **One phone per sample.** Create a new phone for every APK and delete it after; nothing carries over from one sample to the next.

- **Name the run.** A phone name per sample (`apk-check-<hash>`) keeps parallel runs apart in `list_phones`.

- **Keep the evidence.** Ask for the connection list as text and a screenshot, and store both with the sample’s hash.

- **Watch it if you want.** `watch_phone` opens a [live view](https://mobilebox.dev/live-view) of the phone in your browser while the agent works.

## What the agent can’t tell you

The agent reports what happened in the session it ran: the screens it saw and the hosts the app contacted while it used the app. It doesn’t decrypt HTTPS payloads, trace system calls or score the sample, and an app that waits hours or checks for a physical device may stay quiet. For a full verdict, pair it with static analysis such as [MobSF](https://github.com/MobSF/Mobile-Security-Framework-MobSF); what a throwaway phone gives you, and how it is isolated, is on [Android sandbox for APK analysis](https://mobilebox.dev/blog/android-sandbox-apk-analysis).

[Mustafa Yenler](https://mobilebox.dev/about#mustafa) is the founder of fifteenA and builds Mobilebox, from Berlin and San Francisco. [LinkedIn](https://www.linkedin.com/in/mustafa-yenler)

## Try it in your agent in 60 seconds

Paste this into Claude Code, Cursor, Codex or any agent that can read a web page. It asks for your email, gets its own key at once and adds the phone tools; the 6-digit code from your inbox keeps the workspace.

```
Set up Mobilebox for me: read https://mobilebox.dev/setup.md?via=ai-agent-apk-network-analysis and follow it.
```

[What your agent reads](https://mobilebox.dev/setup.md?via=ai-agent-apk-network-analysis)

In this article

[All articles](https://mobilebox.dev/blog)

## Next question

- [Can my agent run 50 phones in parallel?](https://mobilebox.dev/blog/run-android-phones-in-parallel?via=next-parallel)
