Documentation

The PyMemuc module

a wrapper for memuc.exe as a library to control virual machines

class PyMemuc(memuc_path: str | None = None, debug: bool = False)[source]

Bases: object

A class to interact with the memuc.exe command line tool to control virtual machines.

Parameters:
  • memuc_path (str, optional) – Path to memuc.exe. Set to None for autodetect.

  • debug (bool, optional) – Enable debug mode, defaults to False

change_gps_vm(latitude: float, longitude: float, vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Change the GPS location on a VM, must specify either a vm index or a vm name

Parameters:
  • latitude (float) – Latitude

  • longitude (float) – Longitude

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm GPS change was successful

Return type:

Literal[True]

connect_internet_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Connect the internet on a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm internet connection was successful

Return type:

Literal[True]

create_app_shortcut_vm(package_name: str, vm_index: int | None = None, vm_name: str | None = None) Tuple[int, str]

Create an app shortcut on a VM, must specify either a vm index or a vm name

Parameters:
  • package_name (str) – Package name

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:
  • PyMemucIndexError – an error if neither a vm index or a vm name is specified

  • PyMemucTimeoutExpired – an error if the command times out

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

disconnect_internet_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Disconnect the internet on a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

execute_command_vm(command: str, vm_index: int | None = None, vm_name: str | None = None) Tuple[int, str]

Execute a command on a VM, must specify either a vm index or a vm name

Parameters:
  • command (str) – Command to execute

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

get_adb_connection(vm_index: int | None = None, vm_name: str | None = None, timeout: float | None = None) Tuple[str | None, int | None]

Get the adb connection information for a VM

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • timeout (float, optional) – Timeout for the command. Defaults to None.

Raises:
  • PyMemucIndexError – an error if neither a vm index or a vm name is specified

  • PyMemucTimeoutExpired – an error if the command times out

  • PyMemucError – an error if the command fails

Returns:

the ip and port of the adb connection as a tuple

Return type:

tuple[str | None, int | None]

get_app_info_list_vm(vm_index: int | None = None, vm_name: str | None = None, timeout: float = 10) list[str]

Get the list of apps installed on a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • timeout (float, optional) – Timeout for the command. Defaults to 10.

Raises:
  • PyMemucIndexError – an error if neither a vm index or a vm name is specified

  • PyMemucError – an error if the command failed

Returns:

the list of packages installed on the VM

Return type:

list[str]

get_public_ip_vm(vm_index: int | None = None, vm_name: str | None = None) Tuple[int, str]

Get the public IP of a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

input_text_vm(text: str, vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Input text on a VM, must specify either a vm index or a vm name

Parameters:
  • text (str) – Text to input

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm text input was successful

Return type:

Literal[True]

install_apk_vm(apk_path: str, vm_index: int | None = None, vm_name: str | None = None, create_shortcut: bool = False) Literal[True]

Install an APK on a VM, must specify either a vm index or a vm name

Parameters:
  • apk_path (str) – Path to the APK

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • create_shortcut (bool, optional) – Whether to create a shortcut. Defaults to False.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm apk installation was successful

Return type:

Literal[True]

rotate_window_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Rotate the window on a VM, must specify either a vm index or a vm name

Parameters:

vm_index (int, optional) – VM index. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm window rotation was successful

Return type:

Literal[True]

send_adb_command_vm(command: str | list[str], vm_index: int | None = None, vm_name: str | None = None, timeout: float | None = None) str

Send an ADB command to a VM, must specify either a vm index or a vm name

Parameters:
  • command (str | list[str]) – ADB command

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • timeout (float, optional) – Timeout for the command. Defaults to None.

Raises:
  • PyMemucIndexError – an error if neither a vm index or a vm name is specified

  • PyMemucTimeoutExpired – an error if the command times out

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

set_accelerometer_vm(value: tuple[float, float, float], vm_index: int | None = None, vm_name: str | None = None) Tuple[int, str]

Set the accelerometer on a VM, must specify either a vm index or a vm name

Parameters:
  • value (tuple[float, float, float]) – the accelerometer value to set

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

sort_out_all_vm() bool

Sort out all VMs

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

start_app_vm(package_name: str, vm_index: int | None = None, vm_name: str | None = None, timeout: float | None = None) Literal[True]

Start an app on a VM, must specify either a vm index or a vm name

Parameters:
  • package_name (str) – Package name of the APK, e.g. com.android.chrome. This can be found using get_app_info_list_vm(), excluding the readable name and version suffix.

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • timeout (float, optional) – Timeout in seconds. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm app start was successful

Return type:

Literal[True]

stop_app_vm(package_name: str, vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Stop an app on a VM, must specify either a vm index or a vm name

Parameters:
  • package_name (str) – Package name of the APK

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm app stop was successful

Return type:

Literal[True]

trigger_keystroke_vm(key: Literal['back', 'home', 'menu', 'volumeup', 'volumedown'], vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Trigger a keystroke on a VM, must specify either a vm index or a vm name

Parameters:
  • key (Literal["back", "home", "menu", "volumeup", "volumedown"]) – Key to trigger

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm keystroke trigger was successful

Return type:

Literal[True]

trigger_shake_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Trigger a shake on a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm shake trigger was successful

Return type:

Literal[True]

uninstall_apk_vm(package_name: str, vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Uninstall an APK on a VM, must specify either a vm index or a vm name

Parameters:
  • package_name (str) – Package name of the APK

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm apk uninstallation was successful

Return type:

Literal[True]

zoom_in_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Zoom in on a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm zoom in was successful

Return type:

Literal[True]

zoom_out_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Zoom out on a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm zoom out was successful

Return type:

Literal[True]

reboot_vm(vm_index: int | None = None, vm_name: str | None = None, non_blocking: bool = False) Literal[True]

Reboot a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm was rebooted successfully

Return type:

Literal[True]

start_vm(vm_index: int | None = None, vm_name: str | None = None, headless: bool = False, non_blocking: bool = False, timeout: float | None = None) Literal[True]

Start a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • headless (bool, optional) – Whether to start the VM in headless mode. Defaults to False.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

  • timeout (float, optional) – Timeout in seconds. Cannot be used if non blocking. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm was started successfully

Return type:

Literal[True]

stop_all_vm(non_blocking: bool = False, timeout: float | None = None) Literal[True]

Stop all VMs

Parameters:
  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

  • timeout (float, optional) – Timeout in seconds. Cannot be used if non blocking. Defaults to None.

Raises:

PyMemucError – an error if the vm stop failed

Returns:

True if the vm was stopped successfully

Return type:

Literal[True]

stop_vm(vm_index: int | None = None, vm_name: str | None = None, non_blocking: bool = False, timeout: float | None = None) Literal[True]

Stop a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

  • timeout (float, optional) – Timeout in seconds. Cannot be used if non blocking. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm was stopped successfully

Return type:

Literal[True]

clone_vm(vm_index: int | None = None, vm_name: str | None = None, new_name: str | None = None, non_blocking: bool = False) Literal[True]

Clone a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • new_name (str, optional) – Cloned VM name. Defaults to None.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm was cloned successfully

Return type:

Literal[True]

compress_vm(vm_index: int | None = None, vm_name: str | None = None, non_blocking: bool = False) Literal[True]

Compress a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

Raises:
  • PyMemucIndexError – an error if neither a vm index or a vm name is specified

  • PyMemucError – an error if the vm compress failed

Returns:

True if the vm was compressed successfully

Return type:

Literal[True]

create_vm(vm_version: Literal['76'] | Literal['96'] = '96') int

Create a new VM

Parameters:

vm_version (str, optional) – Android version. Defaults to “96”.

Raises:

PyMemucError – an error if the vm creation failed

Returns:

the index of the new VM, -1 if an error occurred but no exception was raised

Return type:

int

delete_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Delete a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm was deleted successfully

Return type:

Literal[True]

export_vm(vm_index: int | None = None, vm_name: str | None = None, file_name: str = 'vm.ova', non_blocking: bool = False)

Export a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • file_name (str, optional) – File name. Defaults to “vm.ova”.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

the return code and the output of the command

Return type:

tuple[int, str]

get_configuration_vm(config_key: Literal['name', 'cpus', 'cpucap', 'memory', 'is_full_screen', 'is_hide_toolbar', 'turbo_mode', 'graphics_render_mode', 'enable_su', 'enable_audio', 'fps', 'vkeyboard_mode', 'sync_time', 'phone_layout', 'start_window_mode', 'win_x', 'win_y', 'win_scaling_percent2', 'is_customed_resolution', 'resolution_width', 'resolution_height', 'vbox_dpi', 'linenum', 'imei', 'imsi', 'simserial', 'microvirt_vm_brand', 'microvirt_vm_model', 'microvirt_vm_manufacturer', 'selected_map', 'latitude', 'longitude', 'picturepath', 'musicpath', 'moviepath', 'downloadpath', 'macaddress', 'cache_mode', 'geometry', 'custom_resolution', 'disable_resize', 'ssid'], vm_index: int | None = None, vm_name: str | None = None) str

Get a VM configuration, must specify either a vm index or a vm name

Parameters:
  • config_key (ConfigKeys) – Configuration key

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

The configuration value

Return type:

str

import_vm(file_name: str = 'vm.ova', non_blocking: bool = False) Literal[True]

Import a VM from a file

Parameters:
  • file_name (str, optional) – File name. Defaults to “vm.ova”.

  • non_blocking (bool, optional) – Whether to run the command in the background. Defaults to False.

Raises:

PyMemucError – an error if the vm import failed

Returns:

True if the vm was imported successfully

Return type:

Literal[True]

list_vm_info(vm_index: int | None = None, vm_name: str | None = None, running: bool = False, disk_info: bool = False) list[VMInfo]

List VM info, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • running (bool, optional) – Whether to list only running VMs. Defaults to False.

  • disk_info (bool, optional) – Whether to list disk info. Defaults to False.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

a list of VM info, each VM info is a dictionary with the following keys: index: VM index title: VM title top_level: VM top level running: whether the VM is running pid: VM pid disk_usage: VM disk usage

Return type:

list[VMInfo]

randomize_vm(vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Randomize a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm was randomized successfully

Return type:

Literal[True]

rename_vm(vm_index: int | None = None, vm_name: str | None = None, new_name: str | None = None) Literal[True]

Rename a VM, must specify either a vm index or a vm name

Parameters:
  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

  • new_name (str, optional) – New VM name. Defaults to None.

Raises:
  • PyMemucIndexError – an error if neither a vm index or name is specified

  • PyMemucError – an error if the vm rename failed

Returns:

True if the vm was renamed successfully

Return type:

Literal[True]

set_configuration_vm(config_key: Literal['name', 'cpus', 'cpucap', 'memory', 'is_full_screen', 'is_hide_toolbar', 'turbo_mode', 'graphics_render_mode', 'enable_su', 'enable_audio', 'fps', 'vkeyboard_mode', 'sync_time', 'phone_layout', 'start_window_mode', 'win_x', 'win_y', 'win_scaling_percent2', 'is_customed_resolution', 'resolution_width', 'resolution_height', 'vbox_dpi', 'linenum', 'imei', 'imsi', 'simserial', 'microvirt_vm_brand', 'microvirt_vm_model', 'microvirt_vm_manufacturer', 'selected_map', 'latitude', 'longitude', 'picturepath', 'musicpath', 'moviepath', 'downloadpath', 'macaddress', 'cache_mode', 'geometry', 'custom_resolution', 'disable_resize', 'ssid'], config_value: str, vm_index: int | None = None, vm_name: str | None = None) Literal[True]

Set a VM configuration, must specify either a vm index or a vm name

Parameters:
  • config_key (ConfigKeys) – Configuration key

  • config_value (str) – Configuration value

  • vm_index (int, optional) – VM index. Defaults to None.

  • vm_name (str, optional) – VM name. Defaults to None.

Raises:

PyMemucIndexError – an error if neither a vm index or a vm name is specified

Returns:

True if the vm configuration was set successfully

Return type:

Literal[True]

vm_is_running(vm_index: int = 0) bool

Check if a VM is running

Parameters:

vm_index (int, optional) – VM index. Defaults to 0.

Returns:

True if the VM is running, False otherwise

Return type:

bool

check_task_status(task_id: str) Tuple[int, str]

Check the status of a task

Parameters:

task_id (str) – Asynchronous task ID

Returns:

the return code and the output of the command.

Return type:

tuple[int, str]

memuc_run(args: list[str], non_blocking: bool = False, timeout: float | None = None) Tuple[int, str]

run a command with memuc.exe. Memuc can support non-blocking commands, returning a task id. A timeout can be specified if memuc is expected to hang, but this will not work with non-blocking commands.

Parameters:
  • args (list[str]) – a list of arguments to pass to memuc.exe

  • non_blocking (bool, optional) – whether to run the command in the background. Defaults to False.

  • timeout (float, optional) – the timeout in seconds. Defaults to None for no timeout.

Returns:

the return code and the output of the command

Return type:

tuple[int, str]

Raises:
  • PyMemucError – an error if the command failed

  • PyMemucTimeoutExpired – an error if the command timed out

__init__(memuc_path: str | None = None, debug: bool = False) None[source]

initialize the class, automatically finding memuc.exe if windows registry is supported, otherwise a path must be specified

The ConfigKeys alias

ConfigKeys

alias of Literal[‘name’, ‘cpus’, ‘cpucap’, ‘memory’, ‘is_full_screen’, ‘is_hide_toolbar’, ‘turbo_mode’, ‘graphics_render_mode’, ‘enable_su’, ‘enable_audio’, ‘fps’, ‘vkeyboard_mode’, ‘sync_time’, ‘phone_layout’, ‘start_window_mode’, ‘win_x’, ‘win_y’, ‘win_scaling_percent2’, ‘is_customed_resolution’, ‘resolution_width’, ‘resolution_height’, ‘vbox_dpi’, ‘linenum’, ‘imei’, ‘imsi’, ‘simserial’, ‘microvirt_vm_brand’, ‘microvirt_vm_model’, ‘microvirt_vm_manufacturer’, ‘selected_map’, ‘latitude’, ‘longitude’, ‘picturepath’, ‘musicpath’, ‘moviepath’, ‘downloadpath’, ‘macaddress’, ‘cache_mode’, ‘geometry’, ‘custom_resolution’, ‘disable_resize’, ‘ssid’]

VM Configuration Keys

Key

Description

name

The name of the VM.

cpus

The number of CPUs to allocate to the VM.

cpucap

The CPU cap to allocate to the VM. (0-100)

memory

The amount of memory to allocate to the VM. (Unit: MB)

is_full_screen

Whether the VM should be started in full screen mode. (1, 0)

is_hide_toolbar

Whether the VM’s toolbar should be hidden. (1, 0)

turbo_mode

Whether the VM should be started in turbo mode. (1, 0)

graphics_render_mode

The graphics render mode to use. (1:DirectX, 0:OpenGL)

enable_su

Whether the VM should be started with super user privileges. (1, 0)

enable_audio

Whether the VM should be started with audio support. (1, 0)

fps

The VM’s frames per second. (0-100)

vkeyboard_mode

The VM’s virtual keyboard mode. (0, 1)

sync_time

Whether the VM should be started with time synchronization. (1, 0)

phone_layout

The VM’s phone layout. (2: Toolbar, 1: Right, 0: Bottom)

start_window_mode

The VM’s start window mode. (2: Custom, 1: Last time, 0: Default)

win_x

The VM’s window X offset from upper-left corner. (start_window_mode != 0) (Unit: Pixel)

win_y

The VM’s window Y offset from upper-left corner. (start_window_mode != 0) (Unit: Pixel)

win_scaling_percent2

The VM’s window scaling percentage. (Unit: %)

is_custom_resolution

Whether the VM should be started with a custom resolution. (1, 0)

resolution_width

The VM’s custom resolution width. (is_custom_resolution == 1) (Unit: Pixel)

resolution_height

The VM’s custom resolution height. (is_custom_resolution == 1) (Unit: Pixel)

vbox_dpi

The VM’s virtual box DPI. (is_custom_resolution == 1) (Unit: DPI)

linenum

The VM’s phone number.

imei

The VM’s IMEI.

imsi

The VM’s IMSI.

simserial

The VM’s SIM serial number.

microvirt_vm_brand

The VM’s brand.

microvirt_vm_model

The VM’s model.

microvirt_vm_manufacturer

The VM’s manufacturer.

selected_map

The VM’s selected gps provider. (0: Google, 1: Baidu)

latitude

The VM’s gps latitude. (Unit: Degree)

longitude

The VM’s gps longitude. (Unit: Degree)

picturepath

The path to the VM’s shared picture path.

musicpath

The path to the VM’s shared music path.

moviepath

The path to the VM’s shared movie path.

downloadpath

The path to the VM’s shared download path.

macaddress

Device MAC address

cache_mode

Cache mode, 1 is acceleration (good performance, but there is a risk of damage to the image when the power is off accidentally), 0 is stable (the image file is not easy to be damaged, and the performance is slightly worse) (1, 0)

geometry

Top left coordinate and size of simulator (x y width height)

custom_resolution

Android resolution and dpi (width height dpi)

disable_resize

Fixed window size, 1 is fixed, 0 is stretchable

ssid

WIFI name (uylnhxb557|auto) (auto stands for automatic generation)

The VMInfo type

class VMInfo[source]

Bases: TypedDict

A TypedDict for VM info

index: int

VM index

title: str

VM title

top_level: str

VM top level window

running: bool

VM is running

pid: int

VM process ID

disk_usage: int

VM disk usage in bytes