Integrating GPS/GNSS HAL support for imx8mm running on Android 10.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Integrating GPS/GNSS HAL support for imx8mm running on Android 10.

447 Views
prasannakulkarni
Contributor IV

This post talks about the Integration of GPS/GNSS HAL  module support in Android 10 for iMX8mm or imx8 series SoC/SOMs.

1.  in the file android_build/device/fsl/imx8m/evk/<device.mk> specific to your board, add the following lines.

PRODUCT_PACKAGES += \
                      android.hardware.gnss@1.0-service \
                      android.hardware.gnss@1.0-impl

2. Add the following lines for permissions. in the same device.mk file. frameworks/native/data/etc/android.hardware.location.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.xml \
frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml\

3. in path android_build/device/fsl/imx8m/evk/ go to manifest.xml and add the following llines

<hal format="hidl">
<name>android.hardware.gnss</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
</interface>
</hal>

4. add the vendor_specific implementation of shared library name in 

    android_build/device/fsl/imx8m/ProductConfigCommon.mk 

     PRODUCT_PACKAGES += \

                               gps.imx

5. ensure that the vendor specific HAL implementation nmea mesg parsing code is present at 

    android_build/vendor/nxp-opensource/imx/ folder and its Android.mk should build shared library named gps.imx. 

 

6. proper permissions should be given to the serial port of the GPS / nmea  device in init.rc, ueventd.rc etc.

 

7. This mentioned solution works when SELinux policies are in permissive mode.

 

8 for the device which runs in SELinux enforced mode, implementor has to write appropriate SEPolicies,  .te files file_contexts etc otherwise avc access denial may occur.

 

#imx8m series #android-10 #GPS/GNSS

 

0 Kudos
Reply
1 Reply

396 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 Kudos
Reply