Hi,
I am trying to port custom android OS on i.MX8MM board with android 14(6.1.57 kernel). I have connected SHT41 temperature and humidity sensor through I2C interface. I want the sensor data to be displayed on an android application and run it on the board.
I have enabled the sensor from kernel and able to print the sensor data to console as there is one ASCII text file in /sys/class/hwmon/hwmon0/temp1_input. When trying to open the file I'm getting permission denied(error 13). I have enabled SeLinux policies permissive.
I also tried to open /dev/i2c-2, as the sensor driver is using I2C but again getting the same error.
So, Please help me with how can I access I2C driver and SHT41 sensor and I found on android website that we need to enable AIDL to interact with HAL layer. So how can I do it? I am a beginner to the android OS.
https://developer.android.com/develop/background-work/services/aidl
Hello,
Actually you're looking at the correct place, as developer.android webpage provides all documentation for android development on application level.
Even the link you have shared is spot on as it proivide examples of AIDL files and how it should be implemented.
Best regards/Saludos,
Aldo.
Hello,
Please accept my apologize for the delayed response, please refer to the following post, I believe this does show exactly what needs to be done:
https://community.nxp.com/t5/i-MX-Processors/Adding-a-sensor-to-Android-but-HAL-doesn-t-seem-to-be/m...
Best regards/Saludos,
Aldo.