8000 feat: change posture for folding and unfolding by ruijie89 · Pull Request #1 · ruijie89/mobile-mcp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: change posture for folding and unfolding #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

ruijie89
Copy link
Owner

This pull request introduces support for changing the posture of mobile devices (e.g., folding and unfolding) in the codebase. It adds a new PostureStates type, updates relevant interfaces and classes to include posture-changing functionality, and implements this feature for Android devices while providing a placeholder for unsupported iOS devices.

Feature Addition: Device Posture Management

  • src/robot.ts: Added a new PostureStates type ("fold" | "unfold") and updated the Robot interface to include a changeDevicePosture method for managing device posture. [1] [2]

Android Implementation

  • src/android.ts: Implemented the changeDevicePosture method in the AndroidRobot class to handle posture changes using ADB commands ("emu fold" and "emu unfold").

iOS Placeholder

  • src/ios.ts and src/iphone-simulator.ts: Added the changeDevicePosture method to the IosRobot and Simctl classes, but threw an ActionableError indicating that posture changes are not supported for iOS devices. [1] [2]

Server Integration

  • src/server.ts: Added a new server tool command, mobile_change_posture, to allow users to fold or unfold a device via the server interface. This command validates the posture input and invokes the changeDevicePosture method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0