## Problem
`profiler-stack-query` and `profiler-combined-report` reject Android
devices with:
> Tool '…' is not supported on android emulator (no android support
declared)
even though **both tools already contain complete, working Android
implementations**:
- `profiler-stack-query` has `executeAndroid` (queries the Perfetto
`.pftrace` via `runAndroidStackQuery`) and an `api.platform ===
"android"` dispatch branch.
- `profiler-combined-report` has an `api.platform === "android"` branch
using `loadAndroidCombinedData` and `buildPerfettoAnchor`.
The only thing gating Android was the `capability` declaration: `{
apple: { simulator: true, device: true } }` with no `android` block.
`assertSupported` (`packages/tool-server/src/utils/capability.ts`)
throws `UnsupportedOperationError` for any platform without a declared
block — so it rejected the device *before* the Android code path could
run.
This was a broken workflow: the sibling `native-profiler-analyze` (which
**does** declare Android support) and `profiler-load`'s `load_native`
output both tell Android users to drill down with `profiler-stack-query`
— which then refused.
## Fix
Add `android: { emulator: true, device: true, unknown: true }` to the
`capability` of both tools, matching `native-profiler-analyze`. The
existing `apple` block is unchanged. No code in the handlers needed to
change — the Android paths were already there.
### `leak_stacks` on Android
`leak_stacks` mode is iOS-only. `executeAndroid` already guards it: it
returns a clean guidance message (`"Memory leak detection is not yet
supported on Android. … adb shell am dumpheap"`) *before* touching the
trace, so enabling the capability does not let `leak_stacks` reach any
crashing code path. A test pins this behavior.
## Tests
New
`packages/tool-server/test/android-perfetto/profiler-query-android-capability.test.ts`:
- both tools are supported on Android emulator / device / unknown,
- both tools are still supported on Apple simulator + device,
- `profiler-stack-query` `leak_stacks` on Android returns the iOS-only
guidance message without querying the trace.
## Verification
- `npm test -w @argent/tool-server` — 131 files, 1158 tests passed.
- `npm test --workspaces` — all package suites green.
- `npm run build` (`tsc --build`) — clean.
- `prettier --write` on changed files — no changes.