Setting up Pleos Connect Emulator
Pleos Connect Emulator
The Pleos Connect Emulator allows developers to build and validate applications within a dedicated environment for Android Studio and Android IDE. It supports full-scale testing at both the Android and Pleos Connect API levels, providing the same depth of vehicle control and contextual data as the production system.
Installing the Pleos Connect Emulator
Prerequisite
- Install the latest version of Android Studio.
- Android Studio can be downloaded here.
- Check if you meet the system requirements to run the Android Emulator.
Adding the Emulator to Android Studio
- In Android Studio, select Menu > Tools > SDK Manager.
- Click on the SDK Update Sites tab.
- Click the Add button.
- Enter the following information to add the Pleos Connect SDK site.
- Name: Pleos Connect System Image
- URL for arm64 :
https://nexus-playground.pleos.ai/repository/raw-releases/release/connect.v2.0.5/connect.v2.0.5_avd_arm64/crp-arm64-sys-img.xml - URL for x86_64 :
https://nexus-playground.pleos.ai/repository/raw-releases/release/connect.v2.0.5/connect.v2.0.5_avd_x86_64/crp-sys-img.xml
-
Click the OK button.
-
Click on the SDK Platforms tab.
-
Check the Pleos Connect system Image for Android API Level 34.
-
Also enable the checkbox for Show Package Details at the bottom.
-
Clicking the OK button will start the download of the Pleos Connect Emulator image as shown below.
-
Once the download is complete, press the Finish button and restart Android Studio.
Setting up the emulator
-
Start Android Studio. (If you did not restart Android Studio in the previous step, please restart it first)
-
Create an Android Virtual Device (AVD) using the Pleos Connect Emulator.
-
In Android Studio, select Menu > Tools > Device Manager. For earlier versions of Android Studio, select Menu > Tools > AVD Manager.
-
Click Create device. For earlier versions of Android Studio, click Create Virtual Device.
-
Select Automotive from the left menu.
-
Select
Pleos Connect v2.0. -
Click the Next button.
-
Select
Pleos Connect v2.0and click the Next button.
-
Click Show Advanced Settings.
-
In the Emulated Performance section, set the Graphics option to Hardware and select Cold boot for the Boot option.
-
To use the LLM service, set the RAM Size as follows.
Running on the emulator
- Run the AVD you created from Menu > Tools > Device Manager in Android Studio.
To change the language of the emulator, please refer to the language settings procedure.
Testing with the emulator
To build and run your app on the Emulator, you must inject a Connected Resource Name (CRN) into the Emulator. The CRN can be obtained after creating a My Project in Pleos Playground.
- If you build the app without injecting the CRN, the screen
CRN is not registered on the target boardwill appear.
- Create a My Project in Pleos Playground.
- Copy the CRN from My Project > Project Info > Test Info.
- Inject the CRN into the Emulator using ADB shell commands. Replace
{CRN}with the CRN copied in step 3.adb root on
adb shell su 0 "echo 'propId: 554696961 areaId: 0 values: {CRN}' > /data/vendor/vsomeip/vhal_fifo"
adb reboot - After injecting the CRN, restart the Emulator.
- After restarting the Emulator, you can build and run your app on the Emulator.
Troubleshooting
The Android Emulator has several known issues, please refer to the link below. Troubleshooting Known Issues with Android Emulator
There are also several known issues with Android Studio and the Gradle plugin, please refer to the link below. Known Issues in Android Studio and Android Gradle Plugin