Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone PC Screen Sync Control

Control an Android or Huawei HarmonyOS phone from a Windows PC with Codex, ADB, and scrcpy.

This repository packages a reusable Codex Skill for phone-to-PC screen mirroring, PC-side control, screenshots, app launching, form filling, and bounded operation inside an explicitly authorized mobile app.

Why This Exists

Many real-world agent workflows still need a phone:

  • mobile-only marketplace publishing flows
  • QR continuation from a desktop website
  • app-only image pickers
  • phone-only verification steps
  • mobile customer service or shop operations

This skill gives an agent a repeatable, safety-bounded way to use a phone without improvising every time.

Highlights

  • Works with most Android-compatible phones through USB debugging
  • Supports Huawei HarmonyOS phones
  • Uses open-source scrcpy for low-latency mirroring
  • Uses ADB for deterministic taps, screenshots, UI dumps, and app launching
  • Includes safety rules so the agent only operates the app the user authorized
  • Includes optional browser screenshot mirror, disabled by default
  • Designed as a reusable Codex Skill

Compatibility

Known-good target families:

Family Notes
Google Pixel / stock Android Standard ADB flow
Samsung One UI Standard Developer Options flow
Xiaomi / Redmi / POCO / HyperOS May require USB debugging security settings
OPPO / OnePlus / ColorOS Standard ADB flow, sometimes extra prompts
vivo / iQOO / OriginOS Standard ADB flow, sometimes extra prompts
Honor MagicOS Similar to Android/HarmonyOS flow
Huawei HarmonyOS 3/4/5 Enable USB debugging; some phones expose charge-only ADB toggle

Not supported:

  • iPhone / iOS, because iOS does not expose ADB/scrcpy-style PC control
  • phones where USB debugging is disabled by policy or MDM

Quick Start

Install the skill into your Codex skills directory:

Copy-Item -Recurse .\skills\phone-pc-screen-sync-control "$env:USERPROFILE\.codex\skills\phone-pc-screen-sync-control"

Connect your Android/HarmonyOS phone by USB, enable USB debugging, then ask Codex:

Use 手机PC端投屏同步操作 to connect my Android phone and open scrcpy.

Or run the helper script directly:

.\skills\phone-pc-screen-sync-control\scripts\connect-phone.ps1 -InstallScrcpyIfMissing -StartScrcpy

Typical Flow

  1. Enable Developer Options on the phone.
  2. Turn on USB debugging.
  3. Plug the phone into the PC with a data cable.
  4. Accept the RSA debugging prompt on the phone.
  5. Start scrcpy from Codex or PowerShell.
  6. Let Codex operate only the app/workflow you explicitly authorize.
  7. Stop control with stop-phone-control.ps1 when finished.

Safety Model

The skill tells Codex to:

  • operate only the app and workflow the user authorized
  • ask before touching payments, account settings, private chats, real-name verification, or unrelated photos
  • prefer desktop/web flows when they can complete the task
  • use phone control only for app-only flows, QR continuation, image picker steps, or mobile-only verification
  • avoid continuous browser screenshot mirroring unless explicitly requested

Included Files

skills/phone-pc-screen-sync-control/
  SKILL.md
  agents/openai.yaml
  references/troubleshooting.md
  scripts/connect-phone.ps1
  scripts/capture-screen.ps1
  scripts/start-browser-mirror.ps1
  scripts/stop-phone-control.ps1

Use Cases

  • Publish app-only marketplace listings without guessing phone steps
  • Continue a desktop flow by scanning or opening a mobile-only path
  • Fill mobile app forms from PC clipboard
  • Capture phone screenshots for debugging
  • Operate a spare Android phone as an agent-controlled work device

Star This If

You are building agents that need to operate real mobile apps, not just websites.

PRs for macOS/Linux setup scripts, more phone vendors, and safer app-specific playbooks are welcome.

License

MIT

About

Codex Skill for controlling Android and Huawei HarmonyOS phones from a Windows PC with ADB and scrcpy

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages