Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load library 'imobiledevice-sdk' #7

Open
ajithvl opened this issue Sep 18, 2013 · 2 comments
Open

Unable to load library 'imobiledevice-sdk' #7

ajithvl opened this issue Sep 18, 2013 · 2 comments

Comments

@ajithvl
Copy link

ajithvl commented Sep 18, 2013

Hi, when i try to run a instruments test on Mac i am getting the following error,

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'imobiledevice-sdk': Native library (darwin/libimobiledevice-sdk.dylib) not found in resource path ([file:/Users/avarakukalayil/Documents/experiment/libimobiledevice-wrapper/target/classes/, file:/Users/avarakukalayil/.m2/repository/net/java/dev/jna/jna/4.0.0/jna-4.0.0.jar, file:/Users/avarakukalayil/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/Users/avarakukalayil/.m2/repository/com/googlecode/plist/dd-plist/1.3/dd-plist-1.3.jar])
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:337)
at org.libimobiledevice.ios.driver.binding.raw.ImobiledeviceSdkLibrary.(ImobiledeviceSdkLibrary.java:37)
at org.libimobiledevice.ios.driver.binding.sdk.IDeviceSDK.(IDeviceSDK.java:40)
at test.Test.main(Test.java:37)

Please let me know how to run libimobiledevice instruments.

Thanks,
-Ajith

@hoihrig
Copy link

hoihrig commented Apr 23, 2015

you have to run:

JNAInit.init();

before using any of the functions provided by libimobiledevice-wrapper. At least that worked for me.

@AlexJinsin
Copy link

@hoihrig I clone git project and import maven project;Then I run test,It can not work;
code:
`public class Test {

public static void main(String[] args)  {
		
	JNAInit.init();
	
	try {
		IOSDevice device = DeviceService.get("f602f0ae61f9b684330d42ac9b9d4fb35e086638");

// AppContainerService appContainerService = new AppContainerService(DeviceService.get("f602f0ae61f9b684330d42ac9b9d4fb35e086638"));
} catch (SDKException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// InformationService service = new InformationService(device);
// System.out.println(service.getDeviceName());

}

}logs:org.libimobiledevice.ios.driver.binding.exceptions.SDKException: SDK_E_LOCKDOWN_CONNECT_FAILED : null
at org.libimobiledevice.ios.driver.binding.exceptions.SDKErrorCode.throwIfNeeded(SDKErrorCode.java:55)
at org.libimobiledevice.ios.driver.binding.services.IOSDevice.(IOSDevice.java:44)
at org.libimobiledevice.ios.driver.binding.services.DeviceService.get(DeviceService.java:37)
at com.wuba.ios.infon.test.Test.main(Test.java:17)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants