Giter VIP home page Giter VIP logo

ndk-patch's Introduction

ndk-patch

The standard ndk dose not contains some useful libraries such as binder, cutils, utils, android_rumtime and so on. This patch do this job.

##How to use Copy all the files in the ndk-patch to your NDK_DIR/platforms/android-xx/arch-arm/usr

ndk-patch's People

Contributors

b0y1iang avatar boyliang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ndk-patch's Issues

ndk-build 遇到error

In file included from <MY_PATH>/AllHookInOne/jni/JavaHook/ArtMethodHook.cpp:3:0:
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:221:70: error: expected ')' before '::' token
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:221:43: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:223:86: error: expected ')' before '::' token
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:223:59: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:379:68: error: expected ')' before '::' token
bool IsValidIndex(int32_t index) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:379:41: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
bool IsValidIndex(int32_t index) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:395:53: error: expected ')' before '::' token
T Get(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:395:26: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
T Get(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:616:59: error: expected ')' before '::' token
Class* GetSuperClass() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:616:31: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
Class* GetSuperClass() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:624:60: error: expected ')' before '::' token
DexCache* GetDexCache() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
<MY_PATH>/AllHookInOne/jni/JavaHook/art_object_4_4.h:624:32: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
DexCache* GetDexCache() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
<NDK_PATH>/android-ndk-r11c/build/core/build-binary.mk:462: recipe for target '<MY_PATH>/AllHookInOne/obj/local/armeabi/objs/onehook/JavaHook/ArtMethodHook.o' failed
make: *** [<MY_PATH>/AllHookInOne/obj/local/armeabi/objs/onehook/JavaHook/ArtMethodHook.o] Error 1

android nkd 如何打补丁

你好,梁大大。
如何将Android NDK 来打包生成so文件?
总是会遇到各种错误,感觉Android NDK 经常出错。不知道如何配置Android.mk
screen shot 2015-04-21 at 4 36 11 pm

patch后遇到错误

我patch了之后编译遇到了如下错误,请问该如何解决?

Android NDK: WARNING: APP_PLATFORM android-16 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml
Android NDK: WARNING:jni/Android.mk:onehook: non-system libraries in linker flags: -landroid_runtime -lart -ldvm
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi] Compile++ thumb: onehook <= JavaMethodHook.cpp
[armeabi] Compile++ thumb: onehook <= ArtMethodHook.cpp
In file included from jni/JavaHook/ArtMethodHook.cpp:3:0:
jni/JavaHook/art_object_4_4.h:221:70: error: expected ')' before '::' token
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:221:43: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:223:86: error: expected ')' before '::' token
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:223:59: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:379:68: error: expected ')' before '::' token
bool IsValidIndex(int32_t index) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:379:41: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
bool IsValidIndex(int32_t index) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:395:53: error: expected ')' before '::' token
T Get(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:395:26: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
T Get(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:616:59: error: expected ')' before '::' token
Class* GetSuperClass() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:616:31: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
Class* GetSuperClass() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
jni/JavaHook/art_object_4_4.h:624:60: error: expected ')' before '::' token
DexCache* GetDexCache() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:624:32: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
DexCache* GetDexCache() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
make.exe: *** [obj/local/armeabi/objs/onehook/JavaHook/ArtMethodHook.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.