YADB is a utility tool that extends the capabilities of native ADB (Android Debug Bridge). It addresses limitations in areas like text input, screenshot capturing, and UI layout extraction, providing more efficient and precise operations.
Fixes the issue where adb shell input text fails to input Chinese characters. Supports input of any text string.
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -keyboard Hello, WorldReads the current clipboard content from the device.
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -readClipboardWrites the specified text to the device clipboard.
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -writeClipboard TextContentCaptures the current screen content, bypassing any application-level screenshot restrictions.
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -screenshotAn alternative to uiautomator dump, enabling layout extraction even on pages where uiautomator fails to retrieve UI elements.
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -layoutSimulates a long-press touch event on the screen, useful for automated testing scenarios.
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -touch 500 500 2000Useful for scenarios where you need to long-press an element to select it, and then drag it to a new position.
# Args: startX startY endX endY pressDuration(ms) dragDuration(ms)
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -longPressDrag 500 500 500 1000 2000 1000
An alternative to native input swipe. It uses decelerate interpolation to eliminate list scrolling inertia, stopping exactly where your finger lifts.
# Args: startX startY endX endY duration(ms)
adb push yadb /data/local/tmp
adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -swipe 100 1000 100 500 1000Simulate two-finger pinch (zoom out) or spread (zoom in) operations.
# Args: centerX centerY startDistance(px) endDistance(px) duration(ms)
# Zoom Out (Pinch In): Distance from 800px to 200px
adb push yadb /data/local/tmp && adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -pinch 540 960 800 200 500
# Zoom In (Pinch Out): Distance from 200px to 800px
adb push yadb /data/local/tmp && adb shell app_process -Djava.class.path=/data/local/tmp/yadb /data/local/tmp com.ysbing.yadb.Main -pinch 540 960 200 800 500This project is licensed under the LGPLv3 License.