Found a solution, the .so files should be placed in assets folder and copied when the app startup.
fun copyAssetToInternalStorage(context: Context, assetFileName: String,saveName:String): String? {
val file = File(context.filesDir, saveName)
try {
context.assets.open(assetFileName).use { inputStream ->
FileOutputStream(file).use { outputStream ->
inputStream.copyTo(outputStream)
}
}
} catch (e: IOException) {
e.printStackTrace()
return null
}
return file.absolutePath
}
Then the path can be accessed.