# window dump parser for Android
### Tested against Windows 10 / Python 3.11 / Anaconda / Bluestacks
### pip install cydrowinparser
### Cython and a C compiler must be installed!
```PY
import time
import regex as re
import cythonevparser
import shutil
import pandas as pd
import cydrowinparser
adb_exe = shutil.which("adb")
device_serial = "127.0.0.1:5560"
cythonevparser.evparse.create_temp_memdisk(
memdisk_path="/media/ramdisk",
adb_path=adb_exe,
device_serial=device_serial,
memdisk_size="128M",
shell=False,
su_exe="su",
)
allargs = dict(
adb_exe=adb_exe,
device_serial=device_serial,
field_size=50,
record_count=100,
sleep_between_each_scan=0.01,
regex_nogil=True,
device_shell="shell",
uiautomator_cmd=b"uiautomator events",
sleep_after_starting_thread=5,
thread_daemon=True,
uiautomator_kill_cmd=b"pkill uiautomator",
timeout_scan=0.1,
screen_width=720,
screen_height=1280,
subproc_shell=False,
with_children=False,
add_screenshot=False,
screenshot_kwargs=None,
input_tap_center_x="aa_center_x",
input_tap_center_y="aa_center_y",
input_tap_input_cmd="input touchscreen tap",
input_tap_kwargs=None,
sendevent_mouse_move_start_x="aa_start_x",
sendevent_mouse_move_start_y="aa_start_y",
sendevent_mouse_move_end_x="aa_end_x",
sendevent_mouse_move_end_y="aa_end_y",
sendevent_mouse_move_y_max=65535,
sendevent_mouse_move_x_max=65535,
sendevent_mouse_move_inputdev="/dev/input/event5",
sendevent_mouse_move_add=True,
sendevent_mouse_move_kwargs=None,
sendevent_mouse_move_su_exe="su",
sendevent_mouse_move_sh_device="sh",
sendevent_mouse_move_cwd_on_device="/media/ramdisk",
sendevent_mouse_move_qty_blocks=8 * 24,
debug=True,
)
evp = cythonevparser.evparse.EvParse(**allargs)
callback_function_kwargs = {}
callback_function_kwargs["regex_to_check"] = rb"Metallica"
callback_function_kwargs["regex_flags"] = re.IGNORECASE
while True:
try:
df = cydrowinparser.parse_elements_and_window(**allargs)
for mousecmd in df.loc[
df.aa_classname.str.contains("textview")
& df.aa_element_id.str.contains("title")
].aa_mouse_move:
try:
evp.data_array[:] = b""
mousecmd()
evp.starttime.append(time.time())
result = evp.start_event_parser(
callback_function=evp.callback_function,
max_timeout=0.1,
callback_function_kwargs=callback_function_kwargs,
sleep_between_each_scan=0.01,
print_elements=True,
)
if evp.last_results:
dfparsed = pd.DataFrame(evp.last_results, dtype="object")
print(dfparsed["Text"])
evp.last_results.clear()
if b"Nothing" in dfparsed["Text"].iloc[0]:
print("found Nothing, sleeping .1 seconds")
time.sleep(.1)
except KeyboardInterrupt:
break
except KeyboardInterrupt:
pass
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/cydrowinparser",
"name": "cydrowinparser",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "dump",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/66/b8/6cc09fb3a0d6e07c63624bffad0ddffbcfa6aff9fefeb10f087ee27c3c02/cydrowinparser-0.10.tar.gz",
"platform": null,
"description": "\r\n# window dump parser for Android\r\n\r\n### Tested against Windows 10 / Python 3.11 / Anaconda / Bluestacks\r\n\r\n### pip install cydrowinparser\r\n\r\n### Cython and a C compiler must be installed!\r\n\r\n```PY\r\nimport time\r\nimport regex as re\r\nimport cythonevparser\r\nimport shutil\r\nimport pandas as pd\r\nimport cydrowinparser\r\n\r\nadb_exe = shutil.which(\"adb\")\r\ndevice_serial = \"127.0.0.1:5560\"\r\ncythonevparser.evparse.create_temp_memdisk(\r\n memdisk_path=\"/media/ramdisk\",\r\n adb_path=adb_exe,\r\n device_serial=device_serial,\r\n memdisk_size=\"128M\",\r\n shell=False,\r\n su_exe=\"su\",\r\n)\r\nallargs = dict(\r\n adb_exe=adb_exe,\r\n device_serial=device_serial,\r\n field_size=50,\r\n record_count=100,\r\n sleep_between_each_scan=0.01,\r\n regex_nogil=True,\r\n device_shell=\"shell\",\r\n uiautomator_cmd=b\"uiautomator events\",\r\n sleep_after_starting_thread=5,\r\n thread_daemon=True,\r\n uiautomator_kill_cmd=b\"pkill uiautomator\",\r\n timeout_scan=0.1,\r\n screen_width=720,\r\n screen_height=1280,\r\n subproc_shell=False,\r\n with_children=False,\r\n add_screenshot=False,\r\n screenshot_kwargs=None,\r\n input_tap_center_x=\"aa_center_x\",\r\n input_tap_center_y=\"aa_center_y\",\r\n input_tap_input_cmd=\"input touchscreen tap\",\r\n input_tap_kwargs=None,\r\n sendevent_mouse_move_start_x=\"aa_start_x\",\r\n sendevent_mouse_move_start_y=\"aa_start_y\",\r\n sendevent_mouse_move_end_x=\"aa_end_x\",\r\n sendevent_mouse_move_end_y=\"aa_end_y\",\r\n sendevent_mouse_move_y_max=65535,\r\n sendevent_mouse_move_x_max=65535,\r\n sendevent_mouse_move_inputdev=\"/dev/input/event5\",\r\n sendevent_mouse_move_add=True,\r\n sendevent_mouse_move_kwargs=None,\r\n sendevent_mouse_move_su_exe=\"su\",\r\n sendevent_mouse_move_sh_device=\"sh\",\r\n sendevent_mouse_move_cwd_on_device=\"/media/ramdisk\",\r\n sendevent_mouse_move_qty_blocks=8 * 24,\r\n debug=True,\r\n)\r\nevp = cythonevparser.evparse.EvParse(**allargs)\r\ncallback_function_kwargs = {}\r\ncallback_function_kwargs[\"regex_to_check\"] = rb\"Metallica\"\r\ncallback_function_kwargs[\"regex_flags\"] = re.IGNORECASE\r\nwhile True:\r\n try:\r\n df = cydrowinparser.parse_elements_and_window(**allargs)\r\n for mousecmd in df.loc[\r\n df.aa_classname.str.contains(\"textview\")\r\n & df.aa_element_id.str.contains(\"title\")\r\n ].aa_mouse_move:\r\n try:\r\n evp.data_array[:] = b\"\"\r\n mousecmd()\r\n evp.starttime.append(time.time())\r\n result = evp.start_event_parser(\r\n callback_function=evp.callback_function,\r\n max_timeout=0.1,\r\n callback_function_kwargs=callback_function_kwargs,\r\n sleep_between_each_scan=0.01,\r\n print_elements=True,\r\n )\r\n if evp.last_results:\r\n dfparsed = pd.DataFrame(evp.last_results, dtype=\"object\")\r\n print(dfparsed[\"Text\"])\r\n evp.last_results.clear()\r\n if b\"Nothing\" in dfparsed[\"Text\"].iloc[0]:\r\n print(\"found Nothing, sleeping .1 seconds\")\r\n time.sleep(.1)\r\n except KeyboardInterrupt:\r\n break\r\n except KeyboardInterrupt:\r\n pass\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "window dump parser for Android",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/cydrowinparser"
},
"split_keywords": [
"dump"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5bea3ec25ebf8d55e542010db14610e045940810cc772d88d21b752afae454fe",
"md5": "14f99dd710533bbde35e1467264e0462",
"sha256": "9bb20fd41d952e3cdf63df7327cbbb2ca7634157f3f787f4bc4cb3d6ff0169cb"
},
"downloads": -1,
"filename": "cydrowinparser-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "14f99dd710533bbde35e1467264e0462",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 33418,
"upload_time": "2024-09-11T07:25:34",
"upload_time_iso_8601": "2024-09-11T07:25:34.457754Z",
"url": "https://files.pythonhosted.org/packages/5b/ea/3ec25ebf8d55e542010db14610e045940810cc772d88d21b752afae454fe/cydrowinparser-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "66b86cc09fb3a0d6e07c63624bffad0ddffbcfa6aff9fefeb10f087ee27c3c02",
"md5": "bb58f1da5951b4dd3cae9db3f4fd9e52",
"sha256": "705ad146f61aca49b3c44c81d2716c2655e1c0f1b1992ba25cf03843eea0e869"
},
"downloads": -1,
"filename": "cydrowinparser-0.10.tar.gz",
"has_sig": false,
"md5_digest": "bb58f1da5951b4dd3cae9db3f4fd9e52",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 31879,
"upload_time": "2024-09-11T07:25:35",
"upload_time_iso_8601": "2024-09-11T07:25:35.904248Z",
"url": "https://files.pythonhosted.org/packages/66/b8/6cc09fb3a0d6e07c63624bffad0ddffbcfa6aff9fefeb10f087ee27c3c02/cydrowinparser-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-11 07:25:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "cydrowinparser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "cydrowinparser"
}