Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
log should not be printed in zygote process
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Jul 12, 2019
1 parent f636baa commit 1964905
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

def gitCommitCount = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
def baseVersionName = '19.1'
def baseVersionName = '19.4'

android {
compileSdkVersion rootProject.ext.targetSdkVersion
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/moe/riru/manager/utils/NativeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
@Keep
public class NativeHelper {

private static final int V19_4 = 26;
private static final int V19_3 = 25;
private static final int V19_2 = 24;
private static final int V19_1 = 22;
private static final int V19 = 20;
private static final int V18 = 19;
private static final int V17_1 = 18;
private static final int MAX_VERSION = V19_3;
private static final int MAX_VERSION = V19_4;

static {
System.loadLibrary("helper");
Expand All @@ -31,6 +32,8 @@ public static String versionName(Context context, int versionCode) {
}

switch (versionCode) {
case V19_4:
return "v19.4";
case V19_3:
return "v19.3";
case V19_2:
Expand Down
4 changes: 2 additions & 2 deletions riru-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def moduleId = "riru-core"
def moduleName = "Riru - Core"
def moduleAuthor = "Rikka"
def moduleDescription = "Inject zygote process by replace libmemtrack.so, provide interface to other Riru modules."
def versionName = "v19.3"
def versionCode = 25
def versionName = "v19.4"
def versionCode = 26

def zipNameMagisk = "magisk-${project.name}-${versionName}.zip"

Expand Down
2 changes: 1 addition & 1 deletion riru-core/jni/main/jni_native_method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void nativeForkAndSpecialize_pre(

static void nativeForkAndSpecialize_post(JNIEnv *env, jclass clazz, jint uid, jint res) {

unhook_jniRegisterNativeMethods();
if (res == 0) unhook_jniRegisterNativeMethods();

for (auto module : *get_modules()) {
if (!module->forkAndSpecializePost)
Expand Down
2 changes: 1 addition & 1 deletion riru-core/jni/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void unhook_jniRegisterNativeMethods() {
nullptr);
if (xhook_refresh(0) == 0) {
xhook_clear();
LOGI("hook removed");
LOGV("hook removed");
}
}

Expand Down
4 changes: 2 additions & 2 deletions riru-core/jni/main/version.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef VERSION_H
#define VERSION_H

#define VERSION_CODE 25
#define VERSION_NAME "v19.3"
#define VERSION_CODE 26
#define VERSION_NAME "v19.4"

#endif // VERSION_H

0 comments on commit 1964905

Please sign in to comment.