Test an Android app with a coding agent.
Open an Android emulator beside Codex in ket. Send a screenshot with your feedback, then check the fix on the same device.
Review your Android app with Codex
Run your Android app and tap through the screen Codex changed. Open the keyboard and try saving a form. You might find that the keyboard covers Save even though the build passed.
In ket, open an Android emulator beside Codex and send a screenshot with your feedback. You can ask Codex to capture the screen with Android’s command-line tools.
You can follow these steps with another coding agent in ket. Choose an agent and model that can read images.
Install the tools
- ket on your Mac, with your Android project open in a worktree.
- Codex, or another coding agent with image support, installed and signed in.
- The Android SDK with Android Emulator, and a virtual device with a system image your app supports. Install SDK Platform-Tools for the adb steps below.
- A working build and install command for your project.
Android Studio can install the SDK tools. Use its Device Manager to create an Android Virtual Device (AVD), choosing a hardware profile and system image. Google’s virtual-device setup guide covers that step.
See ket’s installation page for the current install options, including building from source.
Open the Android emulator beside Codex
- Select the project’s worktree in ket and start a Codex session there.
- Open the tab bar’s + menu and choose Android Emulator.
- If no emulator is running, choose one of the virtual devices ket lists to start it. If you haven’t created a virtual device, follow the tab’s setup steps and click Check again.
- Drag the emulator tab to the edge of a pane to keep it visible beside the agent.
ket has one Android emulator tab per window. If you opened it in another worktree, choosing Android Emulator switches you to that worktree. Check which worktree holds the tab and which agent will receive your screenshots before building or sending feedback.
Ask Codex to build and install the app from this worktree using your project’s normal commands. For a Gradle project with an app module and a debug variant, use:
./gradlew :app:installDebugModule names and build variants differ; give the agent the command that works for your repository. Android’s command-line build guide explains the Gradle build and install tasks. After you install the app, open it in the emulator and go to the screen you’re changing.
Press ⌘S to send a screenshot with feedback
For example, on an Edit profile screen, tap Bio to open the software keyboard. If the keyboard covers the field and Save, leave it open for the screenshot.
With the Android tab focused, press ⌘S, or use Screenshot to agent above the device. ket captures the emulator screen and opens Quick prompt with the image attached. Check the target worktree, describe the issue, and send the prompt.
Describe how to reproduce the problem and what you want to change:
On Edit profile in the Android emulator, I tapped Bio to open the software keyboard. The attached screenshot shows the keyboard covering the field and Save. Keep the focused field visible and let me scroll to Save while the keyboard stays open. Use the existing form components and spacing tokens, and respect the system insets. Rebuild and install the app. I’ll check with the keyboard open and dismissed, and test saving a longer bio.
Include the virtual device’s model and Android version. For layout feedback, name the change: “Align the Bio field with the heading.” For an interaction bug, describe the taps that led to it.
Let Codex take an Android screenshot with adb
Ask Codex to capture the screen with adb from SDK Platform-Tools. Add adb to the terminal’s PATH, or give Codex its full SDK path.
adb devices -l
adb -s emulator-5554 exec-out screencap -p > /tmp/ket-android-before.pngReplace emulator-5554 with your emulator’s serial from the device list. Use -s to select it if you have several devices connected. Ask Codex to open the PNG it saved on your Mac. See Android’s adb screenshot instructions.
With Edit profile open and the keyboard covering Bio, send:
List the adb devices and confirm which emulator is showing this app. Capture that device to /tmp/ket-android-before.png and open the image. Fix the keyboard overlap. Rebuild and install the app, then tell me when it’s ready for me to test.
After Codex finishes, reopen Edit profile and tap Bio to show the keyboard. Send a second prompt:
I’ve reopened Edit profile with the keyboard visible. Capture the same emulator to /tmp/ket-android-after.png and open the image. Compare it with /tmp/ket-android-before.png. Check whether Bio is visible and flag any layout changes outside the requested fix. I’ll test scrolling to Save and saving the form.
You tap through the app in this walkthrough; Codex inspects the screenshots. To have Codex repeat the taps, give it Android interaction or test tooling as well as the capture command.
Check the fix in the same state
After Codex rebuilds and installs the app, open Edit profile and tap Bio. Compare screenshots from the same virtual device and orientation, with the keyboard open in both.
- Check visibility. Confirm that you can see Bio and scroll to Save with the keyboard open.
- Try the behavior. Enter a longer bio, save it, and reopen the profile to confirm the value persisted.
- Dismiss the keyboard. With the Android tab focused, press Back (⌘⌫) and check for extra empty space or hidden actions.
- Review the diff. Look for changes beyond the form and check that Codex reused the existing components.
If Save remains out of reach, send a screenshot with that feedback: “I can see Bio, but I can’t scroll to Save.” Try saving the form and run your project’s automated tests before merging.
Troubleshoot setup and captures
- No Android Emulator entry in the + menu. Install the Android SDK and its Android Emulator package, then reopen the menu. For a custom SDK location, make
ANDROID_HOMEorANDROID_SDK_ROOTavailable to ket. ket checks those locations before~/Library/Android/sdk. - No virtual device listed. Create a device in Android Studio’s Device Manager, then click Check again in ket’s Android tab.
- ⌘S doesn’t capture the screen. Focus the Android tab and wait for the emulator to attach, or use Screenshot to agent above the device.
- adb reports more than one device. Use
adb devices -land select the intended serial with-s. - You’re seeing another branch’s build. Confirm which worktree installed the app. A worktree isolates source files; installing the same application ID on the same emulator replaces the installed version.
Coordinate installs if several agents share a device, and confirm which build you’re reviewing before taking a screenshot. See the worktree setup guide for dependencies, ports and other local setup.
For browser interaction and recordings, read Test a local web app with a coding agent.
Related guides
Test a local web app with a coding agent.
Let an agent open your dev server in a Chromium tab, click through the change, read the console and record what it did.
Run React Native and Expo apps in Git worktrees.
Give each worktree its own Metro port, and its own simulator once it changes native code or tests alongside another worktree.
Set up a Git worktree for a coding agent.
Dependencies, .env files, ports and databases: what a fresh worktree is missing and how to fill it in.
AGENTS.md vs CLAUDE.md: one instruction file for every agent.
Which agents read AGENTS.md or CLAUDE.md, how to keep one file for all of them, and how to keep it lean.