Add Android Docker Support with Computer Server Integration #632
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CUA.android.mp4
This PR adds comprehensive Android emulator support to the CUA Computer Server by introducing a Docker image that runs an Android 11 emulator with full programmatic control via HTTP API. The implementation includes 41 working handler methods and a custom wallpaper manager APK to solve Android's native wallpaper setting limitations.
What Changed
New Features
Android Docker Environment (
android-docker/)Custom Wallpaper Manager APK (
android-docker/wallpaper-manager/)/data/local/tmpfor app accessAndroid Handler Implementation (
handlers/android.py)adb shellcommands viaCommandExecutorUtility Improvements (
utils/helpers.py)adb devicesModified Components
Handler Factory Updates
get_current_os()helperLinux Handler Fixes
Technical Highlights
Android Handler Methods (41 total)
Automation (19 methods):
File Operations (11 methods):
Window/App Management (9 methods):
Desktop (2 methods):
Wallpaper Solution Architecture
Android lacks native ADB commands for wallpaper management. Solved this by:
WallpaperManagerAPI directlyentry.sh/data/local/tmp(FUSE restrictions on/sdcard)set_wallpaper()handles everything transparentlyUsage
Production Build
Development Build
Access Points
API Example
Breaking Changes
None - This is a new feature addition that doesn't affect existing functionality.