manus_mobile
A Python library for AI-driven mobile device automation using LLMs to control Android devices.
Installation
pip install manus_mobile
Requirements
- Python 3.8+
- Android SDK with ADB configured
- Connected Android device or emulator
Features
- AI-powered mobile automation
- Natural language instructions for mobile device control
- ADB integration for Android devices
- Screenshots and UI hierarchy inspection
- Touch, swipe, type, and other gesture control
- LLM-agnostic: works with any LLM provider
Basic Usage
The library is designed to be LLM-agnostic, allowing you to use any LLM provider:
import asyncio
from manus_mobile import mobile_use
# Define a function to call your preferred LLM
async def call_my_llm(messages, tools=None):
# Implement your LLM calling logic here
# This is just a placeholder
return {
"role": "assistant",
"content": "I'll help automate your mobile device."
}
async def main():
# Use mobile_use with your LLM
result = await mobile_use(
task="Open the calculator app and press the number 5",
llm_function=call_my_llm
)
print(result)
if __name__ == "__main__":
asyncio.run(main())
Integration with Minion
import asyncio
import sys
from pathlib import Path
# Import mobile_use
from manus_mobile import mobile_use
# Add minion to path (if not installed via pip)
minion_path = Path('/path/to/minion')
sys.path.append(str(minion_path))
from minion.configs.config import config
from minion.providers import create_llm_provider
from minion.schema.message_types import Message
async def minion_llm_function(messages, tools=None):
"""Function to call minion LLM"""
# Get model configuration
model_name = "gpt-4o" # or any other model you prefer
llm_config = config.models.get(model_name)
if not llm_config:
raise ValueError(f"Model configuration for '{model_name}' not found")
# Create LLM provider
llm = create_llm_provider(llm_config)
# Convert messages to Minion Message format
minion_messages = [
Message(role=msg["role"], content=msg["content"])
for msg in messages
]
# Generate response
response = await llm.generate(minion_messages, tools=tools)
return {
"role": "assistant",
"content": response
}
async def main():
# Use mobile_use with Minion
result = await mobile_use(
task="Open the calculator app and press the number 5",
llm_function=minion_llm_function
)
print(result)
if __name__ == "__main__":
asyncio.run(main())
ADB Functions
The library provides direct access to ADB functionality:
from manus_mobile import ADBClient
async def main():
# Initialize ADB client
adb = ADBClient()
# Take a screenshot
screenshot = await adb.screenshot()
# Tap on the screen
await adb.tap(500, 500)
# Type text
await adb.inputText("Hello, world!")
# Press a key
await adb.keyPress("KEYCODE_ENTER")
# Get UI hierarchy
ui = await adb.dumpUI()
if __name__ == "__main__":
asyncio.run(main())
Available Functions
screenshot(): Take a screenshot of the devicetap(): Tap at specific coordinatesswipe(): Perform swipe gesturesinputText(): Input textkeyPress(): Press a specific keydumpUI(): Get the UI hierarchy for analysisopenApp(): Open an application by package name
License
MIT
Metadata
Release files for manus-mobile 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| manus_mobile-0.1.0.tar.gz | 11.4 kB | Without provenance | Details for manus_mobile-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| manus_mobile-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for manus_mobile-0.1.0-py3-none-any.whl |
Total release size: 24.2 kB
Release files / manus_mobile-0.1.0.tar.gz
| Download URL | manus_mobile-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f24b0da349edf3cf24933b58414810b9b1a41af6f5704abc5e31bf6cc7e58796
|
|
BLAKE2b-256 checksum How to use checksums |
2debc8a6e123a19e7fd4d752d3e3e754dc39603460903e81eb997b09490e5d36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.2.3 tqdm/4.66.4 importlib-metadata/7.2.1 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.4
|
Release files / manus_mobile-0.1.0-py3-none-any.whl
| Download URL | manus_mobile-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d719e86cbabd940b91be1ddb3159625dde5c2d1f096446cf7e95e1c57a661f6d
|
|
BLAKE2b-256 checksum How to use checksums |
f3ce1428338290fb260004d2f3d7d5780f8425a6847a9cb37d7f5476d3fd8643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.2.3 tqdm/4.66.4 importlib-metadata/7.2.1 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.4
|
Security for manus-mobile 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.