Jump to content

Qt for HarmonyOS/Local Emulator Configuration: Difference between revisions

From Qt Wiki
Created page with " == Scenario == Initialize the "Phone" device type "Pura 90" in a local directory (e.g.<code>/Volumes/MacintoshExtSSD/DevEcoEmulator</code>), and start it using command-line tools. == Prerequisites == * [https://developer.huawei.com/consumer/en/deveco-studio/ DevEco Studio] installed * Sufficient disk space at the target emulator location == Initialize the Emulator == # Open '''DevEco Studio'''. # Open '''Device Manager'''. # Edit '''Local Emulator Location''' to set..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:


== Scenario ==
== Scenario ==
Initialize the "Phone" device type "Pura 90" in a local directory (e.g.<code>/Volumes/MacintoshExtSSD/DevEcoEmulator</code>), and start it using command-line tools.
Initialize the "Phone" device type "Pura 90" in a local directory (e.g. ''/Volumes/MacintoshExtSSD/DevEcoEmulator''), and start it using command-line tools.


== Prerequisites ==
== Prerequisites ==
Line 12: Line 12:
# Open '''DevEco Studio'''.
# Open '''DevEco Studio'''.
# Open '''Device Manager'''.
# Open '''Device Manager'''.
# Edit '''Local Emulator Location''' to set the emulator storage path (e.g.<code>/Volumes/MacintoshExtSSD/DevEcoEmulator</code>).
# Edit '''Local Emulator Location''' to set the emulator storage path (e.g. ''/Volumes/MacintoshExtSSD/DevEcoEmulator'').
# Find the device: '''Phone''' → '''Pura 90'''.
# Find the device: '''Phone''' → '''Pura 90'''.
#: ''Note: You may select any supported emulator available in DevEco Studio. "Pura 90" is used here as an example.''
#: ''Note: You may select any supported emulator available in DevEco Studio. "Pura 90" is used here as an example.''
Line 18: Line 18:


== Run the Emulator via Command Line ==
== Run the Emulator via Command Line ==
=== Test Method ===
=== Test Method ===


Line 24: Line 23:
# '''Disable the network connection''' on your machine.
# '''Disable the network connection''' on your machine.
# Run the following command in a terminal:
# Run the following command in a terminal:
<syntaxhighlight lang="bash">
<pre>
/Applications/DevEco-Studio.app/Contents/tools/emulator/Emulator \
/Applications/DevEco-Studio.app/Contents/tools/emulator/Emulator \
   -start "Pura 90" \
   -start "Pura 90" \
   -instancePath /Volumes/MacintoshExtSSD/DevEcoEmulator/
   -instancePath /Volumes/MacintoshExtSSD/DevEcoEmulator/
</syntaxhighlight>Closing DevEco Studio and disabling the network ensures the emulator launches independently from the IDE and confirms it can run fully offline using only the locally downloaded resources.
</pre>Closing DevEco Studio and disabling the network ensures the emulator launches independently from the IDE and confirms it can run fully offline using only the locally downloaded resources.


== Notes ==
== Notes ==


* Replace the<code>-instancePath</code>value with your own emulator storage path.
* Replace the ''-instancePath'' value with your own emulator storage path.
* The emulator name passed to<code>-start</code>must match the device name configured in Device Manager.
* The emulator name passed to ''-start'' must match the device name configured in Device Manager.
* Any supported emulator from DevEco Studio's device list can be used — replace<code>"Pura 90"</code>with the desired device name.
* Any supported emulator from DevEco Studio's device list can be used — replace ''"Pura 90"'' with the desired device name.
 
== See also ==
 
* [[Qt for HarmonyOS]]
 
*

Latest revision as of 02:32, 1 June 2026

Scenario

Initialize the "Phone" device type "Pura 90" in a local directory (e.g. /Volumes/MacintoshExtSSD/DevEcoEmulator), and start it using command-line tools.

Prerequisites

  • DevEco Studio installed
  • Sufficient disk space at the target emulator location

Initialize the Emulator

  1. Open DevEco Studio.
  2. Open Device Manager.
  3. Edit Local Emulator Location to set the emulator storage path (e.g. /Volumes/MacintoshExtSSD/DevEcoEmulator).
  4. Find the device: PhonePura 90.
    Note: You may select any supported emulator available in DevEco Studio. "Pura 90" is used here as an example.
  5. Click the Download button in the Actions column, then wait for the emulator to download and initialize.

Run the Emulator via Command Line

Test Method

  1. Close DevEco Studio completely.
  2. Disable the network connection on your machine.
  3. Run the following command in a terminal:
/Applications/DevEco-Studio.app/Contents/tools/emulator/Emulator \
  -start "Pura 90" \
  -instancePath /Volumes/MacintoshExtSSD/DevEcoEmulator/

Closing DevEco Studio and disabling the network ensures the emulator launches independently from the IDE and confirms it can run fully offline using only the locally downloaded resources.

Notes

  • Replace the -instancePath value with your own emulator storage path.
  • The emulator name passed to -start must match the device name configured in Device Manager.
  • Any supported emulator from DevEco Studio's device list can be used — replace "Pura 90" with the desired device name.

See also