getbstacksinfo


Namegetbstacksinfo JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/getbstacksinfo
SummarySome useful Bluestacks stuff
upload_time2024-03-24 18:28:08
maintainerNone
docs_urlNone
authorJohannes Fischer
requires_pythonNone
licenseMIT
keywords utils bluestacks
VCS
bugtrack_url
requirements ctypes_window_info list_all_files_recursively nodepsutils pidconnectioninfos regex regex4numbers reggisearch tkkillablethreads
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Some useful Bluestacks stuff

## pip install getbstacksinfo

### Tested against Windows 10 / Python 3.11 / Anaconda / BlueStacks

```PY
from getbstacksinfo import (
    start_bluestacks_instance_and_connect_to_adb,
    get_info_bluestacks,
    kill_all_bluestacks_exe,
)
from pprint import pprint

adb_path = r"C:\ProgramData\chocolatey\lib\adb\tools\platform-tools\adb.exe"

kill_any_bluestacks = False
if kill_any_bluestacks:
    kill_all_bluestacks_exe()

# start an instance and wait for it to connect
# Use with: https://github.com/hansalemaos/adbkonnekt
connect_adb = False
if connect_adb:
    instancetostart = "Rvc64_34"

    worked = start_bluestacks_instance_and_connect_to_adb(
        adb_path, instancetostart, sleeptime=5, timeout=120
    )
    print(worked)

(
    data,
    bstconfigpath,
    bstconfigpath_folder,
    bstconfigpath_folder_short,
    bstconfigpath_short,
    bluestacksinstances,
) = get_info_bluestacks()
pprint(bluestacksinstances)
# each bluestacks instance is a dict in bluestacksinstances
# if the instance has already started, there are more functions available
r""" 'Rvc64_39': {'adbport': '5945',
              'already_created': False,
              'already_created_files': 'C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39\\iscreated.txt', # a file to save some random data
              'bluestacksconfdata': ['bst.instance.Rvc64_39.abi_list="x86,x64,arm,arm64"', # data from bluestacks.conf
                                     'bst.instance.Rvc64_39.adb_port="5945"',
                                     'bst.instance.Rvc64_39.ads_display_time=""',
                                     ...
                                     'bst.instance.Rvc64_39.status.session_id="1"',
                                     'bst.instance.Rvc64_39.vulkan_supported="0"'],
              'bstk': files(folder='C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39', file='Rvc64_39.bstk', path='C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39\\Rvc64_39.bstk', ext='.bstk'),
              'bstk_prev': files(folder='C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39', file='Rvc64_39.bstk-prev', path='C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39\\Rvc64_39.bstk-prev', ext='.bstk-prev'),
              'connections': [['TCP',
                               '127.0.0.1:5945',
                               '0.0.0.0:0',
                               'LISTENING',
                               '15148'],
                              ['TCP',
                               '127.0.0.1:5945',
                               '127.0.0.1:52404',
                               'ESTABLISHED',
                               '15148'],
                              ['UDP', '0.0.0.0:53193', '*:*', '15148'],
                              ['UDP', '[::]:53193', '*:*', '15148']],
              'disable_root': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that disables root in bluestacks.conf
              'disableinternet': 'C:\\PROGRA~1\\BLUEST~2\\BSTKVM~1.EXE '
                                 'controlvm Rvc64_39 setlinkstate1 off', # command line to disable network (adb won't work anymore)
              'enable_root': {'exception': [], 'returnvalue': [], 'running': [False]},  # a callable class that enables root in bluestacks.conf
              'enableinternet': 'C:\\PROGRA~1\\BLUEST~2\\BSTKVM~1.EXE ' # command line to disable network
                                'controlvm Rvc64_39 setlinkstate1 on',
              'get_external_ip': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that gets the external ip
              'hdexecute': 'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE '
                           '--instance Rvc64_39', # command line to start hdplayer detached
              'ismasterinstance': False, # if the instance is the master instance
              'keymap_dim': (571, 1016), # size of the keymap window
              'keymap_hwnd': 10555144, # handle of the keymap window
              'killcommand': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that kills the bluestacks instance
              'modify_xml_file_normal': None, # a callable class that modifies the hdds in the xml file to normal (only available if ismasterinstance is True)
              'modify_xml_file_read_only': None, # a callable class that modifies the hdds in the xml file to read only (only available if ismasterinstance is True)
              'procdata': {'Caption': 'HD-Player.exe',
                           'CommandLine': 'C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE  '
                                          '--instance Rvc64_39',
                           'CreationDate': '20240318112659.149708-180',
                           'ExecutablePath': 'C:\\PROGRA~1\\BLUEST~2\\HD-Player.exe',
                           'KernelModeTime': '18340468750',
                           'ParentProcessId': '15816',
                           'ProcessId': '15148',
                           'ThreadCount': '147',
                           'UserModeTime': '9621562500',
                           'VirtualSize': '10083291136',
                           'WorkingSetSize': '97685504',
                           'connections': [['TCP',
                                            '127.0.0.1:5945',
                                            '0.0.0.0:0',
                                            'LISTENING',
                                            '15148'],
                                           ['TCP',
                                            '127.0.0.1:5945',
                                            '127.0.0.1:52404',
                                            'ESTABLISHED',
                                            '15148'],
                                           ['UDP',
                                            '0.0.0.0:53193',
                                            '*:*',
                                            '15148'],
                                           ['UDP',
                                            '[::]:53193',
                                            '*:*',
                                            '15148']]},
              'restart': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that restarts the bluestacks instance
              'startbat': 'C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39\\instancestart.bat', # path to a bat file that starts the bluestacks instance
              'startcommand': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that starts the bluestacks instance
              'vhdx': files(folder='C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39', file='Data.vhdx', path='C:\\ProgramData\\BlueStacks_nxt\\Engine\\Rvc64_39\\Data.vhdx', ext='.vhdx'),
              'window_functions': {'forceminimize': <getbstacksinfo.WinFu object at 0x000001FEB6D6AE90>, # some functions for the bluestacks window
                                   'hide': <getbstacksinfo.WinFu object at 0x000001FEB6D6A990>,
                                   'maximize': <getbstacksinfo.WinFu object at 0x000001FEB6D6AA90>,
                                   'minimize': <getbstacksinfo.WinFu object at 0x000001FEB6D6AC10>, 
                                   'normal': <getbstacksinfo.WinFu object at 0x000001FEB6D6A9D0>,
                                   'resize_window': <getbstacksinfo.WinFu object at 0x000001FEB6D6AF10>, # use position=(x, y, w, h)
                                   'restore': <getbstacksinfo.WinFu object at 0x000001FEB6D6AD90>,
                                   'show': <getbstacksinfo.WinFu object at 0x000001FEB6D6AB90>,
                                   'showdefault': <getbstacksinfo.WinFu object at 0x000001FEB6D6AE10>,
                                   'showminimized': <getbstacksinfo.WinFu object at 0x000001FEB6D6AA10>,
                                   'showminnoactive': <getbstacksinfo.WinFu object at 0x000001FEB6D6AC90>,
                                   'showna': <getbstacksinfo.WinFu object at 0x000001FEB6D6AD10>,
                                   'shownoactivate': <getbstacksinfo.WinFu object at 0x000001FEB6D6AB10>},
              'window_handles': [WindowInfo(pid=15148, title='Qt5154QWindowToolSaveBitsOwnDC', windowtext='BlueStacks Keymap Overlay', hwnd=10555144, length=26, tid=24768, status='visible', coords_client=(0, 571, 0, 1016), dim_client=(571, 1016), coords_win=(304, 875, 33, 1049), dim_win=(571, 1016), class_name='Qt5154QWindowToolSaveBitsOwnDC', path='C:\\PROGRA~1\\BLUEST~2\\HD-Player.exe'),
                                 ...
                                 WindowInfo(pid=15148, title='temp_d3d_window_4039785', windowtext='Temp Window', hwnd=3605532, length=12, tid=26584, status='invisible', coords_client=(0, 1, 0, 1), dim_client=(1, 1), coords_win=(0, 1, 0, 1), dim_win=(1, 1), class_name='temp_d3d_window_4039785', path='C:\\PROGRA~1\\BLUEST~2\\HD-Player.exe')],
              'window_hwnd': 4198756,
              'window_title': 'BlueStacks App Player 39',
              'workingfolder': 'C:\\PROGRA~3\\BLUEST~2\\Engine\\Rvc64_39'}}"""

```


```py
from getbstacksinfo.lookup2 import (
    get_offline_and_online_bluestacks_instances,
    get_all_bluestacks_online_instances,
    create_port_pid_lookup,
    get_real_adb,
)


a1 = get_real_adb(adbexe="adb.exe")
print(a1)


a2 = create_port_pid_lookup()
print(a2)

a3 = get_all_bluestacks_online_instances(adbexe="adb.exe")
print(a3)

a4 = get_offline_and_online_bluestacks_instances(adbexe="adb.exe")
print(a4)

("adb.exe", 19508)
(
    {
        5416: {0, 22},
        ...: ...,
        6112: {"UDP"},
        55575: {"UDP"},
        55576: {"UDP"},
        55577: {"UDP"},
        55574: {"UDP"},
    },
)
{
    "Rvc64_24": {
        "port": 5795,
        "cmdline": '"C:\\\\Program Files\\\\BlueStacks_nxt\\\\HD-Player.exe" "--instance" "Rvc64_24"',
        "exefile": "HD-Player.exe",
        "pid": 4472,
        "running": True,
        "connected": True,
        "locking_pids": [],
    },
    "Rvc64_26": {
        "port": 5815,
        "cmdline": '"C:\\\\Program Files\\\\BlueStacks_nxt\\\\HD-Player.exe" "--instance" "Rvc64_26"',
        "exefile": "HD-Player.exe",
        "pid": 19620,
        "running": True,
        "connected": True,
        "locking_pids": [],
    },
    "Rvc64_27": {
        "port": 5825,
        "cmdline": '"C:\\\\Program Files\\\\BlueStacks_nxt\\\\HD-Player.exe" "--instance" "Rvc64_27"',
        "exefile": "HD-Player.exe",
        "pid": 1104,
        "running": True,
        "connected": True,
        "locking_pids": [],
    },
}
{
    "Rvc64_24": {
        "port": 5795,
        "cmdline": '"C:\\\\Program Files\\\\BlueStacks_nxt\\\\HD-Player.exe" "--instance" "Rvc64_24"',
        "exefile": "HD-Player.exe",
        "pid": 4472,
        "running": True,
        "connected": True,
        "locking_pids": [],
    },
    "Rvc64_26": {
        "port": 5815,
        "cmdline": '"C:\\\\Program Files\\\\BlueStacks_nxt\\\\HD-Player.exe" "--instance" "Rvc64_26"',
        "exefile": "HD-Player.exe",
        "pid": 19620,
        "running": True,
        "connected": True,
        "locking_pids": [],
    },
    "Rvc64_27": {
        "port": 5825,
        "cmdline": '"C:\\\\Program Files\\\\BlueStacks_nxt\\\\HD-Player.exe" "--instance" "Rvc64_27"',
        "exefile": "HD-Player.exe",
        "pid": 1104,
        "running": True,
        "connected": True,
        "locking_pids": [],
    },
    "Rvc64": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_25": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_25",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_25',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_28": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_28",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_28',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [10056],
    },
    "Rvc64_29": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_29",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_29',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [27616],
    },
    "Rvc64_30": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_30",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_30',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_31": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_31",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_31',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_32": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_32",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_32',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_33": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_33",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_33',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_34": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_34",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_34',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_35": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_35",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_35',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_36": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_36",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_36',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_37": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_37",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_37',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_38": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_38",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_38',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
    "Rvc64_39": {
        "port": -1,
        "cmdline": "C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_39",
        "exefile": 'startcommand = rf\'start /min "" C:\\PROGRA~1\\BLUEST~2\\HD-PLA~1.EXE --instance Rvc64_39',
        "pid": -1,
        "running": False,
        "connected": False,
        "locking_pids": [],
    },
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/getbstacksinfo",
    "name": "getbstacksinfo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "utils, Bluestacks",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e0/d7/865fa22ba9e870a4335518465f52c73a88ad9f587286e70b39d53d64c7f7/getbstacksinfo-0.12.tar.gz",
    "platform": null,
    "description": "\r\n# Some useful Bluestacks stuff\r\n\r\n## pip install getbstacksinfo\r\n\r\n### Tested against Windows 10 / Python 3.11 / Anaconda / BlueStacks\r\n\r\n```PY\r\nfrom getbstacksinfo import (\r\n    start_bluestacks_instance_and_connect_to_adb,\r\n    get_info_bluestacks,\r\n    kill_all_bluestacks_exe,\r\n)\r\nfrom pprint import pprint\r\n\r\nadb_path = r\"C:\\ProgramData\\chocolatey\\lib\\adb\\tools\\platform-tools\\adb.exe\"\r\n\r\nkill_any_bluestacks = False\r\nif kill_any_bluestacks:\r\n    kill_all_bluestacks_exe()\r\n\r\n# start an instance and wait for it to connect\r\n# Use with: https://github.com/hansalemaos/adbkonnekt\r\nconnect_adb = False\r\nif connect_adb:\r\n    instancetostart = \"Rvc64_34\"\r\n\r\n    worked = start_bluestacks_instance_and_connect_to_adb(\r\n        adb_path, instancetostart, sleeptime=5, timeout=120\r\n    )\r\n    print(worked)\r\n\r\n(\r\n    data,\r\n    bstconfigpath,\r\n    bstconfigpath_folder,\r\n    bstconfigpath_folder_short,\r\n    bstconfigpath_short,\r\n    bluestacksinstances,\r\n) = get_info_bluestacks()\r\npprint(bluestacksinstances)\r\n# each bluestacks instance is a dict in bluestacksinstances\r\n# if the instance has already started, there are more functions available\r\nr\"\"\" 'Rvc64_39': {'adbport': '5945',\r\n              'already_created': False,\r\n              'already_created_files': 'C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39\\\\iscreated.txt', # a file to save some random data\r\n              'bluestacksconfdata': ['bst.instance.Rvc64_39.abi_list=\"x86,x64,arm,arm64\"', # data from bluestacks.conf\r\n                                     'bst.instance.Rvc64_39.adb_port=\"5945\"',\r\n                                     'bst.instance.Rvc64_39.ads_display_time=\"\"',\r\n                                     ...\r\n                                     'bst.instance.Rvc64_39.status.session_id=\"1\"',\r\n                                     'bst.instance.Rvc64_39.vulkan_supported=\"0\"'],\r\n              'bstk': files(folder='C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39', file='Rvc64_39.bstk', path='C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39\\\\Rvc64_39.bstk', ext='.bstk'),\r\n              'bstk_prev': files(folder='C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39', file='Rvc64_39.bstk-prev', path='C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39\\\\Rvc64_39.bstk-prev', ext='.bstk-prev'),\r\n              'connections': [['TCP',\r\n                               '127.0.0.1:5945',\r\n                               '0.0.0.0:0',\r\n                               'LISTENING',\r\n                               '15148'],\r\n                              ['TCP',\r\n                               '127.0.0.1:5945',\r\n                               '127.0.0.1:52404',\r\n                               'ESTABLISHED',\r\n                               '15148'],\r\n                              ['UDP', '0.0.0.0:53193', '*:*', '15148'],\r\n                              ['UDP', '[::]:53193', '*:*', '15148']],\r\n              'disable_root': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that disables root in bluestacks.conf\r\n              'disableinternet': 'C:\\\\PROGRA~1\\\\BLUEST~2\\\\BSTKVM~1.EXE '\r\n                                 'controlvm Rvc64_39 setlinkstate1 off', # command line to disable network (adb won't work anymore)\r\n              'enable_root': {'exception': [], 'returnvalue': [], 'running': [False]},  # a callable class that enables root in bluestacks.conf\r\n              'enableinternet': 'C:\\\\PROGRA~1\\\\BLUEST~2\\\\BSTKVM~1.EXE ' # command line to disable network\r\n                                'controlvm Rvc64_39 setlinkstate1 on',\r\n              'get_external_ip': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that gets the external ip\r\n              'hdexecute': 'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE '\r\n                           '--instance Rvc64_39', # command line to start hdplayer detached\r\n              'ismasterinstance': False, # if the instance is the master instance\r\n              'keymap_dim': (571, 1016), # size of the keymap window\r\n              'keymap_hwnd': 10555144, # handle of the keymap window\r\n              'killcommand': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that kills the bluestacks instance\r\n              'modify_xml_file_normal': None, # a callable class that modifies the hdds in the xml file to normal (only available if ismasterinstance is True)\r\n              'modify_xml_file_read_only': None, # a callable class that modifies the hdds in the xml file to read only (only available if ismasterinstance is True)\r\n              'procdata': {'Caption': 'HD-Player.exe',\r\n                           'CommandLine': 'C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE  '\r\n                                          '--instance Rvc64_39',\r\n                           'CreationDate': '20240318112659.149708-180',\r\n                           'ExecutablePath': 'C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-Player.exe',\r\n                           'KernelModeTime': '18340468750',\r\n                           'ParentProcessId': '15816',\r\n                           'ProcessId': '15148',\r\n                           'ThreadCount': '147',\r\n                           'UserModeTime': '9621562500',\r\n                           'VirtualSize': '10083291136',\r\n                           'WorkingSetSize': '97685504',\r\n                           'connections': [['TCP',\r\n                                            '127.0.0.1:5945',\r\n                                            '0.0.0.0:0',\r\n                                            'LISTENING',\r\n                                            '15148'],\r\n                                           ['TCP',\r\n                                            '127.0.0.1:5945',\r\n                                            '127.0.0.1:52404',\r\n                                            'ESTABLISHED',\r\n                                            '15148'],\r\n                                           ['UDP',\r\n                                            '0.0.0.0:53193',\r\n                                            '*:*',\r\n                                            '15148'],\r\n                                           ['UDP',\r\n                                            '[::]:53193',\r\n                                            '*:*',\r\n                                            '15148']]},\r\n              'restart': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that restarts the bluestacks instance\r\n              'startbat': 'C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39\\\\instancestart.bat', # path to a bat file that starts the bluestacks instance\r\n              'startcommand': {'exception': [], 'returnvalue': [], 'running': [False]}, # a callable class that starts the bluestacks instance\r\n              'vhdx': files(folder='C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39', file='Data.vhdx', path='C:\\\\ProgramData\\\\BlueStacks_nxt\\\\Engine\\\\Rvc64_39\\\\Data.vhdx', ext='.vhdx'),\r\n              'window_functions': {'forceminimize': <getbstacksinfo.WinFu object at 0x000001FEB6D6AE90>, # some functions for the bluestacks window\r\n                                   'hide': <getbstacksinfo.WinFu object at 0x000001FEB6D6A990>,\r\n                                   'maximize': <getbstacksinfo.WinFu object at 0x000001FEB6D6AA90>,\r\n                                   'minimize': <getbstacksinfo.WinFu object at 0x000001FEB6D6AC10>, \r\n                                   'normal': <getbstacksinfo.WinFu object at 0x000001FEB6D6A9D0>,\r\n                                   'resize_window': <getbstacksinfo.WinFu object at 0x000001FEB6D6AF10>, # use position=(x, y, w, h)\r\n                                   'restore': <getbstacksinfo.WinFu object at 0x000001FEB6D6AD90>,\r\n                                   'show': <getbstacksinfo.WinFu object at 0x000001FEB6D6AB90>,\r\n                                   'showdefault': <getbstacksinfo.WinFu object at 0x000001FEB6D6AE10>,\r\n                                   'showminimized': <getbstacksinfo.WinFu object at 0x000001FEB6D6AA10>,\r\n                                   'showminnoactive': <getbstacksinfo.WinFu object at 0x000001FEB6D6AC90>,\r\n                                   'showna': <getbstacksinfo.WinFu object at 0x000001FEB6D6AD10>,\r\n                                   'shownoactivate': <getbstacksinfo.WinFu object at 0x000001FEB6D6AB10>},\r\n              'window_handles': [WindowInfo(pid=15148, title='Qt5154QWindowToolSaveBitsOwnDC', windowtext='BlueStacks Keymap Overlay', hwnd=10555144, length=26, tid=24768, status='visible', coords_client=(0, 571, 0, 1016), dim_client=(571, 1016), coords_win=(304, 875, 33, 1049), dim_win=(571, 1016), class_name='Qt5154QWindowToolSaveBitsOwnDC', path='C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-Player.exe'),\r\n                                 ...\r\n                                 WindowInfo(pid=15148, title='temp_d3d_window_4039785', windowtext='Temp Window', hwnd=3605532, length=12, tid=26584, status='invisible', coords_client=(0, 1, 0, 1), dim_client=(1, 1), coords_win=(0, 1, 0, 1), dim_win=(1, 1), class_name='temp_d3d_window_4039785', path='C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-Player.exe')],\r\n              'window_hwnd': 4198756,\r\n              'window_title': 'BlueStacks App Player 39',\r\n              'workingfolder': 'C:\\\\PROGRA~3\\\\BLUEST~2\\\\Engine\\\\Rvc64_39'}}\"\"\"\r\n\r\n```\r\n\r\n\r\n```py\r\nfrom getbstacksinfo.lookup2 import (\r\n    get_offline_and_online_bluestacks_instances,\r\n    get_all_bluestacks_online_instances,\r\n    create_port_pid_lookup,\r\n    get_real_adb,\r\n)\r\n\r\n\r\na1 = get_real_adb(adbexe=\"adb.exe\")\r\nprint(a1)\r\n\r\n\r\na2 = create_port_pid_lookup()\r\nprint(a2)\r\n\r\na3 = get_all_bluestacks_online_instances(adbexe=\"adb.exe\")\r\nprint(a3)\r\n\r\na4 = get_offline_and_online_bluestacks_instances(adbexe=\"adb.exe\")\r\nprint(a4)\r\n\r\n(\"adb.exe\", 19508)\r\n(\r\n    {\r\n        5416: {0, 22},\r\n        ...: ...,\r\n        6112: {\"UDP\"},\r\n        55575: {\"UDP\"},\r\n        55576: {\"UDP\"},\r\n        55577: {\"UDP\"},\r\n        55574: {\"UDP\"},\r\n    },\r\n)\r\n{\r\n    \"Rvc64_24\": {\r\n        \"port\": 5795,\r\n        \"cmdline\": '\"C:\\\\\\\\Program Files\\\\\\\\BlueStacks_nxt\\\\\\\\HD-Player.exe\" \"--instance\" \"Rvc64_24\"',\r\n        \"exefile\": \"HD-Player.exe\",\r\n        \"pid\": 4472,\r\n        \"running\": True,\r\n        \"connected\": True,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_26\": {\r\n        \"port\": 5815,\r\n        \"cmdline\": '\"C:\\\\\\\\Program Files\\\\\\\\BlueStacks_nxt\\\\\\\\HD-Player.exe\" \"--instance\" \"Rvc64_26\"',\r\n        \"exefile\": \"HD-Player.exe\",\r\n        \"pid\": 19620,\r\n        \"running\": True,\r\n        \"connected\": True,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_27\": {\r\n        \"port\": 5825,\r\n        \"cmdline\": '\"C:\\\\\\\\Program Files\\\\\\\\BlueStacks_nxt\\\\\\\\HD-Player.exe\" \"--instance\" \"Rvc64_27\"',\r\n        \"exefile\": \"HD-Player.exe\",\r\n        \"pid\": 1104,\r\n        \"running\": True,\r\n        \"connected\": True,\r\n        \"locking_pids\": [],\r\n    },\r\n}\r\n{\r\n    \"Rvc64_24\": {\r\n        \"port\": 5795,\r\n        \"cmdline\": '\"C:\\\\\\\\Program Files\\\\\\\\BlueStacks_nxt\\\\\\\\HD-Player.exe\" \"--instance\" \"Rvc64_24\"',\r\n        \"exefile\": \"HD-Player.exe\",\r\n        \"pid\": 4472,\r\n        \"running\": True,\r\n        \"connected\": True,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_26\": {\r\n        \"port\": 5815,\r\n        \"cmdline\": '\"C:\\\\\\\\Program Files\\\\\\\\BlueStacks_nxt\\\\\\\\HD-Player.exe\" \"--instance\" \"Rvc64_26\"',\r\n        \"exefile\": \"HD-Player.exe\",\r\n        \"pid\": 19620,\r\n        \"running\": True,\r\n        \"connected\": True,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_27\": {\r\n        \"port\": 5825,\r\n        \"cmdline\": '\"C:\\\\\\\\Program Files\\\\\\\\BlueStacks_nxt\\\\\\\\HD-Player.exe\" \"--instance\" \"Rvc64_27\"',\r\n        \"exefile\": \"HD-Player.exe\",\r\n        \"pid\": 1104,\r\n        \"running\": True,\r\n        \"connected\": True,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_25\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_25\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_25',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_28\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_28\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_28',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [10056],\r\n    },\r\n    \"Rvc64_29\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_29\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_29',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [27616],\r\n    },\r\n    \"Rvc64_30\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_30\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_30',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_31\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_31\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_31',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_32\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_32\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_32',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_33\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_33\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_33',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_34\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_34\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_34',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_35\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_35\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_35',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_36\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_36\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_36',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_37\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_37\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_37',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_38\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_38\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_38',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n    \"Rvc64_39\": {\r\n        \"port\": -1,\r\n        \"cmdline\": \"C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_39\",\r\n        \"exefile\": 'startcommand = rf\\'start /min \"\" C:\\\\PROGRA~1\\\\BLUEST~2\\\\HD-PLA~1.EXE --instance Rvc64_39',\r\n        \"pid\": -1,\r\n        \"running\": False,\r\n        \"connected\": False,\r\n        \"locking_pids\": [],\r\n    },\r\n}\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Some useful Bluestacks stuff",
    "version": "0.12",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/getbstacksinfo"
    },
    "split_keywords": [
        "utils",
        " bluestacks"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ad17d3f780489330576b6c025930e3400b4fb0c65c3afb799ded09448266a0f",
                "md5": "e79432fe32838ff8af22db75d254c810",
                "sha256": "d22f15691bc2f74f6819a5f5d53f78dee62508b030ef3fb0888444926c2aa253"
            },
            "downloads": -1,
            "filename": "getbstacksinfo-0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e79432fe32838ff8af22db75d254c810",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19756,
            "upload_time": "2024-03-24T18:28:06",
            "upload_time_iso_8601": "2024-03-24T18:28:06.266999Z",
            "url": "https://files.pythonhosted.org/packages/0a/d1/7d3f780489330576b6c025930e3400b4fb0c65c3afb799ded09448266a0f/getbstacksinfo-0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0d7865fa22ba9e870a4335518465f52c73a88ad9f587286e70b39d53d64c7f7",
                "md5": "99f02cdc5e91e557190706e9fbe44688",
                "sha256": "3ef2d435c054be25be3d1552e3e3f35a6202fb91279550a4ca108c44dd04c568"
            },
            "downloads": -1,
            "filename": "getbstacksinfo-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "99f02cdc5e91e557190706e9fbe44688",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19903,
            "upload_time": "2024-03-24T18:28:08",
            "upload_time_iso_8601": "2024-03-24T18:28:08.550904Z",
            "url": "https://files.pythonhosted.org/packages/e0/d7/865fa22ba9e870a4335518465f52c73a88ad9f587286e70b39d53d64c7f7/getbstacksinfo-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-24 18:28:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "getbstacksinfo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "ctypes_window_info",
            "specs": []
        },
        {
            "name": "list_all_files_recursively",
            "specs": []
        },
        {
            "name": "nodepsutils",
            "specs": []
        },
        {
            "name": "pidconnectioninfos",
            "specs": []
        },
        {
            "name": "regex",
            "specs": []
        },
        {
            "name": "regex4numbers",
            "specs": []
        },
        {
            "name": "reggisearch",
            "specs": []
        },
        {
            "name": "tkkillablethreads",
            "specs": []
        }
    ],
    "lcname": "getbstacksinfo"
}
        
Elapsed time: 0.26745s