Command Line
You can activate Application Simulator functions to iterate on the device using command line tools.
For additional information on using Application Simulator on the command line with Native applications, reference the C/C++ Apps section of the Using Application Simulator Guide.
These are some of the most common VDCLI commands. For a full list of commands, type VDCLI --help
on the command line.
Commands | Description: |
---|---|
VDCLI -s | Starts the Application Simulator Server (VDS) |
VDCLI -k | Stops the Application Simulator Server |
VDCLI -r | Restarts the Application Simulator Server |
VDCLI -h | Displays the command line help page |
There is currently an issue with some Macs not being able to open the ML Hub terminal. To get around this bug, you can open up any command line interface (e.g. Terminal) and set up your environment with the following commands:
source $USER/MagicLeap/mlsdk/<your-os-version>/envsetup.sh
source $USER/MagicLeap/tools/zi/<latest-app-sim-version>/mlvdsetup.sh
Start Application Simulator in Device Mode
Your device must be connected to the host with a USB cable.
Open a terminal from the ML Hub by opening the Activity bar and clicking the terminal icon at the bottom. Use this terminal to enter commands.
Start the Application Simulator Server.
VDCLI -s
- Install the
com.magicleap.zi_agent
to the device.
adb install -u path/to/mlsdk/VirtualDevice/device/com.magicleap.zi_agent.apk
- Launch the Application Simulator Agent.
adb shell start am -n com.magicleap.zi_agent.MainActivity
- Connect the Application Simulator Server to the device.
VDCLI --connect 12345
Start Application Simulator in Simulator Mode
Open a terminal from the ML Hub by opening the Activity bar and clicking the terminal icon at the bottom. Use this terminal to enter commands.
Start the Application Simulator Server.
VDCLI -s
- Launch the Simulator.
VDCLI -R Simulator
- Connect your peripheral.
VDCLI -R Peripheral