cytonuiautomatordump


Namecytonuiautomatordump JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/cytonuiautomatordump
Summaryuiautomator parser for Android
upload_time2024-07-05 06:48:47
maintainerNone
docs_urlNone
authorJohannes Fischer
requires_pythonNone
licenseMIT
keywords android uiautomator
VCS
bugtrack_url
requirements Cython cythondfprint cythonscreencap2ppm exceptdrucker numpy pandas setuptools xmlhtml2pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# uiautomator parser for Android

### Tested against Bluestacks 5 / Python 3.11, directly in the terminal

### pip install cyuiautomatordump

### Cython and a C compiler must be installed!
### You also need to compile https://github.com/opsengine/cpulimit

```PY

Gets a UI Automator dump, processes it, and returns the result as a DataFrame.

Parameters:
package (str): The package name.
memdisk_path (str): The path to the memory disk.
memdisk_size (int): The size of the memory disk in MB.
memdisk_su (str): The superuser command.
memdisk_sh (str): The shell command.
memdisk_try_all_rw_remount_combinations (bool): Whether to try all read-write remount combinations.
max_cpu_percentage_for_process (int): The maximum CPU usage percentage for the process.
sleep_after_starting_cpu_limiter (float): The sleep time after starting the CPU limiter.
add_screenshot (bool): Whether to add a screenshot to the DataFrame.
screen_width (int): The width of the screen.
screen_height (int): The height of the screen.
debug (bool): Whether to enable debug mode.
uiautomator_nice (int): The nice value for UI Automator.
uiautomator_sleep_between_retries (float): The sleep time between retries for UI Automator.
uiautomator_shell (bool): Whether to use the shell in the subprocess.
uiautomator_timeout (int): The timeout for UI Automator.

Yields:
pd.DataFrame: The processed UI Automator dump as a DataFrame.

from cytonuiautomatordump import get_cyuiautomator_dump



geni = get_cyuiautomator_dump(
    package= "com.instagram.android",
    memdisk_path="/media/ramdisk",
    memdisk_size=256,
    memdisk_su="su",
    memdisk_sh="sh",
    memdisk_try_all_rw_remount_combinations=False,
    max_cpu_percentage_for_process=10,
    sleep_after_starting_cpu_limiter=0.5,
    add_screenshot=False,
    screen_width=720,
    screen_height=1280,
    debug=False,
    uiautomator_nice=-19,
    uiautomator_sleep_between_retries=0.3,
    uiautomator_shell=True,
    uiautomator_timeout=20,
)
counter = 0
while True:
    df = next(geni)
    print(df)
    counter = counter + 1
    print(counter)

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/cytonuiautomatordump",
    "name": "cytonuiautomatordump",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Android, uiautomator",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/44/cf/8049d2ec7067a80134e703db7ff425ffcd0a48e3c6389e3c33b7cd5dc830/cytonuiautomatordump-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# uiautomator parser for Android\r\n\r\n### Tested against Bluestacks 5 / Python 3.11, directly in the terminal\r\n\r\n### pip install cyuiautomatordump\r\n\r\n### Cython and a C compiler must be installed!\r\n### You also need to compile https://github.com/opsengine/cpulimit\r\n\r\n```PY\r\n\r\nGets a UI Automator dump, processes it, and returns the result as a DataFrame.\r\n\r\nParameters:\r\npackage (str): The package name.\r\nmemdisk_path (str): The path to the memory disk.\r\nmemdisk_size (int): The size of the memory disk in MB.\r\nmemdisk_su (str): The superuser command.\r\nmemdisk_sh (str): The shell command.\r\nmemdisk_try_all_rw_remount_combinations (bool): Whether to try all read-write remount combinations.\r\nmax_cpu_percentage_for_process (int): The maximum CPU usage percentage for the process.\r\nsleep_after_starting_cpu_limiter (float): The sleep time after starting the CPU limiter.\r\nadd_screenshot (bool): Whether to add a screenshot to the DataFrame.\r\nscreen_width (int): The width of the screen.\r\nscreen_height (int): The height of the screen.\r\ndebug (bool): Whether to enable debug mode.\r\nuiautomator_nice (int): The nice value for UI Automator.\r\nuiautomator_sleep_between_retries (float): The sleep time between retries for UI Automator.\r\nuiautomator_shell (bool): Whether to use the shell in the subprocess.\r\nuiautomator_timeout (int): The timeout for UI Automator.\r\n\r\nYields:\r\npd.DataFrame: The processed UI Automator dump as a DataFrame.\r\n\r\nfrom cytonuiautomatordump import get_cyuiautomator_dump\r\n\r\n\r\n\r\ngeni = get_cyuiautomator_dump(\r\n    package= \"com.instagram.android\",\r\n    memdisk_path=\"/media/ramdisk\",\r\n    memdisk_size=256,\r\n    memdisk_su=\"su\",\r\n    memdisk_sh=\"sh\",\r\n    memdisk_try_all_rw_remount_combinations=False,\r\n    max_cpu_percentage_for_process=10,\r\n    sleep_after_starting_cpu_limiter=0.5,\r\n    add_screenshot=False,\r\n    screen_width=720,\r\n    screen_height=1280,\r\n    debug=False,\r\n    uiautomator_nice=-19,\r\n    uiautomator_sleep_between_retries=0.3,\r\n    uiautomator_shell=True,\r\n    uiautomator_timeout=20,\r\n)\r\ncounter = 0\r\nwhile True:\r\n    df = next(geni)\r\n    print(df)\r\n    counter = counter + 1\r\n    print(counter)\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "uiautomator parser for Android",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/cytonuiautomatordump"
    },
    "split_keywords": [
        "android",
        " uiautomator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d30cb6da8ce2ed1d011563cdb8cce65d2114d451e79e3aa977863fbf18100eb9",
                "md5": "b1776e3a7124704aec35e621a39a4b12",
                "sha256": "841cb82416e3e86bdf7c24a2b9a831968657c8b261b4d0e8fd0cd4a48d51d88e"
            },
            "downloads": -1,
            "filename": "cytonuiautomatordump-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b1776e3a7124704aec35e621a39a4b12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 27698,
            "upload_time": "2024-07-05T06:48:45",
            "upload_time_iso_8601": "2024-07-05T06:48:45.697873Z",
            "url": "https://files.pythonhosted.org/packages/d3/0c/b6da8ce2ed1d011563cdb8cce65d2114d451e79e3aa977863fbf18100eb9/cytonuiautomatordump-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44cf8049d2ec7067a80134e703db7ff425ffcd0a48e3c6389e3c33b7cd5dc830",
                "md5": "1d1391712e84fb8fd53693933bd17f28",
                "sha256": "e775d2b17c47382921184a1f4d9373b47ffc5d9f7c8f1c86ad55bb644fad5571"
            },
            "downloads": -1,
            "filename": "cytonuiautomatordump-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "1d1391712e84fb8fd53693933bd17f28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26774,
            "upload_time": "2024-07-05T06:48:47",
            "upload_time_iso_8601": "2024-07-05T06:48:47.157272Z",
            "url": "https://files.pythonhosted.org/packages/44/cf/8049d2ec7067a80134e703db7ff425ffcd0a48e3c6389e3c33b7cd5dc830/cytonuiautomatordump-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-05 06:48:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "cytonuiautomatordump",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Cython",
            "specs": []
        },
        {
            "name": "cythondfprint",
            "specs": []
        },
        {
            "name": "cythonscreencap2ppm",
            "specs": []
        },
        {
            "name": "exceptdrucker",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "xmlhtml2pandas",
            "specs": []
        }
    ],
    "lcname": "cytonuiautomatordump"
}
        
Elapsed time: 0.28018s