Skip to content

Commit

Permalink
init Android 14
Browse files Browse the repository at this point in the history
  • Loading branch information
imsourcandy committed Jul 22, 2024
1 parent 58f2abd commit ebec96f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ YAHFA is a hook framework for Android ART. It provides an efficient way for Java
- Android 10(API 29)
- Android 11(API 30)
- Android 12(DP1)
- Android 13(API 33)
- Android 14(API 34)

(Support for version <= 6.0 is broken after commit [9824bdd](https://github.com/PAGalaxyLab/YAHFA/commit/9824bdd9d958fd0eca43537b6288bb04da191036).)

Expand Down
1 change: 1 addition & 0 deletions library/src/main/jni/HookMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ void Java_lab_galaxy_yahfa_HookMain_init(JNIEnv *env, jclass clazz, jint sdkVers
jclass classExecutable;
LOGI("init to SDK %d", sdkVersion);
switch (sdkVersion) {
case __ANDROID_API_U__:
case __ANDROID_API_T__:
case __ANDROID_API_S_L__:
case __ANDROID_API_S__:
Expand Down
5 changes: 5 additions & 0 deletions library/src/main/jni/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
#include <android/log.h>
#include <stdint.h>

// Android 14
#ifndef __ANDROID_API_U__
#define __ANDROID_API_U__ 34
#endif

// Android 13
#ifndef __ANDROID_API_T__
#define __ANDROID_API_T__ 33
Expand Down

0 comments on commit ebec96f

Please sign in to comment.