I found this one using Google:

https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/0uY4qgam1Ws

It says:

You must use System.load() if you want to specify the full path name 
of the file, System.loadLibrary() is only for ones in the default 
location. 

Also *you should not be able to load an .so off the SDCARD on an ARM *
*system by normal means*, as ARM supports non-executable pages and 
android's implementation of mmap() refuses to map executable pages 
backed by a noexec file system.  To load from such a file system you 
would have to map anonymous executable pages and manually load the .so 
into them, doing appropriate interpretation of the contents and all 
fixups normally performed by the runtime linker. 

Thanks.


On Wednesday, May 15, 2013 4:32:37 PM UTC-5, Piren wrote:
>
> That's what bing got me :)
>  
>
> http://stackoverflow.com/questions/2826412/how-to-load-jni-from-sd-card-on-android-2-1
>
> On Wednesday, May 15, 2013 12:00:50 PM UTC+3, Filipe wrote:
>
>> Hi,
>>  
>> I had only used Bing up till now ;)
>> Thanks for your great tutorial on this new thing called Google.
>> I tryed it, but still did not find the answer.
>>  
>> The libs are under the "/data/data/your_package_name/lib" folder.
>> When I move the App I start getting java.lang.UnsatisfiedLinkError: 
>> findLibrary returned null
>>  
>> I found some new things
>> This works without problems on AVD. But I noticed that even if I move the 
>> App to the sdcard on the AVD, the lib remains in the same folder.
>>  
>> So maybe the problem is specific to my HTC.
>> Using "adb shell" I can find the libs in this folder. After moving to 
>> sdcard, when I use "adb shell" I get "permission denied" trying to access 
>> the lib folder !!!
>> So I'm gessing that on my HTC the libs are moved, I just don't know where 
>> to.
>>  
>>  
>> Thanks
>>
>> Terça-feira, 14 de Maio de 2013 23:51:21 UTC+1, Lew escreveu:
>>
>>> Filipe wrote:
>>>>
>>>> I have a project in Eclipse that uses some jni [sic] libraries that I 
>>>> load using System.loadLibrary("myNativeLib").
>>>>
>>>
>>> Those libraries are native to what platform?
>>>  
>>>
>>>>  
>>>> This works great, but if I move my app to the SDCard it stops working, 
>>>> because it can't load the library.
>>>>
>>>
>>> Did you take note of this from the Javadocs for 'System.loadLibrary()'?
>>> "The mapping of the specified library name to the full path for loading 
>>> the library is implementation-dependent." 
>>>
>>> Where did you put the library on the device. Is this where the system 
>>> expects to find libraries?
>>>
>>>  Are there any limitations on moving the app to SDCard when using jni? 
>>>> Or do I have to change my call to System.loadLibrary ?
>>>>
>>>
>>>
>>> http://developer.android.com/reference/java/lang/System.html#loadLibrary(java.lang.String)
>>>
>>> Also, I see some potentially useful links here:
>>> http://lmgtfy.com/?q=Android+JNI
>>>
>>> -- 
>>> Lew
>>>  
>>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to