Support/

Function Instruction

LDPlayer ldconsole Command Line Developer Usage Guide (Updated 26-08-31)

2026-09-04

Prerequisites

  • Applicable tool: ldconsole.exe, located in the emulator installation directory, e.g., E:\LDPlayer\LDPlayer14\ldconsole.exe
  • Emulator: LDPlayer
  • General syntax: ldconsole [parameter]
  • Specify instance: Each command can use either --index or --name (some global commands like globalsetting do not require specifying)
  • Path note: ldconsole is a native Windows program; for path parameters like --file / --local, please use Windows backslashes (e.g., C:\Users\...), forward slashes might be parsed incorrectly
  • Multi-instance port formula: ADB Port = 5554 + index × 2 (index 0 → 5554)
  • Baseline version: Supports LDPlayer 14 and LDPlayer 9 versions. If you encounter problems during the process, please try upgrading to the latest version.

I. Get Emulator Information

Query the emulator list, running status, and detailed parameters. LDPlayer provides multiple list commands with different levels of granularity.

Command Description Returns
list List all emulator names One instance name per line
list2 List detailed information of all instances Index, Title, Top-level handle, Bound handle, Running status (0/1), Process PID, VBox PID, Width, Height, DPI
list3 --index List simplified information for a single instance Index, Name, Status, Width, Height, DPI
runninglist List only currently running instances List of running instances
isrunning --index Query whether a specific instance is running Running status

Note: If list3 is used without a valid --index (such as mistakenly writing it concatenated as --index0), it will fall back to outputting a sentinel entry 99999,电脑桌面,.... This entry represents the physical computer desktop rather than a real instance. To check all instances, please use list or list2.

Examples

ldconsole.exe list
ldconsole.exe list2
ldconsole.exe list3 --index 0
ldconsole.exe runninglist
ldconsole.exe isrunning --index 6

Tip: To query the ADB connection status, use the system command adb devices (LDPlayer registers automatically by default, see Section X for details).

II. Create Emulator

Create a new emulator instance; the system will automatically assign an index.

Usage

ldconsole.exe add [--name <name>]
Parameter Description
--name Optional, specifies the name of the new instance; if omitted, it will be named automatically

Examples

ldconsole.exe add
ldconsole.exe add --name TestMachineA

III. Copy Emulator

Clone a new instance based on an existing instance (multi-instance).

Usage

ldconsole.exe copy [--name <new_name>] --from <source_name | source_index>
Parameter Description
--name Name for the new instance
--from The source instance to be copied

Examples

ldconsole.exe copy --name NewClone --from 0
ldconsole.exe copy --name NewClone --from LDPlayer

IV. Delete Emulator

Delete the specified emulator instance.

Usage

ldconsole.exe remove --name <name>
ldconsole.exe remove --index <index>

Examples

ldconsole.exe remove --index 2
ldconsole.exe remove --name TestMachineA

Irreversible: Deletion will wipe all data and configurations for that instance; please confirm you have a backup before proceeding.


V. Rename Emulator

Modify the display name of the emulator.

Usage

ldconsole.exe rename [--name <name> | --index <index>] --title <new_title>
Parameter Description
--title The new display name

Examples

ldconsole.exe rename --index 0 --title MyMainDevice
ldconsole.exe rename --name LDPlayer --title MyMainDevice

VI. Backup Emulator

Backup the designated instance entirely as an image file for easy migration or archiving.

Usage

ldconsole.exe backup [--name <name> | --index <index>] --file <backup_file_path>
Parameter Description
--file The output backup path; the suffix must be .ldbk, otherwise an error will be reported

Examples

ldconsole.exe backup --index 0 --file "D:\backup\LDPlayer.ldbk"

Note: backup backs up the entire machine image (including the system and data), so backing up a large instance will take a significant amount of time.

VII. Import Emulator (Restore Backup)

Restore a previously generated backup file (.ldbk) using backup to the specified instance.

Usage

ldconsole.exe restore [--name <name> | --index <index>] --file <backup_file_path>
Parameter Description
--file The backup file path, which must have an .ldbk suffix

Examples

ldconsole.exe restore --index 0 --file "D:\backup\LDPlayer.ldbk"

VIII. Control Emulator

Provides comprehensive control over the emulator's lifecycle, windows, applications, devices, and scripts.

1. Launch emulator (launch)

ldconsole.exe launch [--name <name> | --index <index>]
ldconsole.exe launch --index 0

2. Close emulator (quit)

ldconsole.exe quit [--name <name> | --index <index>]
ldconsole.exe quitall          # Close all instances

3. Reboot emulator (reboot)

ldconsole.exe reboot [--name <name> | --index <index>]

4. Window control

Command Description
locate --name/--index --LLI Set emulator GPS location (e.g., --LLI 116.39,39.91)
sortWnd Automatically arrange (tile) all emulator windows
ldconsole.exe locate --index 0 --LL 116.39,39.91
ldconsole.exe sortWnd

5. Limit CPU (downcpu)

Description: This function is temporarily unavailable and requires a future update.

6. Application control

Command Parameter Description
installapp --filename OR --packagename Install application
uninstallapp --packagename Uninstall application
runapp --packagename Launch application
killapp --packagename Close application
launchex --packagename Launch the emulator and go directly to the specified app
ldconsole.exe installapp --index 0 --filename "D:\apps\game.apk"
ldconsole.exe uninstallapp --index 0 --packagename com.miHoYo.Yuanshen
ldconsole.exe runapp --index 0 --packagename com.miHoYo.Yuanshen
ldconsole.exe killapp --index 0 --packagename com.miHoYo.Yuanshen
ldconsole.exe launchex --index 0 --packagename com.miHoYo.Yuanshen

Description: launchex = Launch emulator + Launch App completed in one step.

7. Device action (action)

Inject system-level device events into the emulator.

--key --value Function
call.keyboard back / home / menu / volumeup / volumedown Inject system virtual keypress (one key at a time, do not splice with
call.input text string Inject text into the currently focused input box
rock (None) Trigger the shake action
call.locate longitude,latitude Real-time location injection
call.network offline / connect Disconnect / Restore network
call.gravity sensor parameters Gravity/gyroscope injection
ldconsole.exe action --index 0 --key call.keyboard --value home
ldconsole.exe action --index 0 --key call.input --value "Search Content"
ldconsole.exe rock --index 0
ldconsole.exe locate --index 0 --LLI 113.264,23.129
ldconsole.exe action --index 0 --key call.network --value offline |connect
ldconsole.exe action --index 0 --key call.gravity --value x,y,z

Description: The menu mapping is temporarily unavailable and requires a future update.

8. Scan code (scan)

Description: This function is temporarily unavailable and requires a future update.

9. Window zoom (zoomIn / zoomOut)

Description: This function is temporarily unavailable and requires a future update.

10. File transfer (push / pull)

Description: This function is temporarily unavailable and requires a future update.

11. App data backup (backupapp / restoreapp)

Description: This function is temporarily unavailable and requires a future update.

12. Macro script (operate*)

Description: This function is temporarily unavailable and requires a future update.

IX. Configure Emulator

1. Single instance configuration (modify)

ldconsole.exe modify [--name|--index] [--resolution w,h,dpi] [--cpu 1|2|3|4]
       [--memory 256|512|768|1024|1536|2048|4096|8192]
       [--manufacturer <manufacturer>] [--model <model>] [--pnumber <phone_number>]
       [--imei <auto|15-digit>] [--imsi <auto|15-digit>] [--simserial <auto|20-digit>]
       [--androidid <auto|16-digit_hex>] [--mac <auto|12-digit>]
       [--autorotate <1|0>] [--lockwindow <1|0>] [--root <1|0>]
Parameter Description
--resolution w,h,dpi Virtual screen resolution and DPI, e.g., 1080,1920,480 (note possible landscape/portrait flipping)
--cpu / --memory Allocated CPU cores / Memory (MB, limited to listed values)
--imei / --mac / --imsi / --androidid Device identity; auto means randomly refreshed (commonly used to prevent bans in multi-instance)
--root <1 or 0> Enable / Disable root
--autorotate / --lockwindow Auto-rotate / Lock window
ldconsole.exe modify --index 0 --resolution 1080,1920,480 --cpu 4 --memory 4096 --imei auto --mac auto --root 0

Note: root 0 will turn off root; imei/mac auto will refresh the device identity. After modification, the instance must be restarted (quit + launch) to take effect.

2. Global default settings (globalsetting)

Description: This function is temporarily unavailable and requires a future update.

X. ADB Commands and Access

LDPlayer not only provides built-in adb subcommands but also supports using the system adb directly. LDPlayer registers ADB connections automatically by default. Because LDPlayer auto-registers, you can operate instances directly using the system's or bundled adb without routing through ldconsole:

Port = 5555 + index*2, so index 6 → 5567
adb connect 127.0.0.1:5567
Was this article helpful?
1 users found this helpful.