-
Notifications
You must be signed in to change notification settings - Fork 59
Simulator Related
キラメイ edited this page Feb 18, 2024
·
1 revision
Simulator process-level API, supporting mainstream Android emulators.
import device_operation
-
get_adb_address(simulator_type, multi_instance)
: Get the corresponding adb address. -
get_adb_address_by_uuid(uuid)
: Get the corresponding adb address. -
get_simulator_commandline_uuid(uuid)
: Get the corresponding command line parameters. -
get_simulator_uuid(uuid)
: Get the UUID of the emulator. -
convert_display_name(simulator_type, multi_instance)
: Input internal parameters and return readable emulator names and multi-instance information. get_display_name_uuid(uuid)
-
auto_scan()
: Automatically scan running emulators. -
autosearch()
: Automatically scan the adb address corresponding to the running emulators. -
preprocess_name(simulator_type, multi_instance)
: Process possible missing parameters. -
mumu12_api_backend(multi_instance, operation)
: Wrapper for MumuManager package. -
simulator_cmd()
: Get the command line to start the emulator. process_native_api(input_type, process_input)
-
start_simulator_uuid(uuid)
: Start the corresponding emulator with UUID (currently unavailable). -
start_simulator_classic(simulator_type, multi_instance)
: Start the emulator with given parameters. -
config_write(simulator_type, multi_instance, latest_adb_address = None, latest_command_line = None)
: (Given the emulator type and write to the configuration file) -
load_dict(uuid)
: Read the entire data corresponding to the UUID. -
return_bluestacks_type(pid)
: Read the BlueStacks emulator type corresponding to the PID.
simulator_type
: (Emulator type)
- bluestacks_nxt: BlueStacks 5 International Edition
- bluestacks_nxt_cn: BlueStacks 5 Chinese Edition
- mumu: MuMu12 Emulator
- yeshen: Nox Emulator
- mumu_classic: MuMu 6 & MuMu X
- xiaoyao_nat: LDPlayer (Non-Bridge Mode)
- leidian: LDPlayer
- wsa: Windows Subsystem for Android™️
multi_instance
:
- For mumu, yeshen, xiaoyao_nat, leidian, this parameter is a multi-instance number, starting from 0.
- For bluestacks_nxt, bluestacks_nxt_cn, this parameter is the display name of the corresponding emulator in BlueStacks Multi-Instance Manager. It is recommended to use copy-paste to avoid typing errors. This parameter is case-sensitive.
- For wsa, this parameter is default to 127.0.0.1/localhost, leave it blank. If it's WSA on another device, fill in the corresponding IPv4 address or hostname.
- mumu_classic does not support multiple instances using different adb ports.
uuid
:
The source is the return value of get_simulator_uuid(uuid)
or the corresponding ID of the emulator in /config/device.json
.
If latest_adb_address
and latest_command_line
are not provided in the config_write
function, they will be automatically obtained.
Note: It is highly discouraged to use process_native_api
directly, as it is considered risky.
Mainly Powered by pur1fying(script work) and Kiramei(ui work).