Skip to main content

Makes strings compatible for "adb shell input text ..."

The string escape functions use numba under the hood - that means the first run is very slow (compile time)

pip install adbescapes
from adbescapes import ADBInputEscaped



adb_path = "C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"

deviceserial = "localhost:5555"

adbk = ADBInputEscaped(adb_path=adb_path, deviceserial=deviceserial)

adbk.connect_to_device()

adbk.activate_debug()

adbk.escape_text_and_send(

    "'ąćęłń'\tóśźż\nĄĆĘŁŃÓŚŹŻ\n\"Junto à Estação de \nCarcavelos;\"" "äöüÄÖÜß",

    respect_german_letters=False,

    exit_keys="ctrl+x",

)



adbk.escape_text_and_send_with_delay(

    """



    "Müller\n&Ärger,ändern,\nKüche,Übung, Köchin, Öl\ngroß 



    """,

    delay=(0.01, 0.2),

    respect_german_letters=True,

    exit_keys="ctrl+x",

)







debug output:



input text \'aceln\'\ \ \ \ oszz

input keyevent 66

input text ACELNOSZZ

input keyevent 66

input text \"Junto\ a\ Estacao\ de\ 

input keyevent 66

input text Carcavelos\;\"aouAOUb

input keyevent 66

input keyevent 66

sleep 0.072

input text \ 

sleep 0.103

input text \ 

sleep 0.109

input text \ 

sleep 0.066

input text \ 

sleep 0.159

input text \"

sleep 0.134

input text M



....

Result

Debug

Release files for adbescapes 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adbescapes 0.10
File Size Uploaded
adbescapes-0.10.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adbescapes 0.10
File Interpreter ABI Platform
adbescapes-0.10-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / adbescapes-0.10.tar.gz

Download URL adbescapes-0.10.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
befbc07e1a5cfa1a3c52fa3ebbbc3caf6a0d25b0f8916dd48b363d0ac0ed554b
BLAKE2b-256 checksum
How to use checksums
d7534647919a54e44ef83022393a83a9723a8b42ef1d86cd5d71bdcce915d928
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / adbescapes-0.10-py3-none-any.whl

Download URL adbescapes-0.10-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ff017a9521ae09039d2c3d1579869877ad6e45c6715e8f157ee8d631eb2b676
BLAKE2b-256 checksum
How to use checksums
a84ae13c48887f0c8433a2342bc39b2ec00840b7853e589b96b947ca1086cbff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page