0

How does the System.loadLibrary("library-name") works in android.Does it invokes the

hw_get_module() of dlopen() of libhardware.so or via linker-loaded method ? Rgds, Softy

Raulp
  • 7,758
  • 20
  • 93
  • 155
  • What makes you think libhardware has anything to do with it? – Chris Stratton May 08 '12 at 18:05
  • I was getting dlopen - failed to open the shared-lib file error.And dlopen gets invoked by the hw_get_module() which comes from the libhardware, so this was the reasoning?Was it correct? – Raulp May 08 '12 at 18:07
  • You can view the source by going here http://source.android.com/source/downloading.html – Rob Kielty May 08 '12 at 18:10
  • One would think libhardware would only come in to resolve some implicit dependency of something in a public API. What are you loadLibrary()-ing? Are you debugging a project-impeding error, or is this a curiosity question? If it's a problem please explain more about it. – Chris Stratton May 08 '12 at 18:19
  • Its related to native library I have made in c with certain functions in it which I want to call using the JNI.For that I have compiled the c files into the .so using the ndk and once built I am loading the library using the System.loadLibrary("library-name").Now I wanted to know how does this loading happens.Which methods gets invoked in between.This shared library has nothign to do with any hardware, that is it is not accessing any /dev node in the code.Above is my explaination/thought(may be mis conception) about the shared library loading concept. - rgds Softy – Raulp May 08 '12 at 18:26

0 Answers0