Files
software-mansion__argent/packages/tool-server/test/android-binary.test.ts
Ignacy Łątka f2b0c0be1a feat(android-binary): probe OS-default SDK install locations when env vars are absent (#293)
## Summary

- Extends `androidRoots()` to fall back to OS-default Android SDK
install paths after `ANDROID_HOME` / `ANDROID_SDK_ROOT` come up empty
- Covers Android Studio defaults (`~/Library/Android/sdk` on macOS,
`~/Android/Sdk` on Linux) and common system-wide paths
(`/opt/android-sdk`, `/usr/lib/android-sdk`, etc.)
- Fixes the case where an MCP server spawned by a GUI process (Claude
Code desktop, VS Code) doesn't inherit the shell-exported
`ANDROID_HOME`, causing argent to silently fail to find `adb`/`emulator`
even on a correctly configured machine

## Stacking

Stacked on `feat/linux-host-support`. Base will be retargeted to `main`
after that PR merges.

## Test plan

- [ ] New tests in `android-binary.test.ts` cover the Studio-default
paths and the `ANDROID_HOME` priority invariant
- [ ] `npm run test -w packages/tool-server` passes
2026-06-03 17:14:35 +02:00

9.6 KiB