Package: adbkit
Easier ADB automationTested against Windows 10, Python 3.10, BlueStacks 5.9.300.1014 N32 / Google Pixel 5Cygwin is necessary:https://www.cygwin.com/setup-x86_64.exeand needs to be added to the path variable!pip install adbkitIf you are using Python 3.10 and get and Exception due to requests, execute pip install requests==2.31.0Don't get confused about the instance "self". I did it because it is faster copying methods from the class :)Here are some tutorials (Brazilian Portuguese)https://www.youtube.com/watch?v=sUAxys08d48https://www.youtube.com/watch?v=pWoDaTeobCwhttps://www.youtube.com/watch?v=sRYspWNviQI03/08/2023: Added 2 methods to find parents/children### self.aa_get_all_displayed_items_from_uiautomator_parents_children# can be called without an existing DataFrame# *args, **kwargs are passed to: self.aa_get_all_displayed_items_from_uiautomatorself.aa_update_screenshot()self.aa_get_all_displayed_items_from_uiautomator_parents_children(screenshotfolder='c:\\shotfolder')# can be called with an existing DataFrame from self.aa_get_all_displayed_items_from_uiautomatorself.aa_get_all_displayed_items_from_uiautomator_parents_children(df,screenshotfolder='c:\\shotfolder')Adds2columns:bb_index_parentbb_index_child0242521387023821334338443545437064386743102843118943134....### self.aa_get_all_displayed_items_from_activities_parents_children# can be called without an existing DataFrame# *args, **kwargs are passed to: self.aa_get_all_displayed_items_from_activitiesself.aa_update_screenshot()self.aa_get_all_displayed_items_from_activities_parents_children(screenshotfolder='c:\\shotfolder')# can be called with an existing DataFrame from self.aa_get_all_displayed_items_from_activitiesself.aa_get_all_displayed_items_from_activities_parents_children(df,screenshotfolder='c:\\shotfolder')Adds2columns:aa_index_parentaa_index_child0242521387023821334338443545437064386743102843118943134....28/05/2023: Added fast screenshots with scrcpy - no root required and some other methodsfromadbkitimportADBToolsfromkthread_sleepimportsleepadb_path=r'C:\ProgramData\chocolatey\bin\adb.exe'deviceserial="localhost:5555"ADBTools.aa_kill_all_running_adb_instances()self=ADBTools(adb_path=adb_path,deviceserial=deviceserial)self.aa_start_server()# creates a new process which is not a child processsleep(3)self.aa_connect_to_device()self.aa_activate_scrcpy_screenshots_tcp(adb_host_address="127.0.0.1",adb_host_port=5037,lock_video_orientation=0)# for a usb connection:# self.aa_activate_scrcpy_screenshots_usb(adb_host_address="127.0.0.1", adb_host_port=5037, lock_video_orientation=0)# each killkey combination can only be used once!self.aa_show_screenshot(sleeptime=1,killkeys="ctrl+alt+h")# How to stop showing screenshots# press the killkeys combination "ctrl+alt+h" and call the method aa_kill_show_screenshot to kill all threadsself.aa_kill_show_screenshot()# once your done with everything, make sure to close the scrcpy connection:self.aa_kill_scrcpy_connection()10/03/2023: Tesseract with multiprocessing / Bluestacks Hyper-V connect# Connects to all Bluestacks Hyper-V devices (dynamic ADB ports)  and returns a DataFramefromadbkitimportADBToolsald=ADBTools.connect_to_all_bluestacks_hyperv_devices(adb_path="C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe",timeout=10,bluestacks_config=r"C:\ProgramData\BlueStacks_nxt\bluestacks.conf",)# Tesseract OCR on all found elements - multiprocessingadb_path="C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"deviceserial="localhost:52249"self=ADBTools(adb_path=adb_path,deviceserial=deviceserial)self.aa_connect_to_device()self.aa_activate_tesseract(tesseractpath=r"C:\Program Files\Tesseract-OCR\tesseract.exe")self.aa_update_screenshot()df=self.aa_get_all_displayed_items_from_uiautomator(screenshotfolder="f:\\compare_android2",# screenshots will be saved heremax_variation_percent_x=10,# used for one of the click functions, to not click exactly in the center - more information belowmax_variation_percent_y=10,# used for one of the click functions, to not click exactly in the centerloung_touch_delay=(1000,1500,),# with this settings longtouch will take somewhere between 1 and 1,5 secondsswipe_variation_startx=10,# swipe coordinate variations in percentswipe_variation_endx=10,swipe_variation_starty=10,swipe_variation_endy=10,sdcard="/storage/emulated/0/",# sdcard will be used if you use the sendevent methods, don't pass a symlink - more information belowtmp_folder_on_sd_card="AUTOMAT",# this folder will be created in the sdcard folder for using sendevent actionsbluestacks_divider=32767,# coordinates must be recalculated for BlueStacks https://stackoverflow.com/a/73733261/15096247 when using sendevent)self.aa_ocr_df_with_tesseract_multiprocessing(df,language='eng',cpus=5)bb_areabb_boundsbb_center_xbb_center_x_croppedbb_center_ybb_center_y_croppedbb_checkablebb_checkedbb_classbb_clickablebb_content_descbb_cropped_x_endbb_cropped_x_startbb_cropped_y_endbb_cropped_y_startbb_enabledbb_focusablebb_focusedbb_heightbb_height_croppedbb_indexbb_keys_hierarchybb_long_clickablebb_old_indexbb_packagebb_passwordbb_pure_idbb_resource_idbb_screenshotbb_scrollablebb_selectedbb_shapelybb_textbb_valid_squarebb_widthbb_width_croppedbb_x_endbb_x_startbb_y_endbb_y_startee_bb_longtouchee_bb_longtouch_bsee_bb_longtouch_offsetee_bb_longtouch_offset_bsee_bb_touchee_bb_touch_bsee_bb_touch_offsetee_bb_touch_offset_bsff_bb_downswipeff_bb_save_screenshotff_bb_show_screenshotff_bb_tap_center_offsetff_bb_tap_center_offset_longff_bb_tap_center_variationff_bb_tap_center_variation_longff_bb_tap_exact_centerff_bb_tap_exact_center_longff_bb_upswipebb_scanned_text01440000.0(0,0,...800800450450FalseFalseandroi...False160009000TrueFalseFalse9009000(node,)False0com.bl...False<NA>[[[144...FalseFalsePOLYGO...True16001600160009000()()()()()()()()()()()()()()()()()()Size:...11440000.0(0,0,...800800450450FalseFalseandroi...False160009000TrueFalseFalse9009000(node,...False1com.bl...False<NA>[[[144...FalseFalsePOLYGO...True16001600160009000()()()()()()()()()()()()()()()()()()Size:...21440000.0(0,0,...800800450450FalseFalseandroi...False160009000TrueFalseFalse9009000(node,...False2com.bl...Falseid/con...androi...[[[144...FalseFalsePOLYGO...True16001600160009000()()()()()()()()()()()()()()()()()()Size:...31440000.0(0,0,...800800450450FalseFalseandroi...False160009000TrueFalseFalse9009000(node,...False3com.bl...False<NA>[[[144...FalseFalsePOLYGO...True16001600160009000()()()()()()()()()()()()()()()()()()Size:...41382400.0(0,36...800800468468FalseFalseandroi...False1600090036TrueFalseFalse8648640(node,...False4com.bl...Falseid/dra...com.bl...[[[32,...FalseFalsePOLYGO...True160016001600090036()()()()()()()()()()()()()()()()()()m6:Â«...51382400.0(0,36...800800468468FalseFalseandroi...False1600090036TrueFalseFalse8648640(node,...False5com.bl...Falseid/ite...com.bl...[[[32,...FalseFalsePOLYGO...True160016001600090036()()()()()()()()()()()()()()()()()()m6:Â«...61382400.0(0,36...800800468468FalseFalseandroi...False1600090036TrueFalseFalse8648640(node,...False6com.bl...False<NA>[[[32,...FalseFalsePOLYGO...True160016001600090036()()()()()()()()()()()()()()()()()()m6:Â«...71382400.0(0,36...800800468468FalseFalseandroi...False1600090036TrueFalseFalse8648641(node,...False7com.bl...False<NA>[[[32,...FalseFalsePOLYGO...True160016001600090036()()()()()()()()()()()()()()()()()()m6:Â«...8771120.0(44,8...800800335335FalseFalsea.q.a.bFalse15564459080TrueTrueFalse5105100(node,...False8com.bl...Falseid/des...com.bl...[[[35,...FalseFalsePOLYGO...True1512151215564459080()()()()()()()()()()()()()()()()()()asÂ¥...9281464.0(196,...800800783783FalseFalseandroi...False1404196900667TrueFalseFalse2332333(node,...False9com.bl...Falseid/dockcom.bl...[[[35,...FalseFalsePOLYGO...True120812081404196900667()()()()()()()()()()()()()()()()()()Street...10771120.0(44,8...800800335335FalseFalseandroi...False15564459080TrueFalseFalse5105100(node,...False10com.bl...False<NA>[[[35,...FalseFalsePOLYGO...True1512151215564459080()()()()()()()()()()()()()()()()()()asÂ¥...1121744.0(196,...800800685685FalseFalseandroi...False1404196694676TrueFalseFalse18180(node,...False11com.bl...Falseid/pop...com.bl...[[[35,...FalseFalsePOLYGO...JOGOS...True120812081404196694676()()()()()()()()()()()()()()()()()()JOGOS...12248848.0(196,...800800797797FalseFalseandroi...False1404196900694TrueFalseFalse2062061(node,...False12com.bl...Falseid/fra...com.bl...[[[35,...FalseFalsePOLYGO...True120812081404196900694()()()()()()()()()()()()()()()()()()Â¥4e...1342840.0(44,8...170170165165FalseFalseandroi...True2964425080TrueTrueFalse1701700(node,...True13com.bl...False<NA>[[[35,...FalseFalsePOLYGO...True2522522964425080()()()()()()()()()()()()()()()()()()PlayS...1442840.0(296,...422422165165FalseFalseandroi...True54829625080TrueTrueFalse1701701(node,...True14com.bl...False<NA>[[[36,...FalseFalsePOLYGO...True25225254829625080()()()()()()()()()()()()()()()()()()Centra...1542840.0(548,...674674165165FalseFalseandroi...True80054825080TrueTrueFalse1701702(node,...True15com.bl...False<NA>[[[35,...FalseFalsePOLYGO...True25225280054825080()()()()()()()()()()()()()()()()()()asGa...1642840.0(800,...926926165165FalseFalseandroi...True105280025080TrueTrueFalse1701703(node,...True16com.bl...False<NA>[[[35,...FalseFalsePOLYGO...True252252105280025080()()()()()()()()()()()()()()()()()()Jogue...1742840.0(1052,...11781178165165FalseFalseandroi...True1304105225080TrueTrueFalse1701704(node,...True17com.bl...False<NA>[[[35,...FalseFalsePOLYGO...True2522521304105225080()()()()()()()()()()()()()()()()()()IMEI/P...1842840.0(1304,...14301430165165FalseFalseandroi...True1556130425080TrueTrueFalse1701705(node,...True18com.bl...False<NA>[[[38,...FalseFalsePOLYGO...True2522521556130425080()()()()()()()()()()()()()()()()()()SocksD...19248848.0(196,...800800797797FalseFalseandroi...False1404196900694TrueFalseFalse2062060(node,...False19com.bl...False<NA>[[[35,...FalseFalsePOLYGO...True120812081404196900694()()()()()()()()()()()()()()()()()()Â¥4e...20140128.0(196,...800800842842FalseFalseandroi...False1404196900784TrueFalseFalse1161161(node,...False20com.bl...Falseid/vie...com.bl...[[[35,...FalseFalsePOLYGO...True120812081404196900784()()()()()()()()()()()()()()()()()()21197288.0(258,...800800785785FalseFalseandroi...False1342258876694TrueFalseFalse1821820(node,...False21com.bl...Falseid/all...com.bl...[[[35,...FalseFalsePOLYGO...True108410841342258876694()()()()()()()()()()()()()()()()()()a2e4...2228938.0(324,...403403785785FalseFalseandroi...True483324876694TrueTrueFalse1821820(node,...False22com.bl...Falseid/app...com.bl...[[[35,...FalseFalsePOLYGO...True159159483324876694()()()()()()()()()()()()()()()()()()Street...2328938.0(483,...562562785785FalseFalseandroi...True642483876694TrueTrueFalse1821821(node,...False23com.bl...Falseid/app...com.bl...[[[35,...FalseFalsePOLYGO...True159159642483876694()()()()()()()()()()()()()()()()()()LymV...2428938.0(642,...721721785785FalseFalseandroi...True801642876694TrueTrueFalse1821822(node,...False24com.bl...Falseid/app...com.bl...[[[35,...FalseFalsePOLYGO...True159159801642876694()()()()()()()()()()()()()()()()()()2528938.0(801,...880880785785FalseFalseandroi...True960801876694TrueTrueFalse1821823(node,...False25com.bl...Falseid/app...com.bl...[[[35,...FalseFalsePOLYGO...True159159960801876694()()()()()()()()()()()()()()()()()()WarRo...2628756.0(960,...10391039785785FalseFalseandroi...True1118960876694TrueTrueFalse1821824(node,...False26com.bl...Falseid/app...com.bl...[[[35,...FalseFalsePOLYGO...True1581581118960876694()()()()()()()()()()()()()()()()()()Warspe...2728756.0(1118,...11971197785785FalseFalseandroi...True12761118876694TrueTrueFalse1821825(node,...False27com.bl...Falseid/app...com.bl...[[[35,...FalseFalsePOLYGO...True15815812761118876694()()()()()()()()()()()()()()()()()()DarkO...2810000.0(353,...403403770770FalseFalseandroi...False453353820720TrueFalseFalse1001000(node,...False28com.bl...Falseid/app...com.bl...[[[44,...FalseFalsePOLYGO...True100100453353820720()()()()()()()()()()()()()()()()()()297632.0(324,...403403852852FalseFalseandroi...False483324876828TrueFalseFalse48481(node,...False29com.bl...Falseid/app...com.bl...[[[53,...FalseFalsePOLYGO...Street...True159159483324876828()()()()()()()()()()()()()()()()()()Street...3010000.0(512,...562562770770FalseFalseandroi...False612512820720TrueFalseFalse1001000(node,...False30com.bl...Falseid/app...com.bl...[[[46,...FalseFalsePOLYGO...True100100612512820720()()()()()()()()()()()()()()()()()()awings317632.0(483,...562562852852FalseFalseandroi...False642483876828TrueFalseFalse48481(node,...False31com.bl...Falseid/app...com.bl...[[[53,...FalseFalsePOLYGO...Viking...True159159642483876828()()()()()()()()()()()()()()()()()()Viking...3210000.0(671,...721721770770FalseFalseandroi...False771671820720TrueFalseFalse1001000(node,...False32com.bl...Falseid/app...com.bl...[[[182...FalseFalsePOLYGO...True100100771671820720()()()()()()()()()()()()()()()()()()337632.0(642,...721721852852FalseFalseandroi...False801642876828TrueFalseFalse48481(node,...False33com.bl...Falseid/app...com.bl...[[[53,...FalseFalsePOLYGO...Draken...True159159801642876828()()()()()()()()()()()()()()()()()()Draken...3410000.0(830,...880880770770FalseFalseandroi...False930830820720TrueFalseFalse1001000(node,...False34com.bl...Falseid/app...com.bl...[[[184...FalseFalsePOLYGO...True100100930830820720()()()()()()()()()()()()()()()()()()357632.0(801,...880880852852FalseFalseandroi...False960801876828TrueFalseFalse48481(node,...False35com.bl...Falseid/app...com.bl...[[[53,...FalseFalsePOLYGO...WarRo...True159159960801876828()()()()()()()()()()()()()()()()()()WarRo...3610000.0(989,...10391039770770FalseFalseandroi...False1089989820720TrueFalseFalse1001000(node,...False36com.bl...Falseid/app...com.bl...[[[243...FalseFalsePOLYGO...True1001001089989820720()()()()()()()()()()()()()()()()()()377584.0(960,...10391039852852FalseFalseandroi...False1118960876828TrueFalseFalse48481(node,...False37com.bl...Falseid/app...com.bl...[[[53,...FalseFalsePOLYGO...Warspe...True1581581118960876828()()()()()()()()()()()()()()()()()()Warspe...3810000.0(1147,...11971197770770FalseFalseandroi...False12471147820720TrueFalseFalse1001000(node,...False38com.bl...Falseid/app...com.bl...[[[59,...FalseFalsePOLYGO...True10010012471147820720()()()()()()()()()()()()()()()()()()397584.0(1118,...11971197852852FalseFalseandroi...False12761118876828TrueFalseFalse48481(node,...False39com.bl...Falseid/app...com.bl...[[[53,...FalseFalsePOLYGO...DarkO...True15815812761118876828()()()()()()()()()()()()()()()()()()DarkO...40529.0(745,...756756734734FalseFalseandroi...False768745746723TrueFalseFalse23230(node,...False40com.bl...Falseid/pop...com.bl...[[[0,...FalseFalsePOLYGO...True2323768745746723()()()()()()()()()()()()()()()()()()41529.0(1221,...12321232734734FalseFalseandroi...False12441221746723TrueFalseFalse23230(node,...False41com.bl...Falseid/pop...com.bl...[[[0,...FalseFalsePOLYGO...True232312441221746723()()()()()()()()()()()()()()()()()()self.aa_update_screenshot()df=self.aa_get_all_displayed_items_from_activities(screenshotfolder="f:\\compare_android",# screenshots will be saved heremax_variation_percent_x=10,# used for one of the click functions, to not click exactly in the center - more information belowmax_variation_percent_y=10,# used for one of the click functions, to not click exactly in the centerloung_touch_delay=(1000,1500,),# with this settings longtouch will take somewhere between 1 and 1,5 secondsswipe_variation_startx=10,# swipe coordinate variations in percentswipe_variation_endx=10,swipe_variation_starty=10,swipe_variation_endy=10,sdcard="/storage/emulated/0/",# sdcard will be used if you use the sendevent methods, don't pass a symlink - more information belowtmp_folder_on_sd_card="AUTOMAT",# this folder will be created in the sdcard folder for using sendevent actionsbluestacks_divider=32767,# coordinates must be recalculated for BlueStacks https://stackoverflow.com/a/73733261/15096247 when using sendevent)dftesser=self.aa_ocr_df_with_tesseract_multiprocessing(df,language='eng',cpus=5)aa_areaaa_boundsaa_center_xaa_center_x_croppedaa_center_yaa_center_y_croppedaa_class_nameaa_clickableaa_complete_dumpaa_context_clickableaa_cropped_x_endaa_cropped_x_startaa_cropped_y_endaa_cropped_y_startaa_depthaa_drawnaa_enabledaa_focusableaa_has_screenshotaa_hashcode_hexaa_hashcode_intaa_heightaa_height_croppedaa_id_informationaa_is_childaa_long_clickableaa_mID_hexaa_mID_intaa_old_indexaa_pflag_activatedaa_pflag_dirty_maskaa_pflag_focusedaa_pflag_hoveredaa_pflag_invalidatedaa_pflag_is_root_namespaceaa_pflag_prepressedaa_pflag_selectedaa_pure_idaa_screenshotaa_scrollbars_horizontalaa_scrollbars_verticalaa_shapelyaa_valid_squareaa_visibilityaa_widthaa_width_croppedaa_x_endaa_x_end_relativeaa_x_startaa_x_start_relativeaa_y_endaa_y_end_relativeaa_y_startaa_y_start_relativeee_aa_longtouchee_aa_longtouch_bsee_aa_longtouch_offsetee_aa_longtouch_offset_bsee_aa_touchee_aa_touch_bsee_aa_touch_offsetee_aa_touch_offset_bsff_aa_downswipeff_aa_save_screenshotff_aa_show_screenshotff_aa_tap_center_offsetff_aa_tap_center_offset_longff_aa_tap_center_variationff_aa_tap_center_variation_longff_aa_tap_exact_centerff_aa_tap_exact_center_longff_aa_upswipeff_show_parentsparent_000parent_001parent_002parent_003parent_004parent_005parent_006parent_007parent_008parent_009parent_010parent_011aa_scanned_text0529.0(427,...438438734734androi...False...False45042774672312TrueTrueFalseTruec741e852089365812323app:id...TrueFalse7f08011e213123...29FalseTrueFalseFalseTrueFalseFalseFalseid/pop...[[[103...FalseFalsePOLYGO...TrueI23234509742774746267233()()()()()()()()()()()()()()()()()()()2827262422206543201529.0(586,...597597734734androi...False...False60958674672312TrueTrueFalseTruee9bb4da2450854022323app:id...TrueFalse7f080121213123...33FalseTrueFalseFalseTrueFalseFalseFalseid/pop...[[[187...FalseFalsePOLYGO...TrueI23236099758674746267233()()()()()()()()()()()()()()()()()()()3231262422206543202529.0(745,...756756734734androi...False...False76874574672312TrueTrueFalseTrue5a48615946683092323app:id...TrueFalse7f080120213123...37FalseFalseFalseFalseFalseFalseFalseFalseid/pop...[[[0,...FalseFalsePOLYGO...TrueV23237689774574746267233()()()()()()()()()()()()()()()()()()()3635262422206543203529.0(904,...915915734734androi...False...False92790474672312TrueTrueFalseTrue4029d0b672801392323app:id...TrueFalse7f08011d213123...41FalseTrueFalseFalseTrueFalseFalseFalseid/pop...[[[255...FalseFalsePOLYGO...TrueI23239279790474746267233()()()()()()()()()()()()()()()()()()()4039262422206543204529.0(1063,...10741074734734androi...False...False1086106374672312TrueTrueFalseTrue27867e8414453522323app:id...TrueFalse7f08011c213123...45FalseTrueFalseFalseTrueFalseFalseFalseid/pop...[[[65,...FalseFalsePOLYGO...TrueI2323108697106374746267233()()()()()()()()()()()()()()()()()()()4443262422206543205529.0(1221,...12321232734734androi...False...False1244122174672312TrueTrueFalseTrue125ad2a192463782323app:id...TrueFalse7f08011f213123...49FalseFalseFalseFalseFalseFalseFalseFalseid/pop...[[[0,...FalseFalsePOLYGO...TrueV2323124497122174746267233()()()()()()()()()()()()()()()()()()()484726242220654320610000.0(353,...403403770770androi...False...False45335382072011FalseTrueFalseTrue29caf0f43822863100100app:id...TrueFalse7f080058213123...28FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[44,...FalseFalsePOLYGO...TrueV1001004531293532982013472034()()()()()()()()()()()()()()()()()()()2726242220654320<NA>77632.0(324,...403403852852androi...False...False48332487682811TrueTrueFalseTrueea74b9c2458448924848app:id...TrueFalse7f080060213123...30FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[53,...FalseFalsePOLYGO...TrueV1591594831593240876190828142()()()()()()()()()()()()()()()()()()()2726242220654320<NA>Street...810000.0(512,...562562770770androi...False...False61251282072011FalseTrueFalseTruecece9a5216852901100100app:id...TrueFalse7f08005b213123...32FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[46,...FalseFalsePOLYGO...TrueV1001006121295122982013472034()()()()()()()()()()()()()()()()()()()3126242220654320<NA>awings97632.0(483,...562562852852androi...False...False64248387682811TrueTrueFalseTrueaadf17a1791717064848app:id...TrueFalse7f080063213123...34FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[53,...FalseFalsePOLYGO...TrueV1591596421594830876190828142()()()()()()()()()()()()()()()()()()()3126242220654320<NA>Viking...1010000.0(671,...721721770770androi...False...False77167182072011FalseTrueFalseTrue9ff2d2b167718187100100app:id...TrueFalse7f08005a213123...36FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[182...FalseFalsePOLYGO...TrueV1001007711296712982013472034()()()()()()()()()()()()()()()()()()()3526242220654320<NA>117632.0(642,...721721852852androi...False...False80164287682811TrueTrueFalseTruebab85881957902164848app:id...TrueFalse7f080062213123...38FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[53,...FalseFalsePOLYGO...TrueV1591598011596420876190828142()()()()()()()()()()()()()()()()()()()3526242220654320<NA>Draken...1210000.0(830,...880880770770androi...False...False93083082072011FalseTrueFalseTrue9e77b21166165281100100app:id...TrueFalse7f080057213123...40FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[184...FalseFalsePOLYGO...TrueV1001009301298302982013472034()()()()()()()()()()()()()()()()()()()3926242220654320<NA>137632.0(801,...880880852852androi...False...False96080187682811TrueTrueFalseTrueb99ab461946202304848app:id...TrueFalse7f08005f213123...42FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[53,...FalseFalsePOLYGO...TrueV1591599601598010876190828142()()()()()()()()()()()()()()()()()()()3926242220654320<NA>WarRo...1410000.0(989,...10391039770770androi...False...False108998982072011FalseTrueFalseTruec1710712677383100100app:id...TrueFalse7f080056213123...44FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[243...FalseFalsePOLYGO...TrueV10010010891299892982013472034()()()()()()()()()()()()()()()()()()()4326242220654320<NA>157584.0(960,...10391039852852androi...False...False111896087682811TrueTrueFalseTrue5377234875197964848app:id...TrueFalse7f08005e213123...46FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[53,...FalseFalsePOLYGO...TrueV15815811181589600876190828142()()()()()()()()()()()()()()()()()()()4326242220654320<NA>Warspe...1610000.0(1147,...11971197770770androi...False...False1247114782072011FalseTrueFalseTrue59fa85d94349405100100app:id...TrueFalse7f080059213123...48FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[59,...FalseFalsePOLYGO...TrueV100100124712911472982013472034()()()()()()()()()()()()()()()()()()()4726242220654320<NA>177584.0(1118,...11971197852852androi...False...False1276111887682811TrueTrueFalseTruef3535d22551454264848app:id...TrueFalse7f080061213123...50FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[53,...FalseFalsePOLYGO...TrueV158158127615811180876190828142()()()()()()()()()()()()()()()()()()()4726242220654320<NA>DarkO...1830210.0(324,...403403781781androi...True...False48332487668610FalseTrueTrueTrue18369ed25389549190190app:id...TrueFalse7f080050213123...27FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[35,...FalseFalsePOLYGO...TrueV159159483225324668761906860()()()()()()()()()()()()()()()()()()()26242220654320<NA><NA>Street...1930210.0(483,...562562781781androi...True...False64248387668610FalseTrueTrueTrue9888022159940642190190app:id...TrueFalse7f080053213123...31FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[35,...FalseFalsePOLYGO...TrueV1591596423844832258761906860()()()()()()()()()()()()()()()()()()()26242220654320<NA><NA>LymV...2030210.0(642,...721721781781androi...True...False80164287668610FalseTrueTrueTrue2751ab341228979190190app:id...TrueFalse7f080052213123...35FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[35,...FalseFalsePOLYGO...TrueV1591598015436423848761906860()()()()()()()()()()()()()()()()()()()26242220654320<NA><NA>iDrak...2130210.0(801,...880880781781androi...True...False96080187668610FalseTrueTrueTrue371187057743472190190app:id...TrueFalse7f08004f213123...39FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[87,...FalseFalsePOLYGO...TrueV1591599607028015438761906860()()()()()()()()()()()()()()()()()()()26242220654320<NA><NA>WarRo...2230020.0(960,...10391039781781androi...True...False111896087668610FalseTrueTrueTrue339b7e954114281190190app:id...TrueFalse7f08004e213123...43FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[35,...FalseFalsePOLYGO...TrueV15815811188609607028761906860()()()()()()()()()()()()()()()()()()()26242220654320<NA><NA>Warspe...2330020.0(1118,...11971197781781androi...True...False1276111887668610FalseTrueTrueTruecd27c6e215121006190190app:id...TrueFalse7f080051213123...47FalseFalseFalseFalseFalseFalseFalseFalseid/app...[[[35,...FalseFalsePOLYGO...TrueV1581581276101811188608761906860()()()()()()()()()()()()()()()()()()()26242220654320<NA><NA>DarkO...24900.0(785,...800800797797androi...False...False8157858127829TrueTrueFalseTrue268c7fc404213723030app:id...TrueFalse7f0800a8213123...25FalseFalseFalseFalseTrueFalseFalseFalseid/doc...[[[35,...FalseFalsePOLYGO...TrueG303081561978558981211878288()()()()()()()()()()()()()()()()()()()242220654320<NA><NA><NA>25205960.0(258,...800800781781androi...False...False13422588766869FalseTrueFalseTrue8a2d3cc144888780190190app:id...TrueFalse7f080048213123...26FalseFalseFalseFalseFalseFalseFalseFalseid/all...[[[35,...FalseFalsePOLYGO...TrueV108410841342114625862876182686-8()()()()()()()()()()()()()()()()()()()242220654320<NA><NA><NA>Street...2651579.0(31,6...8128127878androi...True...False15943195629TrueTrueTrueTrueb601a941908476363333app:id...TrueFalse7f0800c6213123...54FalseTrueFalseFalseTrueFalseFalseFalseid/gro...[[[35,...FalseFalsePOLYGO...TrueV1563156315941588312595536220()()()()()()()()()()()()()()()()()()()535251654320<NA><NA><NA>271179406.0(43,9...800800484484com.bl...False...False155743874959TrueTrueFalseTrue27c993d41720125779779app:id...TrueFalse7f0800c3213123...55FalseTrueFalseFalseTrueFalseFalseFalseid/group[[[35,...FalseFalsePOLYGO...TrueV151415141557155143378748329553()()()()()()()()()()()()()()()()()()()535251654320<NA><NA><NA>Gaui...2842840.0(296,...422422165165com.bl...True...False548296250808TrueTrueTrueTrued801f884767170170<NA>TrueTrue<NA><NA>10FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[36,...FalseFalsePOLYGO...TrueV252252548504296252250170800()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>Centra...2942840.0(44,8...170170165165com.bl...True...False29644250808TrueTrueTrueTrue9c32f6c163786604170170<NA>TrueTrue<NA><NA>11FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[35,...FalseFalsePOLYGO...TrueV252252296252440250170800()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>PlayS...3042840.0(800,...926926165165com.bl...True...False1052800250808TrueTrueTrueTruea164935169232693170170<NA>TrueTrue<NA><NA>12FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[35,...FalseFalsePOLYGO...TrueV25225210521008800756250170800()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>Jogue...3142840.0(1052,...11781178165165com.bl...True...False13041052250808TrueTrueTrueTrue9c981ca164200906170170<NA>TrueTrue<NA><NA>13FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[35,...FalseFalsePOLYGO...TrueV2522521304126010521008250170800()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>IMEI/P...3242840.0(548,...674674165165com.bl...True...False800548250808TrueTrueTrueTruec93ff3b211025723170170<NA>TrueTrue<NA><NA>14FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[35,...FalseFalsePOLYGO...TrueV252252800756548504250170800()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>asGa...3342840.0(1304,...14301430165165com.bl...True...False15561304250808TrueTrueTrueTrue569d65890822232170170<NA>TrueTrue<NA><NA>15FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[38,...FalseFalsePOLYGO...TrueV2522521556151213041260250170800()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>SocksD...34140128.0(196,...800800842842androi...False...False14041969007848TrueTrueFalseTrued395417221860887116116app:id...TrueFalse7f08017f213123...23FalseFalseFalseFalseFalseFalseFalseFalseid/vie...[[[35,...FalseFalsePOLYGO...TrueV1208120814041208196090020678490()()()()()()()()()()()()()()()()()()()2220654320<NA><NA><NA><NA>35248848.0(196,...800800797797androi...False...False14041969006948FalseTrueFalseTrue9d20004164757508206206<NA>TrueFalse<NA><NA>24FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[35,...FalseFalsePOLYGO...TrueV120812081404120819609002066940()()()()()()()()()()()()()()()()()()()2220654320<NA><NA><NA><NA>Â¥4e...361352976.0(6,42...800800468468androi...False...False15946894428FalseTrueFalseTrueebbfee7247201511852852<NA>TrueFalse<NA><NA>53FalseTrueFalseFalseTrueFalseFalseFalse<NA>[[[39,...FalseFalsePOLYGO...TrueV158815881594159466894858426()()()()()()()()()()()()()()()()()()()5251654320<NA><NA><NA><NA>a||...37771120.0(44,8...800800335335com.bl...False...False155644590807TrueTrueFalseTrue49b71b4831003510510<NA>TrueFalse<NA><NA>9FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[35,...FalseFalsePOLYGO...TrueV1512151215561512440590510800()()()()()()()()()()()()()()()()()()()8654320<NA><NA><NA><NA><NA>asÂ¥...38225.0(726,...733733620620androi...False...False7417266286137TrueTrueFalseTrue1b8c9ce288875021515app:id...TrueFalse7f0800ef213123...18FalseTrueFalseFalseTrueFalseFalseFalseid/loa...[[[35,...FalseFalsePOLYGO...TrueV15157412572610628226137()()()()()()()()()()()()()()()()()()()17654320<NA><NA><NA><NA><NA>392604.0(751,...813813620620androi...False...False8757516316107TrueTrueFalseTruec7ee0ef2096417112121app:id...TrueFalse7f0800dc213123...19FalseTrueFalseFalseTrueFalseFalseFalseid/ins...[[[35,...FalseFalsePOLYGO...TrueV12412487515975135631256104()()()()()()()()()()()()()()()()()()()17654320<NA><NA><NA><NA><NA>4021744.0(196,...800800685685androi...False...False14041966946767TrueTrueFalseTrued6f43b12253956331818app:id...TrueFalse7f08011b213123...21FalseFalseFalseFalseFalseFalseFalseFalseid/pop...[[[35,...FalseFalsePOLYGO...TrueV12081208140412081960694276769()()()()()()()()()()()()()()()()()()()20654320<NA><NA><NA><NA><NA>JOGOS...41248848.0(196,...800800797797androi...False...False14041969006947FalseTrueFalseTrueae5f096182841494206206app:id...TrueFalse7f0800bd213123...22FalseFalseFalseFalseFalseFalseFalseFalseid/fra...[[[35,...FalseFalsePOLYGO...TrueV1208120814041208196090023369427()()()()()()()()()()()()()()()()()()()20654320<NA><NA><NA><NA><NA>Â¥4e...421382400.0(0,36...800800468468androi...False...False16000900367FalseTrueFalseTrue69044a6110118054864864<NA>TrueFalse<NA><NA>52FalseTrueFalseFalseTrueFalseFalseFalse<NA>[[[32,...FalseFalsePOLYGO...TrueI160016001600160000900864360()()()()()()()()()()()()()()()()()()()51654320<NA><NA><NA><NA><NA>m6:Â«...431382400.0(0,36...800800468468androi...False...False16000900366FalseTrueFalseTrue46dee9374313363864864app:id...TrueFalse7f08006c213123...7FalseFalseFalseFalseTrueFalseFalseFalseid/bac...[[[32,...FalseFalsePOLYGO...TrueI160016001600160000900864360()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>m6:Â«...44771120.0(44,8...800800335335com.bl...False...False155644590806TrueTrueTrueTrue6affac3112196291510510app:id...TrueFalse7f08009e213123...8FalseFalseFalseFalseFalseFalseFalseFalseid/des...[[[35,...FalseFalsePOLYGO...TrueV151215121556155644445905548044()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>asÂ¥...4525600.0(0,59...800800598598com.bl...False...False160006065906TrueTrueFalseTruea318ed01710199841616app:id...TrueFalse7f08009f213123...16FalseTrueFalseFalseTrueFalseFalseFalseid/des...[[[28,...FalseFalsePOLYGO...TrueI160016001600160000606570590554()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>465070.0(716,...800800621621androi...False...False8857166366066FalseTrueFalseTrue57d5ec9921023453030app:id...TrueFalse7f0800db213123...17FalseTrueFalseFalseTrueFalseFalseFalseid/ins...[[[35,...FalseFalsePOLYGO...TrueI169169885885716716636600606570()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>47281464.0(196,...800800783783androi...False...False14041969006676FalseTrueFalseTrued275f40220684096233233app:id...TrueFalse7f0800a7213123...20FalseFalseFalseFalseFalseFalseFalseFalseid/dock[[[35,...FalseFalsePOLYGO...TrueV1208120814041404196196900864667631()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>Street...481382400.0(0,36...800800468468com.bl...True...False16000900366FalseTrueTrueTrue25d1e0139656961864864app:id...TrueFalse7f0800c4213123...51FalseTrueFalseFalseTrueFalseFalseFalseid/gro...[[[32,...FalseFalsePOLYGO...TrueI160016001600160000900864360()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>m6:Â«...4919380.0(44,8...6363335335androi...False...False8244590806TrueTrueFalseTrue4493e7971908985510510app:id...TrueFalse7f0800e5213123...56FalseFalseFalseFalseFalseFalseFalseFalseid/lef...[[[35,...FalseFalsePOLYGO...TrueV3838828244445905548044()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>5019380.0(1518,...15371537335335androi...False...False15561518590806TrueTrueFalseTrueecea7be248424382510510app:id...TrueFalse7f08012e213123...57FalseFalseFalseFalseFalseFalseFalseFalseid/rig...[[[37,...FalseFalsePOLYGO...TrueV383815561556151815185905548044()()()()()()()()()()()()()()()()()()()654320<NA><NA><NA><NA><NA><NA>511382400.0(0,36...800800468468androi...False...False16000900365FalseTrueFalseTrue294a77d43296637864864<NA>TrueFalse<NA><NA>6FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[32,...FalseFalsePOLYGO...TrueV160016001600160000900864360()()()()()()()()()()()()()()()()()()()54320<NA><NA><NA><NA><NA><NA><NA>m6:Â«...521382400.0(0,36...800800468468com.bl...False...False16000900365TrueTrueFalseTruec019672201430642864864<NA>TrueFalse<NA><NA>58FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[32,...FalseFalsePOLYGO...TrueV160016001600160000900864360()()()()()()()()()()()()()()()()()()()54320<NA><NA><NA><NA><NA><NA><NA>m6:Â«...531382400.0(0,36...800800468468com.bl...False...False16000900364TrueTrueFalseTrue38d79ff59603455864864app:id...TrueFalse7f0800df213123...5FalseFalseFalseFalseFalseFalseFalseFalseid/ite...[[[32,...FalseFalsePOLYGO...TrueV160016001600160000900864360()()()()()()()()()()()()()()()()()()()4320<NA><NA><NA><NA><NA><NA><NA><NA>m6:Â«...541382400.0(0,36...800800468468androi...False...False16000900363FalseTrueTrueTrued8cdd1e227335454864864app:id...TrueFalse7f0800b1213123...4FalseFalseTrueFalseFalseFalseFalseFalseid/dra...[[[32,...FalseFalsePOLYGO...TrueV1600160016001600009009003636()()()()()()()()()()()()()()()()()()()320<NA><NA><NA><NA><NA><NA><NA><NA><NA>m6:Â«...551440000.0(0,0,...800800450450androi...Falsean...False1600090002FalseTrueFalseTrue2b36d5945313369900900<NA>TrueFalse<NA><NA>3FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[144...FalseFalsePOLYGO...TrueV16001600160016000090090000()()()()()()()()()()()()()()()()()()()20<NA><NA><NA><NA><NA><NA><NA><NA><NA><NA>Size:...560.0(0,0,...0000androi...Falseandr...False00001FalseTrueFalseFalse812b78213544435400androi...TrueFalse102018a169086821FalseFalseFalseFalseTrueFalseFalseFalseid/act...NaNFalseFalsePOLYGO...FalseG0000000000()()()()()()()()()<NA>()()()()()()()()()0<NA><NA><NA><NA><NA><NA><NA><NA><NA><NA><NA>571440000.0(0,0,...800800450450androi...Falseandr...False1600090001FalseTrueFalseTrue5f37da099843488900900androi...TrueFalse1020002169082902FalseFalseFalseFalseFalseFalseFalseFalseid/con...[[[144...FalseFalsePOLYGO...TrueV16001600160016000090090000()()()()()()()()()()()()()()()()()()()0<NA><NA><NA><NA><NA><NA><NA><NA><NA><NA><NA>Size:...01/03/2023: Added adbdevicechanger# https://github.com/hansalemaos/adbdevicechanger# tested with bluestacks - root accessself.aa_activate_adbdevicechanger()self.bb_adbdevicechanger.change_android_id()b'Row: 0 _id=227, name=device_name, value=OnePlus 5T\r\n'Out[7]:('f7a32086dc724a4a','OnePlus 5T')self.bb_adbdevicechanger.change_device_name(modelregex=".*",developerregex=".*",androidfullnameregex=".*",year=">1",month=">0",versionnumberaround=7.05,)b'Row: 0 _id=2340, name=android_id, value=f7a32086dc724a4a\r\n'b'Row: 0 _id=228, name=device_name, value=HTC U11\r\n'Out[8]:('f7a32086dc724a4a','HTC U11')self.bb_adbdevicechanger.change_android_id_and_device_name(modelregex=".*",developerregex=".*",androidfullnameregex=".*",year=">1",month=">0",versionnumberaround=7.05,)b'Row: 0 _id=2341, name=android_id, value=fb9afc93197942d8\r\n'b'Row: 0 _id=229, name=device_name, value=Nokia 8\r\n'Out[9]:('fb9afc93197942d8','Nokia 8')self.bb_adbdevicechanger.get_random_android_cellphones(modelregex="Samsung.*",developerregex=".*",androidfullnameregex=".*",year=">2010",month=">0",versionnumberaround=9.05,howmany=10,return_list=False,)Out[13]:aa_model...uuid0SamsungGalaxyNote20/Ultra...36f8a604180b4d7f1SamsungGalaxyA70...cb7f374cd85d43302SamsungGalaxyA30s/A50s...9380749deb5942f63SamsungGalaxyNote10/+...c36816b1906542dc4SamsungGalaxyS20/+/Ultra...33dc12217b404a625SamsungGalaxyA905G...cf0084fa8261465d6SamsungGalaxyA515GUW...3177aa09b1fc40d97SamsungGalaxyA01...44db6d59366143cd8SamsungGalaxyA425G...a5b6fb2d08ac44759SamsungGalaxyA20e...806b4ae287ec4d34[10rowsx10columns]23/02/2023: New methodsfromadbkitimportADBToolsadb_path="C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"deviceserial="localhost:5555"self=ADBTools(adb_path=adb_path,deviceserial=deviceserial)self.aa_connect_to_device()self.aa_activate_tesseract(tesseractpath=r"C:\Program Files\Tesseract-OCR\tesseract.exe")###################################################################################### This method uses Tesseract! You can download it here: https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-5.3.0.20221222.exeself.aa_update_screenshot()# Update the screenshot beforedf=self.aa_ocr_elements_from_activities(['Play Store'],# pass all strings as a listminpercentage=85,# fuzzy matchmaxtolerance=10,screenshotfolder="f:\\compare_android",# screenshots will be saved heremax_variation_percent_x=10,# used for one of the click functions, to not click exactly in the center - more information belowmax_variation_percent_y=10,# used for one of the click functions, to not click exactly in the centerloung_touch_delay=(1000,1500,),# with this settings longtouch will take somewhere between 1 and 1,5 secondsswipe_variation_startx=10,# swipe coordinate variations in percentswipe_variation_endx=10,swipe_variation_starty=10,swipe_variation_endy=10,sdcard="/storage/emulated/0/",# sdcard will be used if you use the sendevent methods, don't pass a symlink - more information belowtmp_folder_on_sd_card="AUTOMAT",# this folder will be created in the sdcard folder for using sendevent actionsbluestacks_divider=32767,# coordinates must be recalculated for BlueStacks https://stackoverflow.com/a/73733261/15096247 when using sendevent)aa_areaaa_boundsaa_center_xaa_center_x_croppedaa_center_yaa_center_y_croppedaa_class_nameaa_clickableaa_complete_dumpaa_context_clickableaa_cropped_x_endaa_cropped_x_startaa_cropped_y_endaa_cropped_y_startaa_depthaa_drawnaa_enabledaa_focusableaa_has_screenshotaa_hashcode_hexaa_hashcode_intaa_heightaa_height_croppedaa_id_informationaa_is_childaa_long_clickableaa_mID_hexaa_mID_intaa_old_indexaa_pflag_activatedaa_pflag_dirty_maskaa_pflag_focusedaa_pflag_hoveredaa_pflag_invalidatedaa_pflag_is_root_namespaceaa_pflag_prepressedaa_pflag_selectedaa_pure_idaa_screenshotaa_scrollbars_horizontalaa_scrollbars_verticalaa_shapelyaa_valid_squareaa_visibilityaa_widthaa_width_croppedaa_x_endaa_x_end_relativeaa_x_startaa_x_start_relativeaa_y_endaa_y_end_relativeaa_y_startaa_y_start_relativeee_aa_longtouchee_aa_longtouch_bsee_aa_longtouch_offsetee_aa_longtouch_offset_bsee_aa_touchee_aa_touch_bsee_aa_touch_offsetee_aa_touch_offset_bsff_aa_downswipeff_aa_save_screenshotff_aa_show_screenshotff_aa_tap_center_offsetff_aa_tap_center_offset_longff_aa_tap_center_variationff_aa_tap_center_variation_longff_aa_tap_exact_centerff_aa_tap_exact_center_longff_aa_upswipeff_show_parentsparent_000parent_001parent_002parent_003parent_004parent_005parent_006parent_007parent_008parent_009parent_010parent_011aa_scanned_textaa_tesseractaa_closest_wordaa_resultdiff3230192.0(26,26,23...128128100100com.bluesta...True...False23026174268TrueTrueFalseTrue7529967122853735148148<NA>TrueTrue<NA><NA>14FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[41,12,...FalseFalsePOLYGON((2...TrueV204204230204260174148260()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>PlayStore100.0PlayStore0.0###################################################################################### Another example (Play Store written wrong)df2=self.aa_ocr_elements_from_uiautomator(['blai Store'],minpercentage=70,maxtolerance=10,)aa_areaaa_boundsaa_center_xaa_center_x_croppedaa_center_yaa_center_y_croppedaa_class_nameaa_clickableaa_complete_dumpaa_context_clickableaa_cropped_x_endaa_cropped_x_startaa_cropped_y_endaa_cropped_y_startaa_depthaa_drawnaa_enabledaa_focusableaa_has_screenshotaa_hashcode_hexaa_hashcode_intaa_heightaa_height_croppedaa_id_informationaa_is_childaa_long_clickableaa_mID_hexaa_mID_intaa_old_indexaa_pflag_activatedaa_pflag_dirty_maskaa_pflag_focusedaa_pflag_hoveredaa_pflag_invalidatedaa_pflag_is_root_namespaceaa_pflag_prepressedaa_pflag_selectedaa_pure_idaa_screenshotaa_scrollbars_horizontalaa_scrollbars_verticalaa_shapelyaa_valid_squareaa_visibilityaa_widthaa_width_croppedaa_x_endaa_x_end_relativeaa_x_startaa_x_start_relativeaa_y_endaa_y_end_relativeaa_y_startaa_y_start_relativeee_aa_longtouchee_aa_longtouch_bsee_aa_longtouch_offsetee_aa_longtouch_offset_bsee_aa_touchee_aa_touch_bsee_aa_touch_offsetee_aa_touch_offset_bsff_aa_downswipeff_aa_save_screenshotff_aa_show_screenshotff_aa_tap_center_offsetff_aa_tap_center_offset_longff_aa_tap_center_variationff_aa_tap_center_variation_longff_aa_tap_exact_centerff_aa_tap_exact_center_longff_aa_upswipeff_show_parentsparent_000parent_001parent_002parent_003parent_004parent_005parent_006parent_007parent_008parent_009parent_010parent_011aa_scanned_textaa_tesseractaa_closest_wordaa_resultdiff3230192.0(26,26,23...128128100100com.bluesta...True...False23026174268TrueTrueFalseTrue7529967122853735148148<NA>TrueTrue<NA><NA>14FalseFalseFalseFalseFalseFalseFalseFalse<NA>[[[41,12,...FalseFalsePOLYGON((2...TrueV204204230204260174148260()()()()()()()()()()()()()()()()()()()98654320<NA><NA><NA><NA>PlayStore100.0PlayStore0.0###################################################################################### Pass a list of tuples:((x,y),timeinseconds)self.aa_multi_input_tap_with_delay([((100,100),2),((200,200),3)])#####################################################################################self.aa_input_tap(x=100,y=100)###################################################################################### https://github.com/hansalemaos/adbescapes# Converts Unicode string to ASCII and escapes all characters that need to be escaped.# You have to activate it, before using it. The first start takes some time because numba needs to compile the codeself.aa_activate_input_text_formated()# inputtext=""""'ąćęłń'\tóśźż\nĄĆĘŁŃÓŚŹŻ\n\"Junto à Estação de\nCarcavelos;\"" "äöüÄÖÜß""""self.aa_input_text_formated_with_delay(text,delay=(0.01,0.2),respect_german_letters=False,exit_keys="ctrl+x")# output"'aceln'    oszzACELNOSZZ"Junto a Estacao deCarcavelos;"""aouAOUb"# If you want it the German way :)self.aa_input_text_formated(text,respect_german_letters=True,exit_keys="ctrl+x")"'aceln'    oszzACELNOSZZ"Junto a Estacao deCarcavelos;"""aeoeueAeOeUess"#####################################################################################self.aa_install_apk_from_hdd(r"C:\Users\Gamer\anaconda3\envs\instcont\instagram.apk")#####################################################################################self.aa_uninstall_package('com.instagram.lite')###################################################################################### First argument is a regexself.aa_copy_apk_to_hdd('com.insta.*','c:\\instaapkdownload')#####################################################################################17/01/2023: Screenshot fix$pipinstalladbkitfromadbkitimportADBToolsadb_path="C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"deviceserial="localhost:5875"# Create an instance# Don't get confused about the instance name "self". I did it because it is faster copying methods from the classself=ADBTools(adb_path,deviceserial,sdcard="/sdcard/")self=ADBTools(adb_path=adb_path,deviceserial=deviceserial)# connect to the deviceself.aa_connect_to_device()# If you are using BlueStacks and want to have root access, call:self.aa_root_bluestacks_instances()# This method will basically do this steps: https://appuals.com/root-bluestacks/ to root BlueStacks# You can run the script every time you use this module. It won't hurt.# The first time, you might have to restart BlueStacks to enable the root access# If your device/BlueStacks is rooted, enable root so that all commands will be sent as rootself.aa_enable_root()# can be disabled by calling :self.aa_disable_root()# Activates self.bb_adbkeyboard# Read more about it: https://github.com/hansalemaos/adb_unicode_keyboardself.aa_activate_adb_keyboard(exit_keys="ctrl+x")# Activates self.bb_sendevent_keyboard (needs root access)# Read more about it: https://github.com/hansalemaos/sendevent_getevent_keyboardself.aa_activate_sendevent_keyboard(sdcard="/storage/emulated/0/",tmp_folder_on_sd_card="AUTOMAT",exit_keys="ctrl+x",)# needs root access# Here is one example:self.bb_adbkeyboard.press_7_keycode_0()# Activates self.self.bb_getevent_sendevent# Read more about it: https://github.com/hansalemaos/sendevent_getevent_keyboardself.aa_activate_getevent_sendevent(sdcard="/storage/emulated/0/",tmp_folder_on_sd_card="AUTOMAT",bluestacks_divider=32767,exit_keys="ctrl+x",)# needs root access# Activates self.bb_sendevent_touch# Read more about it: https://github.com/hansalemaos/sendevent_touchself.aa_activate_sendevent_touch(sdcard="/storage/emulated/0/",tmp_folder_on_sd_card="AUTOMAT",bluestacks_divider=32767,use_bluestacks_coordinates=True,)# needs root access# Here is one example:self.bb_sendevent_touch.touch(10,10)# Activates https://github.com/hansalemaos/a_pandas_ex_tesseract_multirow_regex_fuzz# You can download the 64 bit version of tesseract here:# https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-5.3.0.20221222.exeself.aa_activate_tesseract(tesseractpath=r"C:\Program Files\Tesseract-OCR\tesseract.exe")# Once activated, you can call:# self.aa_ocr_with_tesseract()lefttopwidthheightconftextmiddle_xmiddle_yend_xend_y8382424994937.512093RH,6316688191972834986130.9259492.777648269513370101371184.72541'system       388       106    407    11214411101241079.929901Apps4231064351111553690362885.425911Roblox5541045721181667610055988.744247BlueStacks703104731109177351017880.470955X73810574210918814101311090.271423Spiele8291068451111984810118893.303749und8571058661092086910341987.963295gewinne8891079101122872100201296.004517Play8210692112299510127886.986359Store10810512210933225211491276.804665Globoplay24921727422337326489252891.894142Tibia3385033515173840150050891.477989Guardians4265044515083945549910972.064316of4605034655084141551237975.078018Cloudia433516452521# and even perform a multiline fuzzy search:xxx=self.aa_ocr_with_tesseract(search_for='Kontakte verwalten')# Use this method to update the screenshot# The updated screenshot can be found here: self.screenshotself.aa_update_screenshot()# get 5 screenshot within 5 secondsxx=self.aa_get_screenshots(sleeptime=1,number=5)# Now you can use self.df to do operations on the screenshot# More information about a_pandas_ex_image_tools:# https://github.com/hansalemaos/a_pandas_ex_image_toolsself.aa_update_imagedf()# If you want to capture the logcat output and analyze it in a DataFrame,use:logcatcap=self.aa_capture_logcat(exit_keys="ctrl+x",timeout=None,)# When you exit using "ctrl+x", the method will return a DataFrame# By the way: almost all methods can be interrupted using a key command# Those 2 methods will help you to identify and interact with views:# Read more about it: https://github.com/hansalemaos/androdfdf1=self.aa_get_all_displayed_items_from_uiautomator(screenshotfolder="f:\\compare_android",# screenshots will be saved heremax_variation_percent_x=10,# used for one of the click functions, to not click exactly in the center - more information belowmax_variation_percent_y=10,# used for one of the click functions, to not click exactly in the centerloung_touch_delay=(1000,1500,),# with this settings longtouch will take somewhere between 1 and 1,5 secondsswipe_variation_startx=10,# swipe coordinate variations in percentswipe_variation_endx=10,swipe_variation_starty=10,swipe_variation_endy=10,sdcard="/storage/emulated/0/",# sdcard will be used if you use the sendevent methods, don't pass a symlink - more information belowtmp_folder_on_sd_card="AUTOMAT",# this folder will be created in the sdcard folder for using sendevent actionsbluestacks_divider=32767,# coordinates must be recalculated for BlueStacks https://stackoverflow.com/a/73733261/15096247 when using sendevent)df3=self.aa_get_all_displayed_items_from_activities(screenshotfolder="f:\\compare_android",# screenshots will be saved heremax_variation_percent_x=10,# used for one of the click functions, to not click exactly in the center - more information belowmax_variation_percent_y=10,# used for one of the click functions, to not click exactly in the centerloung_touch_delay=(1000,1500,),# with this settings longtouch will take somewhere between 1 and 1,5 secondsswipe_variation_startx=10,# swipe coordinate variations in percentswipe_variation_endx=10,swipe_variation_starty=10,swipe_variation_endy=10,sdcard="/storage/emulated/0/",# sdcard will be used if you use the sendevent methods, don't pass a symlink - more information belowtmp_folder_on_sd_card="AUTOMAT",# this folder will be created in the sdcard folder for using sendevent actionsbluestacks_divider=32767,# coordinates must be recalculated for BlueStacks https://stackoverflow.com/a/73733261/15096247 when using sendevent)# Uses: https://github.com/hansalemaos/a_pandas_ex_adb_to_df# lists all files in DataFrame and adds useful functions# self.aa_list_all_files_on_device()dffiles=self.aa_list_folder_content(folder_to_search="data/")print(dffiles)aa_date...ff_pull_file_cat02022-12-1106:48:00...()12022-12-2622:16:00...()22022-12-0619:10:00...()32022-12-0613:38:00...()42022-12-2622:16:00...().........261202021-09-1604:21:00...()261212021-09-1603:53:00...()261222021-09-1603:53:00...()261232021-09-1604:35:00...()261242021-09-1604:31:00...()[26125rowsx16columns]# Search with grep# Uses https://github.com/hansalemaos/adb_grep_searchdfgrep=self.aa_grep_search(folder_to_search="data/data",filetype="*.db",regular_expression=r"CREATE.TABLE",exit_keys="ctrl+x",timeout=None,remove_control_characters=True,)dfgrepOut[19]:aa_file...aa_regex0data/data/com.android.providers.media/database......CREATE.TABLE1data/data/com.android.providers.media/database......CREATE.TABLE2data/data/com.android.providers.media/database......CREATE.TABLE3data/data/com.android.providers.media/database......CREATE.TABLE4data/data/com.globo.globotv/databases/mcsdk_bf......CREATE.TABLE...........103data/data/com.roblox.client/databases/google_a......CREATE.TABLE104data/data/com.roblox.client/databases/google_a......CREATE.TABLE105data/data/com.roblox.client/databases/google_a......CREATE.TABLE106data/data/com.roblox.client/databases/google_a......CREATE.TABLE107data/data/com.roblox.client/databases/google_a......CREATE.TABLE[108rowsx5columns]# Uses https://github.com/hansalemaos/a_pandas_ex_adb_settings_to_dfself.aa_parse_settings_from_all_packages(tempfolder="f:\\tmpfolder",datafolder="data/")indexaa_all_keys...level_22level_2300.0(long,name)...NaNNaN11.0(long,value)...NaNNaN20.0(boolean,0,name)...NaNNaN31.0(boolean,0,value)...NaNNaN42.0(boolean,1,name)...NaNNaN...............110795NaN(6,desc)...NaNNaN110796NaN(6,label)...NaNNaN110797NaN(6,pkg)...NaNNaN110798NaN(6,source)...NaNNaN110799NaN(6,url)...NaNNaN[110800rowsx31columns]Youmightseethiserrormessagesseveraltimes:"Go to: https://www.sqlite.org/download.html ,downloadthedllandputitintheDLLsfolderofyourenv!"Youcanignoreit.#This method helps you find all executable activities from a package# More about it: https://github.com/hansalemaos/a_pandas_ex_adb_execute_activitiesself.aa_get_activity_execution_df_from_one_package(packagename="com.roblox.client")# adds new contact, can be saved straight awayaddcon=self.aa_add_new_contact("hans","+55119897827552","hans@something.com","my address",save=False)# If you play Roblox, you can enable/disable some textures to get higher fpsself.aa_enable_roblox_textures(exit_keys="ctrl+x",print_output=True,timeout=None,)self.aa_disable_roblox_textures(exit_keys="ctrl+x",print_output=True,timeout=None,)# goes to the home screen, doesn't close anythingself.aa_go_to_home_screen()# repeat=5 usually deletes more than 5 characters!!self.aa_press_delete_key_repeated_times(repeat=5)# starts the android file manager, pass the file type you want to seeself.aa_get_content(type_="text/plain")# Here are some methods to get useful information.# Returns DataFramesprint(self.aa_whole_dumpsys_to_df())print(self.aa_list_all_packages())print(self.aa_list_broadcast_stats())print(self.aa_list_pending_intents())print(self.aa_list_all_activities_from_device())print(self.aa_list_all_services())print(self.aa_list_all_receivers())print(self.aa_list_all_activities())print(self.aa_get_procstats())print(self.aa_list_all_devices())# devices on the device (dev ...)print(self.aa_list_devices())# all adb devices (localhost:5555 ...)print(self.aa_list_pids_basic())print(self.aa_list_pids_complete())print(self.aa_list_memory())print(self.aa_getprop())print(self.aa_list_all_broadcasts())print(self.aa_list_all_broadcasts_history())print(self.aa_list_users())print(self.aa_list_permission_groups())print(self.aa_list_disabled_packages())print(self.aa_list_apps_in_use())print(self.aa_list_3rd_party_packages())print(self.aa_list_features())# Smile! :)self.aa_open_camera_photo_mode()# works with and without http://print(self.aa_open_website("google.com"))# switches to galleryself.aa_start_gallery()# cheeeeseself.aa_take_a_picture()# useful for some appsself.aa_adb_turn_screen_compatibility_off()self.aa_adb_turn_screen_compatibility_on()# Be careful!self.aa_remove_file('/sdcard/9.png')# Essential when you use your cell phone (with Whatsapp, Facebook ...) to automize things.self.aa_enable_notifications()self.aa_disable_notifications()# More useful stuff for notificationsself.aa_expand_settings()self.aa_expand_notifications()# Changes the screen orientation# You can pass:# horizontal_upside_down or 2# vertical or 1# horizontal or 0# vertical_upside_down or 3self.aa_change_screen_orientation("horizontal")self.aa_get_display_orientation()#Out[4]: 0# 0 means horizontal# Sometimes you upload new media files, but you can't see the thumbnails immediately# This method updates all thumbnailsself.aa_rescan_media()# If you are in the middle of a text and want to go to the end of the lineself.aa_move_to_end_of_line()# Useful keyboard stuffself.aa_hide_keyboard()self.aa_is_keyboard_shown()# Doesn't work on BlueStacks, but on my pixel 6 there are no problems# (Actually it is not necessary when using BlueStacks hahaha)self.aa_is_screen_unlocked()# Don't use this command on BlueStacks, you will have to reboot the deviceself.aa_lock_screen()# Useful commandsself.aa_press_home()#back to home screenself.aa_press_app_switch()# Configured for my Pixel 6, but should work on any device with a# newer android version.self.aa_swipe_up_to_unlock_screen('3333')# doesn't work with BlueStacks, because of the app switch design,# but it does on my pixel and should work with any device that# has a recent Android versionself.aa_close_all_apps_with_swipe()# uninstalls a packageself.aa_uninstall_package('com.google.android.youtube')# Returns the activity needed to open the packageself.aa_resolve_activity('com.roblox.client')b'priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=true\r\n'b'com.roblox.client/.startup.ActivitySplash\r\n'# But you can also open any package using:self.aa_open_app('com.roblox.client')# This method makes swiping easy# x (start), y (start), x (end) y (end), last number in secondsself.aa_swipe(500,400,500,100,1.1)#opens a separate shell window using cmd.exeself.aa_open_shell()# It changes the dictionary that you are in# and executes a commandself.aa_change_cwd_and_execute_adb_shell('ls','data/')b'5.3.10.1001\r\n'b'5.9.300.1014\r\n'b'adb\r\n'b'anr\r\n'b'app\r\n'b'app-asec\r\n'b'app-ephemeral\r\n'b'app-lib\r\n'b'app-private\r\n'b'arm\r\n'....# This can also be accomplished by sending multiple commands:self.aa_execute_multiple_adb_shell_commands(['cd data/','ls|grep system'])Out[28]:[b'system\r\n',b'system_ce\r\n',b'system_de\r\n']# You can also send non-shell commands:self.aa_execute_non_shell_adb_command('devices')# This method pushes a file to your sdcard:self.aa_push_to_sdcard(r'F:\donedone.png')# This method pulls a file to your hddself.aa_pull('/sdcard/donedone.png','f:\\dfdffasd')# A fast way of scanning all connected devices:# start/end means the ports you want to start/end with# After 10 seconds, all processes that have not completed the search# will be killedself.aa_connect_do_all_devices(start=4999,end=6000,timeout=10)'''self.aa_list_devices()b'List of devices attached\r\n'b'localhost:5037\toffline\r\n'b'localhost:5040\toffline\r\n'b'localhost:5357\toffline\r\n'b'localhost:5725\tdevice\r\n'b'localhost:5800\toffline\r\n'b'localhost:5875\tdevice\r\n'b'localhost:5900\toffline\r\n'b'localhost:5955\tdevice\r\n'b'\r\n''''''Killing the processKilling the processKilling the processKilling the processKilling the processKilling the processKilling the processKilling the processKilling the process'''# Uses https://github.com/hansalemaos/a_cv2_shape_finder# to detect shapes in the screenshotself.get_shapes_from_screenshot_THRESH_OTSU()self.get_shapes_from_screenshot_ADAPTIVE_THRESH_MEAN_C()self.get_shapes_from_screenshot_ADAPTIVE_THRESH_GAUSSIAN_C()#Some self-explaining stuffself.aa_isfolder('/sdcard/donedone.png')Falseself.aa_isfolder('/sdcard/')Truenext(self.aa_get_screenshots())self.aa_path_exists('/sdcard/')Trueself.aa_path_exists('/sdcard2/')Falseself.aa_get_screen_resolution()(960,540)self.aa_restart_server()self.aa_reboot_and_listen_to_usb()self.aa_start_server()self.aa_stop_server()self.aa_kill_server()self.aa_force_stop('com.roblox.client')#rootself.aa_show_screenshot_in_browser()