You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Guard all injection features behind a global flag
This commit is contained in:
@@ -4,11 +4,14 @@ LOCAL_PATH := $(call my-dir)
|
||||
# Binaries
|
||||
########################
|
||||
|
||||
# Global toggle for the WIP zygote injection features
|
||||
ENABLE_INJECT := 0
|
||||
|
||||
ifdef B_MAGISK
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := magisk
|
||||
LOCAL_STATIC_LIBRARIES := libnanopb libsystemproperties libutils libxhook
|
||||
LOCAL_STATIC_LIBRARIES := libnanopb libsystemproperties libutils
|
||||
LOCAL_C_INCLUDES := jni/include
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
@@ -22,7 +25,6 @@ LOCAL_SRC_FILES := \
|
||||
core/restorecon.cpp \
|
||||
core/module.cpp \
|
||||
magiskhide/magiskhide.cpp \
|
||||
magiskhide/proc_monitor.cpp \
|
||||
magiskhide/hide_utils.cpp \
|
||||
magiskhide/hide_policy.cpp \
|
||||
resetprop/persist_properties.cpp \
|
||||
@@ -30,12 +32,21 @@ LOCAL_SRC_FILES := \
|
||||
su/su.cpp \
|
||||
su/connect.cpp \
|
||||
su/pts.cpp \
|
||||
su/su_daemon.cpp \
|
||||
su/su_daemon.cpp
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
LOCAL_CPPFLAGS := -DENABLE_INJECT=$(ENABLE_INJECT)
|
||||
|
||||
ifeq ($(ENABLE_INJECT),1)
|
||||
LOCAL_STATIC_LIBRARIES += libxhook
|
||||
LOCAL_SRC_FILES += \
|
||||
inject/entry.cpp \
|
||||
inject/utils.cpp \
|
||||
inject/hook.cpp
|
||||
else
|
||||
LOCAL_SRC_FILES += magiskhide/proc_monitor.cpp
|
||||
endif
|
||||
|
||||
LOCAL_LDLIBS := -llog
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user