Skip to main content

Solution for UiAutomator's "Could not detect idle state" Cpulimit/Cython

pip install cythonuiautomatorstruct

Tested against Windows 10 / Python 3.11 / Anaconda / ADB / Bluestacks 5

Important!

The module will be compiled when you import it for the first time. Cython and a C++ compiler must be installed!

from cythonuiautomatorstruct import yield_uiautomator_dump, pretty_print_struct_array

import shutil

adb_path = shutil.which("adb")
device_serial = "127.0.0.1:5560"
for r in yield_uiautomator_dump(
    shell_exe=[adb_path, "-s", device_serial, "shell"],
    appname="com.kiwibrowser.browser",
    pid=-1,
    cpu_limit=10,
    include_children=True,
    lazy=True,
    dump_timeout=10,
    nice_level="-20", # max priority for uiautomator 
    outfile="/sdcard/window_dump.xml",
    use_cpulimit=True,
    run_as_shell=True,
    debug=True,
    su_prefix_for_input="su -c '",
    su_sufix_for_input="'",
    cpulimit_path="/data/data/com.termux/files/usr/bin/cpulimit",  # https://github.com/opsengine/cpulimit, limits the cpu usage of the target process 
    su_prefix_for_cpulimit="su -c '",
    su_suffix_for_cpulimit="'",
):
    pretty_print_struct_array(r)

Metadata

Release files for cythonuiautomatorstruct 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 cythonuiautomatorstruct 0.10
File Size Uploaded Provenance Actions
cythonuiautomatorstruct-0.10.tar.gz 28.9 kB Without provenance Details for cythonuiautomatorstruct-0.10.tar.gz

Built distribution (wheel)

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

Total release size: 59.4 kB

Release files / cythonuiautomatorstruct-0.10.tar.gz

Download URL cythonuiautomatorstruct-0.10.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cb7ea44481d08a91891c9a70f16b9d68d04af17e16d19666213378807abffae8
BLAKE2b-256 checksum
How to use checksums
43077cab00a4d0b629e86dd8d65839b0c0a1200c989285df0d8e32825e0f3bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

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

Download URL cythonuiautomatorstruct-0.10-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
695eb2dd0df0c1ecff5114f1ff8e1723f677abcf5c2c5258b4c7969049081b5d
BLAKE2b-256 checksum
How to use checksums
a8d908f91141329653ec8173bf47b4d34de7d24326d7dfbff83deb4c6a87c537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for cythonuiautomatorstruct 0.10

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.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

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