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

How to manually rebuild project? #9

Open
suclogger opened this issue Jan 1, 2017 · 5 comments
Open

How to manually rebuild project? #9

suclogger opened this issue Jan 1, 2017 · 5 comments

Comments

@suclogger
Copy link

suclogger commented Jan 1, 2017

Hi, it is a great project!
I tried to add some logic under hookclass package(not a native method), but I couldn't figure out how to rebuild an apk file. Could you pls offer some build guide?
Thanks a lot.

@suclogger
Copy link
Author

suclogger commented Jan 1, 2017

Failed to excute ndk build using 13.1.3 .
Which ndk version should be used?

Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml [arm64-v8a] Compile : eagleeyenative <= entry.c jni/entry.c:16:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Java_com_mindmac_eagleeye_NativeEntry_initSystemNativeHook( JNIEnv* env, jobject this ) ^ jni/entry.c:21:3: error: non-void function 'Java_com_mindmac_eagleeye_NativeEntry_initSystemNativeHook' should return a value [-Wreturn-type] return; ^ jni/entry.c:28:3: error: non-void function 'Java_com_mindmac_eagleeye_NativeEntry_initSystemNativeHook' should return a value [-Wreturn-type] return; ^ jni/entry.c:38:31: warning: implicit declaration of function 'getpid' is invalid in C99 [-Wimplicit-function-declaration] if(hook(&(hook_info->eph), getpid(), hook_info->libname, hook_info->funcname, ^ jni/entry.c:46:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Java_com_mindmac_eagleeye_NativeEntry_initCustomNativeHook(JNIEnv* env, jobject this, jstring lib_name){ ^ jni/entry.c:53:3: error: non-void function 'Java_com_mindmac_eagleeye_NativeEntry_initCustomNativeHook' should return a value [-Wreturn-type] return; ^ jni/entry.c:64:3: error: non-void function 'Java_com_mindmac_eagleeye_NativeEntry_initCustomNativeHook' should return a value [-Wreturn-type] return; ^ jni/entry.c:71:3: error: non-void function 'Java_com_mindmac_eagleeye_NativeEntry_initCustomNativeHook' should return a value [-Wreturn-type] return; ^ 3 warnings and 5 errors generated. make: *** [obj/local/arm64-v8a/objs/eagleeyenative/entry.o] Error 1

@suclogger suclogger reopened this Jan 1, 2017
@wbonis
Copy link

wbonis commented Jan 8, 2017

I have the same Problem!

@MindMac
Copy link
Owner

MindMac commented Jan 9, 2017

@suclogger The ndk version I used is r10e.

@nunofaria007
Copy link

1 - Create a new .mk file and paste the following text (this will set the correct ABI and toolchain)

APP_PROJECT_PATH := $(NDK_PROJECT_PATH)
APP_ABI := armeabi
NDK_TOOLCHAIN_VERSION = 4.9
ifndef APP_BUILD_SCRIPT
ifeq (null,$(NDK_PROJECT_PATH))
$(call __ndk_info,NDK_PROJECT_PATH==null. Please explicitly set APP_BUILD_SCRIPT.)
$(call __ndk_error,Aborting.)
endif
APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/jni/Android.mk
endif

Note

(NDK_TOOLCHAIN_VERSION = 4.9): In my case, a clang toolchain (arm-linux-androideabi-clang) was being used by default, so i had to change it to a gcc one (arm-linux-androideabi-4.9), you can check the version on the /toolchains folder and set this parameter accordingly

2- Add following parameter to ndk-build

NDK_APPLICATION_MK=%Path to the .mk file created in step 1%

@junges521
Copy link

I have the same Problem!

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

5 participants