Hello. I want to use a Native Library in Android that performs encryption functionalities. This Native Library for encryption includes its own integrity verification and is built in C language. During the initialization phase, the library reads a binary file using fopen to perform integrity verification. However, I'm facing difficulties as the result of fopen shows an error "No such directory or files" leading to initialization failure.
When I check the path where the Native Library is called, it appears as "/data/app/~~wivrDY7LhQOJtujMW39YYw==/com.testcrypto.jniexample-4wqZNEpMUitO9Vn-jpJrPw==/lib/arm64/libcrypto-aarch64.so". The fopen() function returns NULL, and when I check with strerror(errno), it shows "No such directory and files" error.
The following condition must be met:
"Integrity verification must be performed exclusively within the Native Library."
This is the security policy that must be strictly followed by the encryption library.
In a situation where permissions are required within the Android app, what permissions would be necessary?
The targeted platform is expected to be embedded in products running Android 10 or above.
Why are you fopening a library? You want dlopen, or more likely System.loadLibrary. I can't really offer more specific advice with the information given.
Hello. I want to use a Native Library in Android that performs encryption functionalities. This Native Library for encryption includes its own integrity verification and is built in C language. During the initialization phase, the library reads a binary file using fopen to perform integrity verification. However, I'm facing difficulties as the result of fopen shows an error "No such directory or files" leading to initialization failure.
When I check the path where the Native Library is called, it appears as "/data/app/~~wivrDY7LhQOJtujMW39YYw==/com.testcrypto.jniexample-4wqZNEpMUitO9Vn-jpJrPw==/lib/arm64/libcrypto-aarch64.so". The fopen() function returns NULL, and when I check with strerror(errno), it shows "No such directory and files" error.
The following condition must be met:
"Integrity verification must be performed exclusively within the Native Library."
This is the security policy that must be strictly followed by the encryption library.
In a situation where permissions are required within the Android app, what permissions would be necessary? The targeted platform is expected to be embedded in products running Android 10 or above.
Is there any solution to this issue?