[SOLVED] Android native deploy


#1

hi all!
I want to deploy my code in android application in native way(without the java code) . I have generated deploy_lib.so, deploy.json and deploy.params.
Then I put deploy_lib.so, deploy.json and deploy.params on sdcard

but error occors:
abort_message: assertion “terminating with uncaught exception of type dmlc::Error: [16:14:51] /app/src/main/cpp/tvm/src/runtime/dso_module.cc:112: Check failed: lib_handle_ != nullptr: Failed to load dynamic shared library /mnt/sdcard/deploy_lib.so dlopen failed: couldn’t map “/storage/emulated/0/deploy_lib.so” segment 1: Operation not permitted” failed

it seems I should not put deploy_lib.so on sdcard, so where should I place the it?


#2

You can look at the android deploy example https://github.com/dmlc/tvm/blob/dd63c755907c5fce2faa028748ab7dd151d0550b/apps/android_deploy/app/src/main/java/ml/dmlc/tvm/android/demo/MainActivity.java#L84 to see one way of storing the libraries as “assets” in the app.


#3

Thanks, it has been solved by placing the *.so in assets.