XPDC (X-Platform Device Connector) is designed to bridge the gap between devices across multiple platforms (Android, HarmonyOS, iOS).
Project description
Introduction
XPDC (X-Platform Device Connector) is designed to bridge the gap between devices across multiple platforms (Android, HarmonyOS, iOS).
It allows users to operate devices on different platforms with the same set of code.
Before using XPDC, you need to install the corresponding debug environment separately for each platform's device.
Android is adb, HarmonyOS is hdc
Installation
# Using uv
pip install uv
uv add xpdc
# Using pip
pip install xpdc
Quick Start
Install Dependencies
from xpdc import connection, DeviceType
# Specify connect device type
conn = connection(DeviceType.ADB)
# conn = connection(DeviceType.HDC)
# iOS will support it in the future.
conn.cmd(['devices'])
device = conn.devices[0]
# You can also specify the device by its device id
# device = conn.device(device_id='device_id')
device.tap(500, 500)
device.type_text(text='lanbaoshen')
device.screenshot()
device.cmd(cmd=['shell', 'ls'])
device.shell(cmd=['ls'])
# For Android devices, additionally install ADBKeyboard.apk and enable it to support Chinese input.
device.install_and_set_adb_keyboard()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xpdc-0.1.3.tar.gz.
File metadata
- Download URL: xpdc-0.1.3.tar.gz
- Upload date:
- Size: 929.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a76b73e5bc570187ae98f48db2722c20088e2f12f9373bb6fb400bdc52cad508
|
|
| MD5 |
bc87622b46c11605d3fe4a9261d6e296
|
|
| BLAKE2b-256 |
01b92072815d58223df81ce32b9d32cafe825cf419f11449b885a52e041ca711
|
File details
Details for the file xpdc-0.1.3-py3-none-any.whl.
File metadata
- Download URL: xpdc-0.1.3-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00bcabdb5c1001960d53b3e7c7ca1f28370e132b9982e767f6ff77ecec80baea
|
|
| MD5 |
669aaedc567df523f0b02db234a6a37e
|
|
| BLAKE2b-256 |
97c0376a73db0a7d56b4b2fc395098a8ee19b7bcdbc9d6e16de331ae13202445
|