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

compilation error when I build libdalvikhook #13

Open
oswinma opened this issue Jul 22, 2015 · 0 comments
Open

compilation error when I build libdalvikhook #13

oswinma opened this issue Jul 22, 2015 · 0 comments

Comments

@oswinma
Copy link

oswinma commented Jul 22, 2015

== Build libdalvikhook ==

cd dalvikhook
cd jni
ndk-build

The following is error message when I follow the instructions, Could you help me?

C:\Android\ddi\dalvikhook\jni>ndk-build
Android NDK: WARNING:C:/Android/ddi/dalvikhook/jni/Android.mk:dalvikhook: LOCAL_
LDLIBS is always ignored for static libraries
Android NDK: WARNING:C:/Android/ddi/dalvikhook/jni/Android.mk:dalvikhook: non-sy
stem libraries in linker flags: -ldvm ../../../adbi/instruments/base/obj/local/a
rmeabi/libbase.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_S
TATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependenc
ies of the
Android NDK: current module
[armeabi] Compile arm : dalvikhook <= dexstuff.c
C:/Android/ddi/dalvikhook/jni/dexstuff.c: In function 'mydlsym':
C:/Android/ddi/dalvikhook/jni/dexstuff.c:23:2: warning: format '%x' expects argu
ment of type 'unsigned int', but argument 5 has type 'void ' [-Wformat=]
log("%s = 0x%x\n", name, ret)
^
C:/Android/ddi/dalvikhook/jni/dexstuff.c: In function 'dexstuff_resolv_dvm':
C:/Android/ddi/dalvikhook/jni/dexstuff.c:30:2: warning: format '%x' expects argu
ment of type 'unsigned int', but argument 4 has type 'void *' [-Wformat=]
log("dvm_hand = 0x%x\n", d->dvm_hand)
^
C:/Android/ddi/dalvikhook/jni/dexstuff.c: In function 'dexstuff_loaddex':
C:/Android/ddi/dalvikhook/jni/dexstuff.c:97:2: warning: format '%x' expects argu
ment of type 'unsigned int', but argument 4 has type 'char *' [-Wformat=]
log("dexstuff_loaddex, path = 0x%x\n", path)
^
C:/Android/ddi/dalvikhook/jni/dexstuff.c:103:2: warning: format '%x' expects arg
ument of type 'unsigned int', but argument 4 has type 'jobject' [-Wformat=]
log("cookie = 0x%x\n", pResult.l)
^
C:/Android/ddi/dalvikhook/jni/dexstuff.c: In function 'dexstuff_defineclass':
C:/Android/ddi/dalvikhook/jni/dexstuff.c:117:2: warning: format '%x' expects arg
ument of type 'unsigned int', but argument 4 has type 'void *' [-Wformat=]
log("sys classloader = 0x%x\n", cl)
^
C:/Android/ddi/dalvikhook/jni/dexstuff.c:118:2: warning: format '%x' expects arg
ument of type 'unsigned int', but argument 4 has type 'struct Object *' [-Wforma
t=]
log("cur m classloader = 0x%x\n", m->clazz->classLoader)
^
C:/Android/ddi/dalvikhook/jni/dexstuff.c:127:2: warning: format '%x' expects arg
ument of type 'unsigned int', but argument 4 has type 'void *
' [-Wformat=]
log("class = 0x%x\n", ret)
^
[armeabi] Compile thumb : dalvikhook <= dalvik_hook.c
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c: In function 'dalvik_hook':
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:52:3: warning: format '%x' expects a
rgument of type 'unsigned int', but argument 4 has type 'void *' [-Wformat=]
log("class = 0x%x\n", target_cls)
^
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:76:3: warning: format '%x' expects a
rgument of type 'unsigned int', but argument 6 has type 'struct Method *' [-Wfor
mat=]
log("%s(%s) = 0x%x\n", h->method_name, h->method_sig, h->method)
^
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:82:4: warning: format '%x' expects a
rgument of type 'unsigned int', but argument 4 has type 'DalvikBridgeFunc' [-Wfo
rmat=]
log("nativeFunc %x\n", h->method->nativeFunc)
^
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:113:4: warning: format '%x' expects
argument of type 'unsigned int', but argument 5 has type 'void *' [-Wformat=]
log("patched %s to: 0x%x\n", h->method_name, h->native_func)
^
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c: In function 'dalvik_prepare':
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:133:4: warning: format '%x' expects
argument of type 'unsigned int', but argument 4 has type 'jclass' [-Wformat=]
log("cls = 0x%x\n", h->cls)
^
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:141:4: warning: format '%x' expects
argument of type 'unsigned int', but argument 4 has type 'jmethodID' [-Wformat=]

log("mid = 0x%x\n", h-> mid)
^

C:/Android/ddi/dalvikhook/jni/dalvik_hook.c: In function 'dalvik_postcall':
C:/Android/ddi/dalvikhook/jni/dalvik_hook.c:173:3: warning: format '%x' expects
argument of type 'unsigned int', but argument 5 has type 'void *' [-Wformat=]
log("patched BACK %s to: 0x%x\n", h->method_name, h->native_func)
^
[armeabi] StaticLibrary : libdalvikhook.a

@oswinma oswinma changed the title complication error when I build libdalvikhook compilation error when I build libdalvikhook Jul 22, 2015
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

1 participant