Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
622e0986
Commit
622e0986
authored
May 12, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure native codebase
parent
7505599e
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
102 additions
and
98 deletions
+102
-98
Android.mk
native/jni/Android.mk
+30
-26
Android.mk
native/jni/base/Android.mk
+4
-9
compat.cpp
native/jni/base/compat/compat.cpp
+3
-3
fortify.hpp
native/jni/base/compat/fortify.hpp
+3
-3
files.cpp
native/jni/base/files.cpp
+1
-1
files.hpp
native/jni/base/files.hpp
+0
-0
base.hpp
native/jni/base/include/base.hpp
+0
-0
selinux.hpp
native/jni/base/include/selinux.hpp
+0
-0
stream.hpp
native/jni/base/include/stream.hpp
+0
-0
logging.cpp
native/jni/base/logging.cpp
+5
-0
logging.hpp
native/jni/base/logging.hpp
+0
-0
misc.cpp
native/jni/base/misc.cpp
+1
-1
misc.hpp
native/jni/base/misc.hpp
+0
-0
missing.hpp
native/jni/base/missing.hpp
+0
-0
new.cpp
native/jni/base/new.cpp
+0
-0
selinux.cpp
native/jni/base/selinux.cpp
+1
-1
stream.cpp
native/jni/base/stream.cpp
+1
-1
xwrap.cpp
native/jni/base/xwrap.cpp
+1
-1
xwrap.hpp
native/jni/base/xwrap.hpp
+0
-0
bootimg.cpp
native/jni/boot/bootimg.cpp
+1
-1
bootimg.hpp
native/jni/boot/bootimg.hpp
+0
-0
compress.cpp
native/jni/boot/compress.cpp
+1
-1
compress.hpp
native/jni/boot/compress.hpp
+0
-0
cpio.cpp
native/jni/boot/cpio.cpp
+1
-1
cpio.hpp
native/jni/boot/cpio.hpp
+0
-0
dtb.cpp
native/jni/boot/dtb.cpp
+1
-1
dtb.hpp
native/jni/boot/dtb.hpp
+0
-0
format.cpp
native/jni/boot/format.cpp
+0
-0
format.hpp
native/jni/boot/format.hpp
+0
-0
hexpatch.cpp
native/jni/boot/hexpatch.cpp
+1
-1
magiskboot.hpp
native/jni/boot/magiskboot.hpp
+0
-0
main.cpp
native/jni/boot/main.cpp
+1
-1
pattern.cpp
native/jni/boot/pattern.cpp
+1
-1
ramdisk.cpp
native/jni/boot/ramdisk.cpp
+1
-1
applet_stub.cpp
native/jni/core/applet_stub.cpp
+1
-1
applets.cpp
native/jni/core/applets.cpp
+1
-1
bootstages.cpp
native/jni/core/bootstages.cpp
+1
-1
cert.cpp
native/jni/core/cert.cpp
+1
-1
daemon.cpp
native/jni/core/daemon.cpp
+1
-1
db.cpp
native/jni/core/db.cpp
+1
-1
logging.cpp
native/jni/core/logging.cpp
+1
-1
magisk.cpp
native/jni/core/magisk.cpp
+1
-1
module.cpp
native/jni/core/module.cpp
+1
-1
restorecon.cpp
native/jni/core/restorecon.cpp
+1
-1
scripting.cpp
native/jni/core/scripting.cpp
+1
-1
socket.cpp
native/jni/core/socket.cpp
+1
-1
thread.cpp
native/jni/core/thread.cpp
+1
-1
getinfo.cpp
native/jni/init/getinfo.cpp
+1
-1
init.cpp
native/jni/init/init.cpp
+1
-1
init.hpp
native/jni/init/init.hpp
+1
-1
mount.cpp
native/jni/init/mount.cpp
+1
-1
rootdir.cpp
native/jni/init/rootdir.cpp
+1
-1
selinux.cpp
native/jni/init/selinux.cpp
+1
-1
twostage.cpp
native/jni/init/twostage.cpp
+1
-1
persist.cpp
native/jni/resetprop/persist.cpp
+2
-2
prop.hpp
native/jni/resetprop/prop.hpp
+0
-0
resetprop.cpp
native/jni/resetprop/resetprop.cpp
+2
-2
api.cpp
native/jni/sepolicy/api.cpp
+1
-1
sepolicy.hpp
native/jni/sepolicy/include/sepolicy.hpp
+0
-0
main.cpp
native/jni/sepolicy/main.cpp
+1
-1
policy.hpp
native/jni/sepolicy/policy.hpp
+1
-1
policydb.cpp
native/jni/sepolicy/policydb.cpp
+1
-1
rules.cpp
native/jni/sepolicy/rules.cpp
+1
-1
sepolicy.cpp
native/jni/sepolicy/sepolicy.cpp
+1
-1
statement.cpp
native/jni/sepolicy/statement.cpp
+1
-1
connect.cpp
native/jni/su/connect.cpp
+1
-1
pts.cpp
native/jni/su/pts.cpp
+1
-1
su.cpp
native/jni/su/su.cpp
+1
-1
su_daemon.cpp
native/jni/su/su_daemon.cpp
+1
-1
cli.cpp
native/jni/zygisk/deny/cli.cpp
+1
-1
revert.cpp
native/jni/zygisk/deny/revert.cpp
+1
-1
utils.cpp
native/jni/zygisk/deny/utils.cpp
+1
-1
entry.cpp
native/jni/zygisk/entry.cpp
+1
-1
hook.cpp
native/jni/zygisk/hook.cpp
+1
-1
main.cpp
native/jni/zygisk/main.cpp
+1
-1
memory.hpp
native/jni/zygisk/memory.hpp
+1
-1
ptrace.cpp
native/jni/zygisk/ptrace.cpp
+1
-1
utils.cpp
native/jni/zygisk/utils.cpp
+1
-1
No files found.
native/jni/Android.mk
View file @
622e0986
...
@@ -9,7 +9,7 @@ ifdef B_MAGISK
...
@@ -9,7 +9,7 @@ ifdef B_MAGISK
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := magisk
LOCAL_MODULE := magisk
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
lib
utils
\
lib
base
\
libnanopb \
libnanopb \
libsystemproperties \
libsystemproperties \
libphmap \
libphmap \
...
@@ -23,6 +23,7 @@ LOCAL_SRC_FILES := \
...
@@ -23,6 +23,7 @@ LOCAL_SRC_FILES := \
core/bootstages.cpp \
core/bootstages.cpp \
core/socket.cpp \
core/socket.cpp \
core/db.cpp \
core/db.cpp \
core/cert.cpp \
core/scripting.cpp \
core/scripting.cpp \
core/restorecon.cpp \
core/restorecon.cpp \
core/module.cpp \
core/module.cpp \
...
@@ -33,7 +34,6 @@ LOCAL_SRC_FILES := \
...
@@ -33,7 +34,6 @@ LOCAL_SRC_FILES := \
su/su.cpp \
su/su.cpp \
su/connect.cpp \
su/connect.cpp \
su/pts.cpp \
su/pts.cpp \
su/cert.cpp \
su/su_daemon.cpp \
su/su_daemon.cpp \
zygisk/entry.cpp \
zygisk/entry.cpp \
zygisk/main.cpp \
zygisk/main.cpp \
...
@@ -64,7 +64,8 @@ ifdef B_INIT
...
@@ -64,7 +64,8 @@ ifdef B_INIT
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := magiskinit
LOCAL_MODULE := magiskinit
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
libutilx \
libbase \
libcompat \
libpolicy \
libpolicy \
libxz
libxz
...
@@ -86,7 +87,8 @@ ifdef B_BOOT
...
@@ -86,7 +87,8 @@ ifdef B_BOOT
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := magiskboot
LOCAL_MODULE := magiskboot
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
libutilx \
libbase \
libcompat \
libmincrypt \
libmincrypt \
liblzma \
liblzma \
liblz4 \
liblz4 \
...
@@ -96,15 +98,15 @@ LOCAL_STATIC_LIBRARIES := \
...
@@ -96,15 +98,15 @@ LOCAL_STATIC_LIBRARIES := \
libzopfli
libzopfli
LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := \
magisk
boot/main.cpp \
boot/main.cpp \
magisk
boot/bootimg.cpp \
boot/bootimg.cpp \
magisk
boot/hexpatch.cpp \
boot/hexpatch.cpp \
magisk
boot/compress.cpp \
boot/compress.cpp \
magisk
boot/format.cpp \
boot/format.cpp \
magisk
boot/dtb.cpp \
boot/dtb.cpp \
magisk
boot/ramdisk.cpp \
boot/ramdisk.cpp \
magisk
boot/pattern.cpp \
boot/pattern.cpp \
magisk
boot/cpio.cpp
boot/cpio.cpp
LOCAL_LDFLAGS := -static
LOCAL_LDFLAGS := -static
include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)
...
@@ -116,10 +118,11 @@ ifdef B_POLICY
...
@@ -116,10 +118,11 @@ ifdef B_POLICY
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := magiskpolicy
LOCAL_MODULE := magiskpolicy
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
libutils \
libbase \
libbase \
libpolicy
libpolicy
LOCAL_SRC_FILES :=
magisk
policy/main.cpp
LOCAL_SRC_FILES :=
se
policy/main.cpp
include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)
...
@@ -130,7 +133,8 @@ ifdef B_PROP
...
@@ -130,7 +133,8 @@ ifdef B_PROP
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := resetprop
LOCAL_MODULE := resetprop
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
libutilx \
libbase \
libcompat \
libnanopb \
libnanopb \
libsystemproperties
libsystemproperties
...
@@ -151,7 +155,7 @@ ifneq (,$(wildcard jni/test.cpp))
...
@@ -151,7 +155,7 @@ ifneq (,$(wildcard jni/test.cpp))
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE := test
LOCAL_MODULE := test
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
lib
utils
\
lib
base
\
libphmap
libphmap
LOCAL_SRC_FILES := test.cpp
LOCAL_SRC_FILES := test.cpp
...
@@ -167,19 +171,19 @@ endif
...
@@ -167,19 +171,19 @@ endif
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE:= libpolicy
LOCAL_MODULE:= libpolicy
LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
lib
utils
\
lib
base
\
libsepol
libsepol
LOCAL_C_INCLUDES := jni/
magiskpolicy jni/magisk
policy/include
LOCAL_C_INCLUDES := jni/
se
policy/include
LOCAL_EXPORT_C_INCLUDES :=
jni/magiskpolicy/include
LOCAL_EXPORT_C_INCLUDES :=
$(LOCAL_C_INCLUDES)
LOCAL_SRC_FILES := \
LOCAL_SRC_FILES := \
magisk
policy/api.cpp \
se
policy/api.cpp \
magisk
policy/sepolicy.cpp \
se
policy/sepolicy.cpp \
magisk
policy/rules.cpp \
se
policy/rules.cpp \
magisk
policy/policydb.cpp \
se
policy/policydb.cpp \
magisk
policy/statement.cpp
se
policy/statement.cpp
include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
include jni/
utils
/Android.mk
include jni/
base
/Android.mk
include jni/external/Android.mk
include jni/external/Android.mk
ifdef B_BB
ifdef B_BB
...
...
native/jni/
utils
/Android.mk
→
native/jni/
base
/Android.mk
View file @
622e0986
...
@@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir)
...
@@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir)
# Magisk project-wide common code
# Magisk project-wide common code
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE:= lib
utils
LOCAL_MODULE:= lib
base
LOCAL_C_INCLUDES := jni/include $(LOCAL_PATH)/include out/generated
LOCAL_C_INCLUDES := jni/include $(LOCAL_PATH)/include out/generated
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_EXPORT_STATIC_LIBRARIES := libcxx
LOCAL_EXPORT_STATIC_LIBRARIES := libcxx
...
@@ -18,15 +18,10 @@ LOCAL_SRC_FILES := \
...
@@ -18,15 +18,10 @@ LOCAL_SRC_FILES := \
stream.cpp
stream.cpp
include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
# libutils + "hacky" libc.a missing symbols
# Workaround "hacky" libc.a missing symbols
# To build Magisk with vanilla NDK, remove all usage of libcompat
# To build Magisk with vanilla NDK, simply
# remove compat.cpp from sources, or replace
# all usage of libutilx to libutils
include $(CLEAR_VARS)
include $(CLEAR_VARS)
LOCAL_MODULE:= libutilx
LOCAL_MODULE:= libcompat
LOCAL_EXPORT_STATIC_LIBRARIES := libutils
LOCAL_STATIC_LIBRARIES := libutils
LOCAL_SRC_FILES := compat/compat.cpp
LOCAL_SRC_FILES := compat/compat.cpp
include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
native/jni/
utils
/compat/compat.cpp
→
native/jni/
base
/compat/compat.cpp
View file @
622e0986
// This file implements all missing symbols that should exist in normal API 21
// This file implements all missing symbols that should exist in normal API 21
// libc.a but missing in our extremely lean libc.a replacements.
// libc.a but missing in our extremely lean libc.a replacements.
#include <
cstdlib
>
#include <
stdlib.h
>
#include <
cstring
>
#include <
string.h
>
#include <
cerrno
>
#include <
errno.h
>
#include <mntent.h>
#include <mntent.h>
#include <unistd.h>
#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
...
...
native/jni/
utils
/compat/fortify.hpp
→
native/jni/
base
/compat/fortify.hpp
View file @
622e0986
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
#include <sys/stat.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <fcntl.h>
#include <logging.hpp>
#undef _FORTIFY_SOURCE
#undef _FORTIFY_SOURCE
extern
int
__vloge
(
const
char
*
fmt
,
va_list
ap
);
static
inline
__noreturn
__printflike
(
1
,
2
)
void
__fortify_fatal
(
const
char
*
fmt
,
...)
{
static
inline
__noreturn
__printflike
(
1
,
2
)
void
__fortify_fatal
(
const
char
*
fmt
,
...)
{
va_list
args
;
va_list
args
;
va_start
(
args
,
fmt
);
va_start
(
args
,
fmt
);
log_cb
.
e
(
fmt
,
args
);
__vlog
e
(
fmt
,
args
);
va_end
(
args
);
va_end
(
args
);
abort
();
abort
();
}
}
...
...
native/jni/
utils
/files.cpp
→
native/jni/
base
/files.cpp
View file @
622e0986
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <unistd.h>
#include <unistd.h>
#include <libgen.h>
#include <libgen.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/
utils
/files.hpp
→
native/jni/
base
/files.hpp
View file @
622e0986
File moved
native/jni/
utils/include/utils
.hpp
→
native/jni/
base/include/base
.hpp
View file @
622e0986
File moved
native/jni/
utils
/include/selinux.hpp
→
native/jni/
base
/include/selinux.hpp
View file @
622e0986
File moved
native/jni/
utils
/include/stream.hpp
→
native/jni/
base
/include/stream.hpp
View file @
622e0986
File moved
native/jni/
utils
/logging.cpp
→
native/jni/
base
/logging.cpp
View file @
622e0986
...
@@ -55,3 +55,8 @@ void LOGD(const char *fmt, ...) {}
...
@@ -55,3 +55,8 @@ void LOGD(const char *fmt, ...) {}
void
LOGI
(
const
char
*
fmt
,
...)
{
LOG_BODY
(
i
)
}
void
LOGI
(
const
char
*
fmt
,
...)
{
LOG_BODY
(
i
)
}
void
LOGW
(
const
char
*
fmt
,
...)
{
LOG_BODY
(
w
)
}
void
LOGW
(
const
char
*
fmt
,
...)
{
LOG_BODY
(
w
)
}
void
LOGE
(
const
char
*
fmt
,
...)
{
LOG_BODY
(
e
);
log_cb
.
ex
(
EXIT_FAILURE
);
}
void
LOGE
(
const
char
*
fmt
,
...)
{
LOG_BODY
(
e
);
log_cb
.
ex
(
EXIT_FAILURE
);
}
// Export raw symbol to fortify compat
extern
"C"
int
__vloge
(
const
char
*
fmt
,
va_list
ap
)
{
return
log_cb
.
e
(
fmt
,
ap
);
}
native/jni/
utils
/logging.hpp
→
native/jni/
base
/logging.hpp
View file @
622e0986
File moved
native/jni/
utils
/misc.cpp
→
native/jni/
base
/misc.cpp
View file @
622e0986
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#include <random>
#include <random>
#include <string>
#include <string>
#include <
utils
.hpp>
#include <
base
.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/
utils
/misc.hpp
→
native/jni/
base
/misc.hpp
View file @
622e0986
File moved
native/jni/
utils
/missing.hpp
→
native/jni/
base
/missing.hpp
View file @
622e0986
File moved
native/jni/
utils
/new.cpp
→
native/jni/
base
/new.cpp
View file @
622e0986
File moved
native/jni/
utils
/selinux.cpp
→
native/jni/
base
/selinux.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <sys/syscall.h>
#include <sys/syscall.h>
#include <sys/xattr.h>
#include <sys/xattr.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/
utils
/stream.cpp
→
native/jni/
base
/stream.cpp
View file @
622e0986
#include <unistd.h>
#include <unistd.h>
#include <cstddef>
#include <cstddef>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <stream.hpp>
#include <stream.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/
utils
/xwrap.cpp
→
native/jni/
base
/xwrap.cpp
View file @
622e0986
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include <sys/ptrace.h>
#include <sys/ptrace.h>
#include <sys/inotify.h>
#include <sys/inotify.h>
#include <
utils
.hpp>
#include <
base
.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/
utils
/xwrap.hpp
→
native/jni/
base
/xwrap.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/bootimg.cpp
→
native/jni/boot/bootimg.cpp
View file @
622e0986
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <libfdt.h>
#include <libfdt.h>
#include <mincrypt/sha.h>
#include <mincrypt/sha.h>
#include <mincrypt/sha256.h>
#include <mincrypt/sha256.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "bootimg.hpp"
#include "bootimg.hpp"
#include "magiskboot.hpp"
#include "magiskboot.hpp"
...
...
native/jni/
magisk
boot/bootimg.hpp
→
native/jni/boot/bootimg.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/compress.cpp
→
native/jni/boot/compress.cpp
View file @
622e0986
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include <zopfli/util.h>
#include <zopfli/util.h>
#include <zopfli/deflate.h>
#include <zopfli/deflate.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "magiskboot.hpp"
#include "magiskboot.hpp"
#include "compress.hpp"
#include "compress.hpp"
...
...
native/jni/
magisk
boot/compress.hpp
→
native/jni/boot/compress.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/cpio.cpp
→
native/jni/boot/cpio.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <fcntl.h>
#include <fcntl.h>
#include <algorithm>
#include <algorithm>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "cpio.hpp"
#include "cpio.hpp"
...
...
native/jni/
magisk
boot/cpio.hpp
→
native/jni/boot/cpio.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/dtb.cpp
→
native/jni/boot/dtb.cpp
View file @
622e0986
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <map>
#include <map>
#include <libfdt.h>
#include <libfdt.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "magiskboot.hpp"
#include "magiskboot.hpp"
#include "dtb.hpp"
#include "dtb.hpp"
...
...
native/jni/
magisk
boot/dtb.hpp
→
native/jni/boot/dtb.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/format.cpp
→
native/jni/boot/format.cpp
View file @
622e0986
File moved
native/jni/
magisk
boot/format.hpp
→
native/jni/boot/format.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/hexpatch.cpp
→
native/jni/boot/hexpatch.cpp
View file @
622e0986
#include <sys/mman.h>
#include <sys/mman.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "magiskboot.hpp"
#include "magiskboot.hpp"
...
...
native/jni/
magisk
boot/magiskboot.hpp
→
native/jni/boot/magiskboot.hpp
View file @
622e0986
File moved
native/jni/
magisk
boot/main.cpp
→
native/jni/boot/main.cpp
View file @
622e0986
#include <mincrypt/sha.h>
#include <mincrypt/sha.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "magiskboot.hpp"
#include "magiskboot.hpp"
#include "compress.hpp"
#include "compress.hpp"
...
...
native/jni/
magisk
boot/pattern.cpp
→
native/jni/boot/pattern.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
#include "magiskboot.hpp"
#include "magiskboot.hpp"
...
...
native/jni/
magisk
boot/ramdisk.cpp
→
native/jni/boot/ramdisk.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
#include "cpio.hpp"
#include "cpio.hpp"
#include "magiskboot.hpp"
#include "magiskboot.hpp"
...
...
native/jni/core/applet_stub.cpp
View file @
622e0986
#include <sys/stat.h>
#include <sys/stat.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
umask
(
0
);
umask
(
0
);
...
...
native/jni/core/applets.cpp
View file @
622e0986
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <magisk.hpp>
#include <magisk.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/core/bootstages.cpp
View file @
622e0986
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include <magisk.hpp>
#include <magisk.hpp>
#include <db.hpp>
#include <db.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <resetprop.hpp>
#include <resetprop.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
...
...
native/jni/
su
/cert.cpp
→
native/jni/
core
/cert.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/core/daemon.cpp
View file @
622e0986
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <sys/mount.h>
#include <sys/mount.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include <db.hpp>
#include <db.hpp>
...
...
native/jni/core/db.cpp
View file @
622e0986
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <magisk.hpp>
#include <magisk.hpp>
#include <db.hpp>
#include <db.hpp>
#include <socket.hpp>
#include <socket.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#define DB_VERSION 12
#define DB_VERSION 12
...
...
native/jni/core/logging.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <android/log.h>
#include <android/log.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <stream.hpp>
#include <stream.hpp>
...
...
native/jni/core/magisk.cpp
View file @
622e0986
#include <sys/mount.h>
#include <sys/mount.h>
#include <libgen.h>
#include <libgen.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <magisk.hpp>
#include <magisk.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
...
...
native/jni/core/module.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <map>
#include <map>
#include <utility>
#include <utility>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <magisk.hpp>
#include <magisk.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
...
...
native/jni/core/restorecon.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <magisk.hpp>
#include <magisk.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/core/scripting.cpp
View file @
622e0986
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <sys/wait.h>
#include <sys/wait.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
...
...
native/jni/core/socket.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <endian.h>
#include <endian.h>
#include <socket.hpp>
#include <socket.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/core/thread.cpp
View file @
622e0986
// Cached thread pool implementation
// Cached thread pool implementation
#include <
utils
.hpp>
#include <
base
.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
...
...
native/jni/init/getinfo.cpp
View file @
622e0986
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <fcntl.h>
#include <fcntl.h>
#include <vector>
#include <vector>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "init.hpp"
#include "init.hpp"
...
...
native/jni/init/init.cpp
View file @
622e0986
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <xz.h>
#include <xz.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <binaries.h>
#include <binaries.h>
#if defined(__arm__)
#if defined(__arm__)
...
...
native/jni/init/init.hpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
using
kv_pairs
=
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>
;
using
kv_pairs
=
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>
;
...
...
native/jni/init/mount.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <sys/sysmacros.h>
#include <sys/sysmacros.h>
#include <libgen.h>
#include <libgen.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include <magisk.hpp>
#include <magisk.hpp>
...
...
native/jni/init/rootdir.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <libgen.h>
#include <libgen.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "init.hpp"
#include "init.hpp"
#include "magiskrc.inc"
#include "magiskrc.inc"
...
...
native/jni/init/selinux.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <magisk.hpp>
#include <magisk.hpp>
#include <sepolicy.hpp>
#include <sepolicy.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "init.hpp"
#include "init.hpp"
...
...
native/jni/init/twostage.cpp
View file @
622e0986
#include <sys/mount.h>
#include <sys/mount.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <socket.hpp>
#include <socket.hpp>
#include "init.hpp"
#include "init.hpp"
...
...
native/jni/resetprop/persist.cpp
View file @
622e0986
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#include <pb_decode.h>
#include <pb_decode.h>
#include <pb_encode.h>
#include <pb_encode.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "
_reset
prop.hpp"
#include "prop.hpp"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/resetprop/
_reset
prop.hpp
→
native/jni/resetprop/prop.hpp
View file @
622e0986
File moved
native/jni/resetprop/resetprop.cpp
View file @
622e0986
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
#include <map>
#include <map>
#include <resetprop.hpp>
#include <resetprop.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <_system_properties.h>
#include <_system_properties.h>
#include "
_reset
prop.hpp"
#include "prop.hpp"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/
magisk
policy/api.cpp
→
native/jni/
se
policy/api.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
#include "policy.hpp"
#include "policy.hpp"
...
...
native/jni/
magisk
policy/include/sepolicy.hpp
→
native/jni/
se
policy/include/sepolicy.hpp
View file @
622e0986
File moved
native/jni/
magisk
policy/main.cpp
→
native/jni/
se
policy/main.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
#include <vector>
#include <vector>
#include "policy.hpp"
#include "policy.hpp"
...
...
native/jni/
magisk
policy/policy.hpp
→
native/jni/
se
policy/policy.hpp
View file @
622e0986
#pragma once
#pragma once
//
libse i
nternal APIs, do not use directly
//
I
nternal APIs, do not use directly
#include <sepol/policydb/policydb.h>
#include <sepol/policydb/policydb.h>
#include <sepolicy.hpp>
#include <sepolicy.hpp>
...
...
native/jni/
magisk
policy/policydb.cpp
→
native/jni/
se
policy/policydb.cpp
View file @
622e0986
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <cil/cil.h>
#include <cil/cil.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <stream.hpp>
#include <stream.hpp>
#include "policy.hpp"
#include "policy.hpp"
...
...
native/jni/
magisk
policy/rules.cpp
→
native/jni/
se
policy/rules.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
#include "policy.hpp"
#include "policy.hpp"
...
...
native/jni/
magisk
policy/sepolicy.cpp
→
native/jni/
se
policy/sepolicy.cpp
View file @
622e0986
#include <
utils
.hpp>
#include <
base
.hpp>
#include "policy.hpp"
#include "policy.hpp"
...
...
native/jni/
magisk
policy/statement.cpp
→
native/jni/
se
policy/statement.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "policy.hpp"
#include "policy.hpp"
...
...
native/jni/su/connect.cpp
View file @
622e0986
#include <sys/types.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include "su.hpp"
#include "su.hpp"
...
...
native/jni/su/pts.cpp
View file @
622e0986
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include <fcntl.h>
#include <fcntl.h>
#include <termios.h>
#include <termios.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "pts.hpp"
#include "pts.hpp"
...
...
native/jni/su/su.cpp
View file @
622e0986
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
#include <magisk.hpp>
#include <magisk.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <flags.h>
#include <flags.h>
#include "su.hpp"
#include "su.hpp"
...
...
native/jni/su/su_daemon.cpp
View file @
622e0986
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include <daemon.hpp>
#include <daemon.hpp>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <selinux.hpp>
#include <selinux.hpp>
#include <db.hpp>
#include <db.hpp>
...
...
native/jni/zygisk/deny/cli.cpp
View file @
622e0986
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <sys/mount.h>
#include <sys/mount.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "deny.hpp"
#include "deny.hpp"
...
...
native/jni/zygisk/deny/revert.cpp
View file @
622e0986
#include <sys/mount.h>
#include <sys/mount.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "deny.hpp"
#include "deny.hpp"
...
...
native/jni/zygisk/deny/utils.cpp
View file @
622e0986
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#include <set>
#include <set>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <db.hpp>
#include <db.hpp>
#include "deny.hpp"
#include "deny.hpp"
...
...
native/jni/zygisk/entry.cpp
View file @
622e0986
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <android/log.h>
#include <android/log.h>
#include <android/dlext.h>
#include <android/dlext.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
#include <magisk.hpp>
#include <magisk.hpp>
#include <db.hpp>
#include <db.hpp>
...
...
native/jni/zygisk/hook.cpp
View file @
622e0986
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <xhook.h>
#include <xhook.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <flags.h>
#include <flags.h>
#include <daemon.hpp>
#include <daemon.hpp>
...
...
native/jni/zygisk/main.cpp
View file @
622e0986
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <dlfcn.h>
#include <dlfcn.h>
#include <magisk.hpp>
#include <magisk.hpp>
#include <
utils
.hpp>
#include <
base
.hpp>
#include <socket.hpp>
#include <socket.hpp>
#include <daemon.hpp>
#include <daemon.hpp>
...
...
native/jni/zygisk/memory.hpp
View file @
622e0986
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <map>
#include <map>
#include <parallel_hashmap/phmap.h>
#include <parallel_hashmap/phmap.h>
#include <
utils
.hpp>
#include <
base
.hpp>
namespace
jni_hook
{
namespace
jni_hook
{
...
...
native/jni/zygisk/ptrace.cpp
View file @
622e0986
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include <sys/ptrace.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "zygisk.hpp"
#include "zygisk.hpp"
#include "ptrace.hpp"
#include "ptrace.hpp"
...
...
native/jni/zygisk/utils.cpp
View file @
622e0986
#include <cinttypes>
#include <cinttypes>
#include <
utils
.hpp>
#include <
base
.hpp>
#include "zygisk.hpp"
#include "zygisk.hpp"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment