Building and compiling Go code to Windows on a Linux machine

 GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc go build ./

Building an emulator machine for AAOS from a given images

Recently the company I am working with have started working on AAOS (Android Automotive Operating System) version of Google Android and the need to develop, test and deploy the our Android App to the SDV (Software Defined Vehicle) version of the OEM bare OS implantation of Android Automotive (please notice, not Android Auto which is something else).

Here are a few installation procedures we followed since we needed to do in order to be able to run the AAOS machine in emulator on a Linux Ubuntu machine.

You will need around extra 60GB on your HD

Topics:

1. Download the machine image

2. Download and install Android-Studio

3. Create an empty project of Android Automotive and download the relevant SDKs

4. Open the downloaded machine to your Android/Sdk directory of system-images

5. Create a device from the new image

6. Run the machine (some problems with graphics / NVIDIA / Vulkan and GPU)

 

1. Download the machine image

- Receive the machine from you OEM contact

 

2. Download and install Android-Studio

- Android Studio Download

 

3. Create an empty project of Android Automotive and download the relevant SDKs

 

4. Open the downloaded machine to your Android/Sdk directory of system-images

a. Find your Android directory system-images ~/Android/Sdk/system-images/.

b. Create a directory called 'android-34' or any version you need.

c. Inside create a directory called 'your-oem-image-machine'.

d. Inside create a directory called 'x86_64'.

e. Extract the OEM image date into the x86_64 directory.

The full path should look like this: ~/Android/Sdk/system-images/android-34/connect_car_emulator/x86_64/

The content of the directory is the image data:

data
package.xml
VerifiedBootParams.textproto
userdata.img
source.properties
devices.xml
build.prop
advancedFeatures.ini
vendor.img
ramdisk.img
ranchu
encryptionkey.img
system.img

5. Create a device from the new image


 Choose your relevant image from the list of images


- Open advanced settings and set:

Graphics: Hardware

Boot option: Cold boot

Ram: 8192MB

VM Heap: 512MB

Internal storage: 8192MB

* Make sure you have chosen the correct AVD image with the correct name:


 - Then create you machine

6. Run the machine (some problems with graphics / NVIDIA / Vulkan and GPU)

Running the machine might be a bit tricky on Linux / Ubuntu machine so here are some heads up to notice:

Make sure to set export bash global parameters to the correct path:

export ANDROID_SDK_ROOT=~Android/Sdk
export ANDROID_HOME=~Android/Sdk
export PATH=$PATH:/emulator:/platform-tools:/tools

Running the machine:

~/Android/Sdk/emulator/emulator -avd your_avd_name -gpu host -feature -Vulkan

You can list all your avds (Android Virtual Devices) with:

~/Android/Sdk/emulator/emulator -list-avds

You can also try those parameters to run with CPU instead of GPU which are quite slow:

~/Android/Sdk/emulator/emulator -avd our_avd_name -gpu swiftshader_indirect -no-snapshot-load
 

Setting program_name in mysql session_connect_attrs allows you to see the name of the program connected

I am using mysql for quite some time now. I have noticed that looking at client connections using mysql workbench so an interesting column ...