“Using the LDPlayer Command-Line Interface (ldconsole and dnconsole)”
LDPlayer includes a command-line tool that you can run from Windows Command Prompt. Depending on your installation, the file is named `ldconsole.exe` or `dnconsole.exe`. You can use it to start and stop an instance, change instance settings
Before You Start
Prerequisites: A Windows PC with LDPlayer installed.; The name or index of the instance you want to control. Run `list` or `list2` to find it.; The file name your installation uses, `ldconsole.exe` or `dnconsole.exe`.
## Overview LDPlayer includes a command-line tool that you can run from Windows Command Prompt. Depending on your installation, the file is named ldconsole.exe or dnconsole.exe. You can use it to start and stop an instance, change instance settings, and manage apps. An instance is one running Android environment in LDPlayer. This guide covers the basic workflow. For the full command set, see the ldconsole developer guide.
## Command reference
| Command | Purpose | Syntax | | — | — | — | | launch | Start an instance | launch --name <name> or launch --index <number> | | quit | Close one instance | quit --name <name> or quit --index <number> | | quitall | Close all instances | quitall | | modify | Change instance settings, such as CPU, memory, resolution, and phone identifiers | modify --index <number> [options] | | add | Create an instance | add --name <name> | | copy | Clone an instance | copy --name <name> --from <source> | | remove | Delete an instance | remove --name <name> or remove --index <number> | | installapp | Install an APK file or an installed package | installapp <selector> --filename <apk> or --packagename <name> | | uninstallapp, runapp, killapp | Remove, open, or stop an app by package name | <command> <selector> --packagename <name> | | setprop and getprop | Set or read an instance property, such as phone.imei | setprop <selector> --key <name> --value <value> | | adb | Send an ADB command to one instance | adb --index <number> --command "<command>" | | list2 | Print one line of status for each instance | list2 |
For modify, the options include --resolution, --cpu (1 to 4), --memory (512, 1024, 2048, 4096, or 8192), --autorotate, and --lockwindow. Each option takes a value of 1 or 0 where noted.
Example: dnconsole.exe modify --index 0 --cpu 2 --memory 2048
The list2 output lists these fields in order: index, title, top window handle, bound window handle, started flag (1 or 0), process ID, and VirtualBox process ID.
## Verify Run dnconsole.exe list2. The instance you launched should show a started flag of 1.
## Notes and Troubleshooting
- Use exactly one selector per command: either
--nameor--index. - Put values that contain spaces, such as an APK path or an ADB command, in double quotes.
- Copy instance names exactly as
listprints them. - Run
listorlist2before a destructive command such asremove, so you target the right instance.
## Related