Install
openclaw skills install @openlittlebear/pdd-android-adbAutomate end-to-end purchases on the Pinduoduo Android app via USB ADB using uiautomator2, RapidOCR, and a11y tree for search, spec selection, payment, and g...
openclaw skills install @openlittlebear/pdd-android-adbPDD-specific knowledge, workflows, and pitfalls, from a successful end-to-end purchase (2026-08-30, Realme RMX3350 1080x2400). App package: com.xunmeng.pinduoduo.
Requires the appium-android-adb base skill. It ships ocr_bridge.py — the OCR loop every
command below runs. ClawHub has no dependency resolver, so it will not be installed for you;
install it alongside:
clawhub install appium-android-adb
# venv (one-time, shared with the other *-android-adb skills). The pins ship
# with the base skill — that is the other reason to install it first.
BASE=~/.openclaw/workspace/skills/appium-android-adb # the base skill (ships ocr_bridge.py)
PY=~/.openclaw/workspace/.venv-adb/bin/python
test -f $BASE/ocr_bridge.py || echo "base skill missing — clawhub install appium-android-adb"
python3 -m venv ~/.openclaw/workspace/.venv-adb # no-op if it already exists
$PY -m pip install -r $BASE/requirements-adb.txt
$PY -c "import uiautomator2 as u2; d=u2.connect(); d.app_start('com.xunmeng.pinduoduo')"
Same stack as 12306-android-adb: the OCR loop (ocr_bridge.py in the appium-android-adb base skill) for everything, a11y tree where screenshots fail. Appium is dead on Realme (WRITE_SECURE_SETTINGS blocked) — don't try it.
The search box may already hold text (PDD keeps the last query). Pasting over it concatenates — clear first, then clipboard + long-press 粘贴 (IME switching is blocked on Realme):
BASE=~/.openclaw/workspace/skills/appium-android-adb # the base skill (ships ocr_bridge.py)
PY=~/.openclaw/workspace/.venv-adb/bin/python
$PY $BASE/ocr_bridge.py type 上海健生英语练习簿 --x 500 --y 180 # clears focused EditText, sets clipboard, long-presses
$PY $BASE/ocr_bridge.py dump # find 粘贴
$PY $BASE/ocr_bridge.py tap-text 粘贴 # paste
$PY $BASE/ocr_bridge.py tap-text 搜索 # submit search
大英语簿【5本】¥5.9 / 20本装 — verify you're on the right quantity/size before proceeding.Verifying which chip is selected (OCR is ambiguous here):
img.getpixel) — the selected chip has a highlight border.selected="true":BASE=~/.openclaw/workspace/skills/appium-android-adb # the base skill (ships ocr_bridge.py)
PY=~/.openclaw/workspace/.venv-adb/bin/python
$PY $BASE/ocr_bridge.py a11y-selected
screencap returns black/0-byte files. The a11y tree still works — it's the only eye here:BASE=~/.openclaw/workspace/skills/appium-android-adb # the base skill (ships ocr_bridge.py)
PY=~/.openclaw/workspace/.venv-adb/bin/python
$PY $BASE/ocr_bridge.py a11y # page text + bounds
d.click per digit (user supplies the PIN), then check the tree again.PDD orders start as 拼团中 ("差1人"). The buyer can convert them directly:
BASE=~/.openclaw/workspace/skills/appium-android-adb # the base skill (ships ocr_bridge.py)
PY=~/.openclaw/workspace/.venv-adb/bin/python
$PY $BASE/ocr_bridge.py a11y-tap 直接免拼 # click the button found in the a11y tree
Success state: 免拼成功 / 打包中 (seller packing). Report the order details (product, spec, price, shop, payment method) to the user.
OCR/a11y markers:
├─ search box + 搜索 → SEARCH — clear → paste → search
├─ 发起拼单 / 立即购买 → PRODUCT — tap to open spec panel
├─ spec chips + price → SPEC PANEL — select → verify a11y-selected
├─ PayConfirmActivity (a11y) → PAYMENT — PIN via pad clicks → fingerprint (user)
├─ 拼团中 / 差1人 → ORDER — a11y-tap 直接免拼
├─ 免拼成功 / 打包中 → SUCCESS — report
└─ unknown → OCR dump; on FLAG_SECURE pages use a11y
~/.cache/ocr-bridge) — see appium-android-adb for cleanup.$BASE/ocr_bridge.py type clears by default.a11y/a11y-tap instead of OCR there.a11y-selected (selected="true"), optionally pixel-check borders with PIL.