thrust
thrust

Reputation: 215

AWS Device Farm + Espresso: Running Espresso Instrumentation Test involving Native JNI method call in AWS Device Farm

I am using Jenkins' Run Test on AWS Device Farm post build action to run Espresso Android Instrumentation test in the devices in Device Farm. The app uses a native JNI Library to create TIFF Images out of JPEGS.

However, as soon as the code for executing the native function gets executed, the app crashes. Even if I am just running the app in one of the devices in the Device Farm, the app crashes when I click on the button that calls the native JNI function.

I am getting following error in the logs: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "rand" referenced by "libtiff.so"...

Also getting following JNI related logs at an earlier point of time, when things were getting initialized

I want to know if JNI library loading is by default disabled in the AWS Device Farm. If yes, is there a way to enable them. If JNI Libraries are supported by default, can someone please point me in the right direction so that I can resolve this issue.

Upvotes: 0

Views: 267

Answers (1)

NikofTime
NikofTime

Reputation: 749

I work for the AWS Device Farm Team.

  1. JNI library loading is not disabled on Device Farm.
  2. One thing that may be a potential cause of the issue that you are seeing is that we resign apps at our end when uploaded which may break things like Google maps. Refer FAQ "Do you modify my app?" https://aws.amazon.com/device-farm/faq/

Also make sure that you are able to load this app on a real device locally and launch it successfully. This will give you a baseline to compare.

Hope that helps.

Upvotes: 0

Related Questions