Then I tried to load the util library manually to test whether java
can find it, by calling System.loadLibrary("util"). But this fails
giving an unsatisfied linker error. I have used the symbolic links and
so on accurately. I'm 100% sure that java can find the library. (I use
the same way as I do to the loader library here)
What I have a suspect on the headers of the libraries. I used the
readelf -l command and what I found was as follows;
**When I did it on loader library the header information was;
root@diluka-laptop:/home/diluka/TestPrograms/JNI-svc-client/Android/svc_client/src/com/android/wso2/loader-testing/deploy/lib#
readelf -l libloader.so.0.0.0
Elf file type is DYN (Shared object file)
Entry point 0x23c
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x002f0 0x002f0 RWE 0x8000
DYNAMIC 0x000284 0x00000284 0x00000284 0x00060 0x00060 RW 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
Section to Segment mapping:
Segment Sections...
00 .hash .dynsym .dynstr .text .rodata .dynamic .got
01 .dynamic
02
** But when I did the same thing for the util library I got the following;
root@diluka-laptop:/home/diluka/projects/EmbeddedAxis2c/c/deploy/lib#
readelf -l libutil.so.0.0.0
Elf file type is DYN (Shared object file)
Entry point 0x6cb4
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x16f84 0x19b18 RWE 0x8000
DYNAMIC 0x0169fc 0x000169fc 0x000169fc 0x00098 0x00098 RW 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
Section to Segment mapping:
Segment Sections...
00 .hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text .rodata
.data.rel.ro .dynamic .got .data .bss
01 .dynamic
02
I think any library with simple header info like above get loaded but
the libraries like util didn't get loaded for me. Anybody have some idea
on this ? Please put me a small info on this if you know something about
this.
Thanks,
Diluka.
Thanks,
Diluka.
Thanks,
Diluka.
I/ActivityManager( 467): Starting activity: Intent {
action=android.intent.action.MAIN launchFlags=4
comp={com.android.wso2/com.android.wso2.svc_client} }
I/ActivityManager( 467): Starting app process com.android.wso2 to host
activity {com.android.wso2/com.android.wso2.svc_client}: pid=798
D/jdwp ( 798): JDWP listening on port 8004
I/ActivityThread( 798): Loading code package com.android.wso2 (in
com.android.wso2)
D/ActivityThread( 798): Performing launch of ActivityRecord{400cc9a0
{com.android.wso2/com.android.wso2.svc_client}}
I/ActivityManager( 467): Displayed activity
{com.android.wso2/com.android.wso2.svc_client}: 429 ms
I/ActivityManager( 467): Done launching
{com.android.wso2/com.android.wso2.svc_client}: 432 ms
D/ActivityManager( 467): Stopping: HistoryRecord{40174cb0
{com.google.android.home/com.google.android.home.AllApps}}
D/dalvikvm( 798): LOADING path /system/lib/libloader.so 0x4005c9e8
I/dalvikvm( 798): Added shared lib /system/lib/libloader.so 0x4005c9e8
I/dalvikvm( 798): No JNI_OnLoad found in /system/lib/libloader.so
0x4005c9e8
D/dalvikvm( 798): +++ not scanning '/system/lib/libwebcore.so' for
'invoke' (wrong CL)
D/dalvikvm( 798): +++ not scanning '/system/lib/libmedia_jni.so' for
'invoke' (wrong CL)
D/dalvikvm( 781): LOADING path /system/lib/libloader.so 0x400cffd8
I/dalvikvm( 781): Added shared lib /system/lib/libloader.so 0x400cffd8
I/dalvikvm( 781): No JNI_OnLoad found in /system/lib/libloader.so
0x400cffd8
D/dalvikvm( 781): LOADING path /system/lib/libcrypto.so 0x400cffd8
I/dalvikvm( 781): Unable to dlopen(/system/lib/libcrypto.so): Cannot
find library
But the library is in the place /system/lib/libcrypto.so. But for some
reason it can't be loaded using JNI. Anybody has some idea on this ?
Anybody has some idea please ?
Thanks,
Diluka.
Thanks,
Diluka.
Thanks,
Diluka.
Thanks,
Diluka.