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
a0998009
Commit
a0998009
authored
Mar 09, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small native code reorganization
parent
d6fdbfe9
Hide whitespace changes
Inline
Side-by-side
Showing
85 changed files
with
216 additions
and
317 deletions
+216
-317
.gitattributes
.gitattributes
+4
-0
Android.mk
native/jni/Android.mk
+0
-4
applet_stub.cpp
native/jni/core/applet_stub.cpp
+1
-1
applets.cpp
native/jni/core/applets.cpp
+3
-3
bootstages.cpp
native/jni/core/bootstages.cpp
+6
-6
daemon.cpp
native/jni/core/daemon.cpp
+6
-6
db.cpp
native/jni/core/db.cpp
+4
-4
magisk.cpp
native/jni/core/magisk.cpp
+4
-4
scripting.cpp
native/jni/core/scripting.cpp
+3
-3
socket.cpp
native/jni/core/socket.cpp
+3
-3
daemon.hpp
native/jni/include/daemon.hpp
+0
-0
db.hpp
native/jni/include/db.hpp
+0
-0
magisk.hpp
native/jni/include/magisk.hpp
+1
-1
magiskpolicy.hpp
native/jni/include/magiskpolicy.hpp
+1
-1
resetprop.hpp
native/jni/include/resetprop.hpp
+0
-0
getinfo.cpp
native/jni/init/getinfo.cpp
+3
-3
init.cpp
native/jni/init/init.cpp
+4
-4
init.hpp
native/jni/init/init.hpp
+1
-1
magiskrc.inc
native/jni/init/magiskrc.inc
+2
-2
mount.cpp
native/jni/init/mount.cpp
+5
-5
rootdir.cpp
native/jni/init/rootdir.cpp
+5
-5
bootimg.cpp
native/jni/magiskboot/bootimg.cpp
+5
-5
bootimg.hpp
native/jni/magiskboot/bootimg.hpp
+1
-1
compress.cpp
native/jni/magiskboot/compress.cpp
+4
-4
compress.hpp
native/jni/magiskboot/compress.hpp
+2
-2
dtb.cpp
native/jni/magiskboot/dtb.cpp
+3
-3
dtb.hpp
native/jni/magiskboot/dtb.hpp
+0
-0
format.cpp
native/jni/magiskboot/format.cpp
+1
-1
format.hpp
native/jni/magiskboot/format.hpp
+0
-0
hexpatch.cpp
native/jni/magiskboot/hexpatch.cpp
+2
-2
magiskboot.hpp
native/jni/magiskboot/magiskboot.hpp
+0
-0
main.cpp
native/jni/magiskboot/main.cpp
+4
-4
pattern.cpp
native/jni/magiskboot/pattern.cpp
+2
-2
ramdisk.cpp
native/jni/magiskboot/ramdisk.cpp
+4
-4
hide_policy.cpp
native/jni/magiskhide/hide_policy.cpp
+5
-5
hide_utils.cpp
native/jni/magiskhide/hide_utils.cpp
+4
-4
magiskhide.cpp
native/jni/magiskhide/magiskhide.cpp
+3
-3
magiskhide.hpp
native/jni/magiskhide/magiskhide.hpp
+1
-1
proc_monitor.cpp
native/jni/magiskhide/proc_monitor.cpp
+3
-3
api.cpp
native/jni/magiskpolicy/api.cpp
+1
-1
magiskpolicy.cpp
native/jni/magiskpolicy/magiskpolicy.cpp
+3
-3
policydb.cpp
native/jni/magiskpolicy/policydb.cpp
+4
-4
rules.cpp
native/jni/magiskpolicy/rules.cpp
+2
-2
sepolicy.c
native/jni/magiskpolicy/sepolicy.c
+1
-1
statement.cpp
native/jni/magiskpolicy/statement.cpp
+3
-3
_resetprop.hpp
native/jni/resetprop/_resetprop.hpp
+2
-2
persist_properties.cpp
native/jni/resetprop/persist_properties.cpp
+2
-2
bionic_macros.h
native/jni/resetprop/private/bionic_macros.h
+0
-105
redefs.h
native/jni/resetprop/private/redefs.h
+0
-21
resetprop.cpp
native/jni/resetprop/resetprop.cpp
+6
-6
connect.cpp
native/jni/su/connect.cpp
+4
-4
pts.cpp
native/jni/su/pts.cpp
+2
-2
pts.hpp
native/jni/su/pts.hpp
+1
-1
su.cpp
native/jni/su/su.cpp
+4
-4
su.hpp
native/jni/su/su.hpp
+2
-2
su_daemon.cpp
native/jni/su/su_daemon.cpp
+6
-6
Android.mk
native/jni/systemproperties/Android.mk
+2
-0
_system_properties.h
native/jni/systemproperties/include/_system_properties.h
+0
-0
hacks.h
native/jni/systemproperties/include/hacks.h
+0
-14
bionic_defs.h
native/jni/systemproperties/include/private/bionic_defs.h
+0
-0
hacks.h
native/jni/systemproperties/include/private/hacks.h
+35
-0
system_properties.h
native/jni/systemproperties/include/system_properties.h
+2
-1
prop_info.h
...ni/systemproperties/include/system_properties/prop_info.h
+2
-2
system_properties.h
...mproperties/include/system_properties/system_properties.h
+2
-1
system_property_api.cpp
native/jni/systemproperties/system_property_api.cpp
+1
-1
system_property_set.cpp
native/jni/systemproperties/system_property_set.cpp
+2
-2
cpio.cpp
native/jni/utils/cpio.cpp
+3
-3
file.cpp
native/jni/utils/file.cpp
+2
-2
files.hpp
native/jni/utils/files.hpp
+1
-1
blocking_queue.hpp
native/jni/utils/include/blocking_queue.hpp
+1
-1
cpio.hpp
native/jni/utils/include/cpio.hpp
+1
-1
logging.hpp
native/jni/utils/include/logging.hpp
+0
-0
selinux.hpp
native/jni/utils/include/selinux.hpp
+0
-0
stream.hpp
native/jni/utils/include/stream.hpp
+1
-1
utils.h
native/jni/utils/include/utils.h
+0
-6
utils.hpp
native/jni/utils/include/utils.hpp
+6
-0
logging.cpp
native/jni/utils/logging.cpp
+1
-1
misc.cpp
native/jni/utils/misc.cpp
+2
-2
misc.hpp
native/jni/utils/misc.hpp
+0
-0
missing.cpp
native/jni/utils/missing.cpp
+1
-1
missing.hpp
native/jni/utils/missing.hpp
+0
-0
selinux.cpp
native/jni/utils/selinux.cpp
+3
-3
stream.cpp
native/jni/utils/stream.cpp
+3
-3
xwrap.cpp
native/jni/utils/xwrap.cpp
+2
-2
xwrap.hpp
native/jni/utils/xwrap.hpp
+0
-0
No files found.
.gitattributes
View file @
a0998009
...
@@ -18,3 +18,7 @@ tools/** binary
...
@@ -18,3 +18,7 @@ tools/** binary
*.png binary
*.png binary
*.jpg binary
*.jpg binary
*.ttf binary
*.ttf binary
# Help GitHub detect languages
native/jni/external/** linguist-vendored
native/jni/systemproperties/** linguist-language=C++
native/jni/Android.mk
View file @
a0998009
...
@@ -45,8 +45,6 @@ LOCAL_SRC_FILES := \
...
@@ -45,8 +45,6 @@ LOCAL_SRC_FILES := \
magiskhide/hide_policy.cpp \
magiskhide/hide_policy.cpp \
resetprop/persist_properties.cpp \
resetprop/persist_properties.cpp \
resetprop/resetprop.cpp \
resetprop/resetprop.cpp \
resetprop/system_property_api.cpp \
resetprop/system_property_set.cpp \
su/su.cpp \
su/su.cpp \
su/connect.cpp \
su/connect.cpp \
su/pts.cpp \
su/pts.cpp \
...
@@ -167,8 +165,6 @@ LOCAL_SRC_FILES := \
...
@@ -167,8 +165,6 @@ LOCAL_SRC_FILES := \
core/applet_stub.cpp \
core/applet_stub.cpp \
resetprop/persist_properties.cpp \
resetprop/persist_properties.cpp \
resetprop/resetprop.cpp \
resetprop/resetprop.cpp \
resetprop/system_property_api.cpp \
resetprop/system_property_set.cpp
LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=resetprop_main
LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=resetprop_main
LOCAL_LDFLAGS := -static
LOCAL_LDFLAGS := -static
...
...
native/jni/core/applet_stub.cpp
View file @
a0998009
#include <sys/stat.h>
#include <sys/stat.h>
#include <magisk.h>
#include <magisk.h
pp
>
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
umask
(
0
);
umask
(
0
);
...
...
native/jni/core/applets.cpp
View file @
a0998009
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <magisk.h>
#include <magisk.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
using
namespace
std
::
literals
;
using
namespace
std
::
literals
;
...
...
native/jni/core/bootstages.cpp
View file @
a0998009
...
@@ -9,12 +9,12 @@
...
@@ -9,12 +9,12 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
#include <magisk.h>
#include <magisk.h
pp
>
#include <db.h>
#include <db.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <daemon.h>
#include <daemon.h
pp
>
#include <resetprop.h>
#include <resetprop.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include <flags.h>
#include <flags.h>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/core/daemon.cpp
View file @
a0998009
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/mount.h>
#include <magisk.h>
#include <magisk.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <daemon.h>
#include <daemon.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include <db.h>
#include <db.h
pp
>
#include <resetprop.h>
#include <resetprop.h
pp
>
#include <flags.h>
#include <flags.h>
int
SDK_INT
=
-
1
;
int
SDK_INT
=
-
1
;
...
...
native/jni/core/db.cpp
View file @
a0998009
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
#include <dlfcn.h>
#include <dlfcn.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <magisk.h>
#include <magisk.h
pp
>
#include <db.h>
#include <db.h
pp
>
#include <daemon.h>
#include <daemon.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#define DB_VERSION 10
#define DB_VERSION 10
...
...
native/jni/core/magisk.cpp
View file @
a0998009
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
#include <libgen.h>
#include <libgen.h>
#include <string.h>
#include <string.h>
#include <utils.h>
#include <utils.h
pp
>
#include <magisk.h>
#include <magisk.h
pp
>
#include <daemon.h>
#include <daemon.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include <flags.h>
#include <flags.h>
using
namespace
std
::
literals
;
using
namespace
std
::
literals
;
...
...
native/jni/core/scripting.cpp
View file @
a0998009
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
#include <string>
#include <string>
#include <vector>
#include <vector>
#include <magisk.h>
#include <magisk.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/core/socket.cpp
View file @
a0998009
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
#include <fcntl.h>
#include <fcntl.h>
#include <endian.h>
#include <endian.h>
#include <daemon.h>
#include <daemon.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#define ABS_SOCKET_LEN(sun) (sizeof(sa_family_t) + strlen(sun->sun_path + 1) + 1)
#define ABS_SOCKET_LEN(sun) (sizeof(sa_family_t) + strlen(sun->sun_path + 1) + 1)
...
...
native/jni/include/daemon.h
→
native/jni/include/daemon.h
pp
View file @
a0998009
File moved
native/jni/include/db.h
→
native/jni/include/db.h
pp
View file @
a0998009
File moved
native/jni/include/magisk.h
→
native/jni/include/magisk.h
pp
View file @
a0998009
#pragma once
#pragma once
#include <logging.h>
#include <logging.h
pp
>
#define MAIN_SOCKET "d30138f2310a9fb9c54a3e0c21f58591"
#define MAIN_SOCKET "d30138f2310a9fb9c54a3e0c21f58591"
#define JAVA_PACKAGE_NAME "com.topjohnwu.magisk"
#define JAVA_PACKAGE_NAME "com.topjohnwu.magisk"
...
...
native/jni/include/magiskpolicy.h
→
native/jni/include/magiskpolicy.h
pp
View file @
a0998009
#pragma once
#pragma once
#include <stdlib.h>
#include <stdlib.h>
#include <selinux.h>
#include <selinux.h
pp
>
#define ALL NULL
#define ALL NULL
...
...
native/jni/include/resetprop.h
→
native/jni/include/resetprop.h
pp
View file @
a0998009
File moved
native/jni/init/getinfo.cpp
View file @
a0998009
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
#include <fcntl.h>
#include <fcntl.h>
#include <vector>
#include <vector>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include "init.h"
#include "init.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/init/init.cpp
View file @
a0998009
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
#include <vector>
#include <vector>
#include <xz.h>
#include <xz.h>
#include <magisk.h>
#include <magisk.h
pp
>
#include <cpio.h>
#include <cpio.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <flags.h>
#include <flags.h>
#include "binaries.h"
#include "binaries.h"
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include "binaries_arch.h"
#include "binaries_arch.h"
#endif
#endif
#include "init.h"
#include "init.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/init/init.h
→
native/jni/init/init.h
pp
View file @
a0998009
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <vector>
#include <vector>
#include <magisk.h>
#include <magisk.h
pp
>
struct
cmdline
{
struct
cmdline
{
bool
skip_initramfs
;
bool
skip_initramfs
;
...
...
native/jni/init/magiskrc.
h
→
native/jni/init/magiskrc.
inc
View file @
a0998009
#include <magisk.h>
#include <magisk.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
constexpr
char
magiskrc
[]
=
constexpr
char
magiskrc
[]
=
"
\n
"
"
\n
"
...
...
native/jni/init/mount.cpp
View file @
a0998009
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
#include <stdio.h>
#include <stdio.h>
#include <vector>
#include <vector>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include <magisk.h>
#include <magisk.h
pp
>
#include "init.h"
#include "init.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/init/rootdir.cpp
View file @
a0998009
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
#include <fcntl.h>
#include <fcntl.h>
#include <vector>
#include <vector>
#include <magisk.h>
#include <magisk.h
pp
>
#include <magiskpolicy.h>
#include <magiskpolicy.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include "init.h"
#include "init.h
pp
"
#include "magiskrc.
h
"
#include "magiskrc.
inc
"
#ifdef USE_64BIT
#ifdef USE_64BIT
#define LIBNAME "lib64"
#define LIBNAME "lib64"
...
...
native/jni/magiskboot/bootimg.cpp
View file @
a0998009
...
@@ -9,12 +9,12 @@
...
@@ -9,12 +9,12 @@
#include <mincrypt/sha.h>
#include <mincrypt/sha.h>
#include <mincrypt/sha256.h>
#include <mincrypt/sha256.h>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include "bootimg.h"
#include "bootimg.h
pp
"
#include "magiskboot.h"
#include "magiskboot.h
pp
"
#include "compress.h"
#include "compress.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskboot/bootimg.h
→
native/jni/magiskboot/bootimg.h
pp
View file @
a0998009
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <stdint.h>
#include <stdint.h>
#include <utility>
#include <utility>
#include "format.h"
#include "format.h
pp
"
/****************
/****************
* Other Headers
* Other Headers
...
...
native/jni/magiskboot/compress.cpp
View file @
a0998009
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
#include <lz4frame.h>
#include <lz4frame.h>
#include <lz4hc.h>
#include <lz4hc.h>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include "magiskboot.h"
#include "magiskboot.h
pp
"
#include "compress.h"
#include "compress.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskboot/compress.h
→
native/jni/magiskboot/compress.h
pp
View file @
a0998009
#pragma once
#pragma once
#include <stream.h>
#include <stream.h
pp
>
#include "format.h"
#include "format.h
pp
"
stream_ptr
get_encoder
(
format_t
type
,
stream_ptr
&&
base
);
stream_ptr
get_encoder
(
format_t
type
,
stream_ptr
&&
base
);
...
...
native/jni/magiskboot/dtb.cpp
View file @
a0998009
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
extern
"C"
{
extern
"C"
{
#include <libfdt.h>
#include <libfdt.h>
}
}
#include <utils.h>
#include <utils.h
pp
>
#include "magiskboot.h"
#include "magiskboot.h
pp
"
#include "dtb.h"
#include "dtb.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskboot/dtb.h
→
native/jni/magiskboot/dtb.h
pp
View file @
a0998009
File moved
native/jni/magiskboot/format.cpp
View file @
a0998009
#include <string.h>
#include <string.h>
#include "format.h"
#include "format.h
pp
"
std
::
map
<
std
::
string_view
,
format_t
>
name2fmt
;
std
::
map
<
std
::
string_view
,
format_t
>
name2fmt
;
Fmt2Name
fmt2name
;
Fmt2Name
fmt2name
;
...
...
native/jni/magiskboot/format.h
→
native/jni/magiskboot/format.h
pp
View file @
a0998009
File moved
native/jni/magiskboot/hexpatch.cpp
View file @
a0998009
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
#include <string.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/mman.h>
#include <utils.h>
#include <utils.h
pp
>
#include "magiskboot.h"
#include "magiskboot.h
pp
"
static
void
hex2byte
(
uint8_t
*
hex
,
uint8_t
*
str
)
{
static
void
hex2byte
(
uint8_t
*
hex
,
uint8_t
*
str
)
{
char
high
,
low
;
char
high
,
low
;
...
...
native/jni/magiskboot/magiskboot.h
→
native/jni/magiskboot/magiskboot.h
pp
View file @
a0998009
File moved
native/jni/magiskboot/main.cpp
View file @
a0998009
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
#include <sys/mman.h>
#include <sys/mman.h>
#include <mincrypt/sha.h>
#include <mincrypt/sha.h>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <flags.h>
#include <flags.h>
#include "magiskboot.h"
#include "magiskboot.h
pp
"
#include "compress.h"
#include "compress.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskboot/pattern.cpp
View file @
a0998009
#include <malloc.h>
#include <malloc.h>
#include <string.h>
#include <string.h>
#include <utils.h>
#include <utils.h
pp
>
#include "magiskboot.h"
#include "magiskboot.h
pp
"
#define MATCH(p) else if (strncmp(s + skip, p, sizeof(p) - 1) == 0) skip += (sizeof(p) - 1)
#define MATCH(p) else if (strncmp(s + skip, p, sizeof(p) - 1) == 0) skip += (sizeof(p) - 1)
...
...
native/jni/magiskboot/ramdisk.cpp
View file @
a0998009
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
#include <stdlib.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <utils.h>
#include <utils.h
pp
>
#include <cpio.h>
#include <cpio.h
pp
>
#include "magiskboot.h"
#include "magiskboot.h
pp
"
#include "compress.h"
#include "compress.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskhide/hide_policy.cpp
View file @
a0998009
#include <sys/mount.h>
#include <sys/mount.h>
#include <magisk.h>
#include <magisk.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include <resetprop.h>
#include <resetprop.h
pp
>
#include "magiskhide.h"
#include "magiskhide.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskhide/hide_utils.cpp
View file @
a0998009
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
#include <dirent.h>
#include <dirent.h>
#include <string.h>
#include <string.h>
#include <magisk.h>
#include <magisk.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <db.h>
#include <db.h
pp
>
#include "magiskhide.h"
#include "magiskhide.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskhide/magiskhide.cpp
View file @
a0998009
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/mount.h>
#include <daemon.h>
#include <daemon.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <flags.h>
#include <flags.h>
#include "magiskhide.h"
#include "magiskhide.h
pp
"
using
namespace
std
::
literals
;
using
namespace
std
::
literals
;
...
...
native/jni/magiskhide/magiskhide.h
→
native/jni/magiskhide/magiskhide.h
pp
View file @
a0998009
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include <map>
#include <map>
#include <set>
#include <set>
#include <daemon.h>
#include <daemon.h
pp
>
#define SIGTERMTHRD SIGUSR1
#define SIGTERMTHRD SIGUSR1
#define SIGZYGOTE SIGUSR2
#define SIGZYGOTE SIGUSR2
...
...
native/jni/magiskhide/proc_monitor.cpp
View file @
a0998009
...
@@ -13,10 +13,10 @@
...
@@ -13,10 +13,10 @@
#include <vector>
#include <vector>
#include <bitset>
#include <bitset>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include "magiskhide.h"
#include "magiskhide.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/magiskpolicy/api.cpp
View file @
a0998009
#include <magiskpolicy.h>
#include <magiskpolicy.h
pp
>
#include "sepolicy.h"
#include "sepolicy.h"
...
...
native/jni/magiskpolicy/magiskpolicy.cpp
View file @
a0998009
#include <stdio.h>
#include <stdio.h>
#include <limits.h>
#include <limits.h>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <flags.h>
#include <flags.h>
#include <magiskpolicy.h>
#include <magiskpolicy.h
pp
>
#include "sepolicy.h"
#include "sepolicy.h"
...
...
native/jni/magiskpolicy/policydb.cpp
View file @
a0998009
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
#include <cil/cil.h>
#include <cil/cil.h>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include <stream.h>
#include <stream.h
pp
>
#include <magiskpolicy.h>
#include <magiskpolicy.h
pp
>
#include "sepolicy.h"
#include "sepolicy.h"
...
...
native/jni/magiskpolicy/rules.cpp
View file @
a0998009
#include <logging.h>
#include <logging.h
pp
>
#include <flags.h>
#include <flags.h>
#include <magiskpolicy.h>
#include <magiskpolicy.h
pp
>
#include "sepolicy.h"
#include "sepolicy.h"
...
...
native/jni/magiskpolicy/sepolicy.c
View file @
a0998009
#include <stdlib.h>
#include <stdlib.h>
#include <sepol/policydb/expand.h>
#include <sepol/policydb/expand.h>
#include <logging.h>
#include <logging.h
pp
>
#include "sepolicy.h"
#include "sepolicy.h"
...
...
native/jni/magiskpolicy/statement.cpp
View file @
a0998009
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
#include <magiskpolicy.h>
#include <magiskpolicy.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/resetprop/
private/resetprop.h
→
native/jni/resetprop/
_resetprop.hpp
View file @
a0998009
#pragma once
#pragma once
#include <string>
#include <string>
#include <logging.h>
#include <logging.h
pp
>
#include
"system_properties.h"
#include
<system_properties.h>
struct
prop_t
{
struct
prop_t
{
char
*
name
;
char
*
name
;
...
...
native/jni/resetprop/persist_properties.cpp
View file @
a0998009
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
#include <pb.h>
#include <pb.h>
#include <pb_decode.h>
#include <pb_decode.h>
#include <pb_encode.h>
#include <pb_encode.h>
#include <utils.h>
#include <utils.h
pp
>
#include "
private/resetprop.h
"
#include "
_resetprop.hpp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/resetprop/private/bionic_macros.h
deleted
100644 → 0
View file @
d6fdbfe9
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _BIONIC_MACROS_H_
#define _BIONIC_MACROS_H_
#include <stdint.h>
// Frameworks OpenGL code currently leaks this header and allows
// collisions with other declarations, e.g., from libnativehelper.
// TODO: Remove once cleaned up. b/18334516
#if !defined(DISALLOW_COPY_AND_ASSIGN)
// DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions.
// It goes in the private: declarations in a class.
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
void operator=(const TypeName&) = delete
#endif // !defined(DISALLOW_COPY_AND_ASSIGN)
// A macro to disallow all the implicit constructors, namely the
// default constructor, copy constructor and operator= functions.
//
// This should be used in the private: declarations for a class
// that wants to prevent anyone from instantiating it. This is
// especially useful for classes containing only static methods.
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
TypeName() = delete; \
DISALLOW_COPY_AND_ASSIGN(TypeName)
#define BIONIC_ROUND_UP_POWER_OF_2(value) \
((sizeof(value) == 8) \
? (1UL << (64 - __builtin_clzl(static_cast<unsigned long>(value)))) \
: (1UL << (32 - __builtin_clz(static_cast<unsigned int>(value)))))
static
constexpr
uintptr_t
align_down
(
uintptr_t
p
,
size_t
align
)
{
return
p
&
~
(
align
-
1
);
}
static
constexpr
uintptr_t
align_up
(
uintptr_t
p
,
size_t
align
)
{
return
(
p
+
align
-
1
)
&
~
(
align
-
1
);
}
template
<
typename
T
>
static
inline
T
*
align_down
(
T
*
p
,
size_t
align
)
{
return
reinterpret_cast
<
T
*>
(
align_down
(
reinterpret_cast
<
uintptr_t
>
(
p
),
align
));
}
template
<
typename
T
>
static
inline
T
*
align_up
(
T
*
p
,
size_t
align
)
{
return
reinterpret_cast
<
T
*>
(
align_up
(
reinterpret_cast
<
uintptr_t
>
(
p
),
align
));
}
#if defined(__arm__)
// Do not emit anything for arm, clang does not allow emiting an arm unwind
// directive.
// #define BIONIC_STOP_UNWIND asm volatile(".cantunwind")
#define BIONIC_STOP_UNWIND
#elif defined(__aarch64__)
#define BIONIC_STOP_UNWIND asm volatile(".cfi_undefined x30")
#elif defined(__i386__)
#define BIONIC_STOP_UNWIND asm volatile(".cfi_undefined \%eip")
#elif defined(__x86_64__)
#define BIONIC_STOP_UNWIND asm volatile(".cfi_undefined \%rip")
#elif defined (__mips__)
#define BIONIC_STOP_UNWIND asm volatile(".cfi_undefined $ra")
#endif
// The arraysize(arr) macro returns the # of elements in an array arr.
// The expression is a compile-time constant, and therefore can be
// used in defining new arrays, for example. If you use arraysize on
// a pointer by mistake, you will get a compile-time error.
//
// One caveat is that arraysize() doesn't accept any array of an
// anonymous type or a type defined inside a function.
//
// This template function declaration is used in defining arraysize.
// Note that the function doesn't need an implementation, as we only
// use its type.
template
<
typename
T
,
size_t
N
>
char
(
&
ArraySizeHelper
(
T
(
&
array
)[
N
]))[
N
];
// NOLINT(readability/casting)
#define arraysize(array) (sizeof(ArraySizeHelper(array)))
// Used to inform clang's -Wimplicit-fallthrough that a fallthrough is intended. There's no way to
// silence (or enable, apparently) -Wimplicit-fallthrough in C yet.
#ifdef __cplusplus
#define __BIONIC_FALLTHROUGH [[clang::fallthrough]]
#else
#define __BIONIC_FALLTHROUGH
#endif
#endif // _BIONIC_MACROS_H_
native/jni/resetprop/private/redefs.h
deleted
100644 → 0
View file @
d6fdbfe9
#ifndef REDEFS_H
#define REDEFS_H
#define __system_property_set _system_property_set2
#define __system_property_find _system_property_find2
#define __system_property_read_callback _system_property_read_callback2
#define __system_property_foreach __system_property_foreach2
#define __system_property_wait __system_property_wait2
#define __system_property_read __system_property_read2
#define __system_property_get __system_property_get2
#define __system_property_find_nth __system_property_find_nth2
#define __system_property_set_filename __system_property_set_filename2
#define __system_property_area_init __system_property_area_init2
#define __system_property_area_serial __system_property_area_serial2
#define __system_property_add __system_property_add2
#define __system_property_update __system_property_update2
#define __system_property_serial __system_property_serial2
#define __system_properties_init __system_properties_init2
#define __system_property_wait_any __system_property_wait_any2
#endif //REDEFS_H
native/jni/resetprop/resetprop.cpp
View file @
a0998009
...
@@ -9,15 +9,15 @@
...
@@ -9,15 +9,15 @@
#include <vector>
#include <vector>
#include <algorithm>
#include <algorithm>
#include <logging.h>
#include <logging.h
pp
>
#include <resetprop.h>
#include <resetprop.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <flags.h>
#include <flags.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include
"private/_system_properties.h"
#include
<_system_properties.h>
#include "private/system_properties.h"
#include "
private/resetprop.h
"
#include "
_resetprop.hpp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/su/connect.cpp
View file @
a0998009
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
#include <fcntl.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdio.h>
#include <daemon.h>
#include <daemon.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include "su.h"
#include "su.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/su/pts.cpp
View file @
a0998009
...
@@ -17,9 +17,9 @@
...
@@ -17,9 +17,9 @@
#include <errno.h>
#include <errno.h>
#include <pthread.h>
#include <pthread.h>
#include <logging.h>
#include <logging.h
pp
>
#include "pts.h"
#include "pts.h
pp
"
/**
/**
* Helper functions
* Helper functions
...
...
native/jni/su/pts.h
→
native/jni/su/pts.h
pp
View file @
a0998009
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*/
*/
/*
/*
* pts.h
* pts.h
pp
*
*
* Manages the pseudo-terminal driver on Linux/Android and provides some
* Manages the pseudo-terminal driver on Linux/Android and provides some
* helper functions to handle raw input mode and terminal window resizing
* helper functions to handle raw input mode and terminal window resizing
...
...
native/jni/su/su.cpp
View file @
a0998009
...
@@ -21,12 +21,12 @@
...
@@ -21,12 +21,12 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <daemon.h>
#include <daemon.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <flags.h>
#include <flags.h>
#include "su.h"
#include "su.h
pp
"
#include "pts.h"
#include "pts.h
pp
"
int
quit_signals
[]
=
{
SIGALRM
,
SIGABRT
,
SIGHUP
,
SIGPIPE
,
SIGQUIT
,
SIGTERM
,
SIGINT
,
0
};
int
quit_signals
[]
=
{
SIGALRM
,
SIGABRT
,
SIGHUP
,
SIGPIPE
,
SIGQUIT
,
SIGTERM
,
SIGINT
,
0
};
...
...
native/jni/su/su.h
→
native/jni/su/su.h
pp
View file @
a0998009
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
#include <sys/stat.h>
#include <sys/stat.h>
#include <memory>
#include <memory>
#include <db.h>
#include <db.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#define DEFAULT_SHELL "/system/bin/sh"
#define DEFAULT_SHELL "/system/bin/sh"
...
...
native/jni/su/su_daemon.cpp
View file @
a0998009
...
@@ -12,13 +12,13 @@
...
@@ -12,13 +12,13 @@
#include <sys/wait.h>
#include <sys/wait.h>
#include <sys/mount.h>
#include <sys/mount.h>
#include <logging.h>
#include <logging.h
pp
>
#include <daemon.h>
#include <daemon.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
#include "su.h"
#include "su.h
pp
"
#include "pts.h"
#include "pts.h
pp
"
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/systemproperties/Android.mk
View file @
a0998009
...
@@ -10,6 +10,8 @@ LOCAL_SRC_FILES := \
...
@@ -10,6 +10,8 @@ LOCAL_SRC_FILES := \
prop_area.cpp \
prop_area.cpp \
prop_info.cpp \
prop_info.cpp \
system_properties.cpp \
system_properties.cpp \
system_property_api.cpp \
system_property_set.cpp \
property_info_parser.cpp
property_info_parser.cpp
include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
native/jni/
resetprop/privat
e/_system_properties.h
→
native/jni/
systemproperties/includ
e/_system_properties.h
View file @
a0998009
File moved
native/jni/systemproperties/include/hacks.h
deleted
100644 → 0
View file @
d6fdbfe9
#pragma once
#include <stdio.h>
#include <syscall.h>
#ifndef PR_SET_VMA
#define PR_SET_VMA 0x53564d41
#endif
#ifndef PR_SET_VMA_ANON_NAME
#define PR_SET_VMA_ANON_NAME 0
#endif
#define getline __getline
#define fsetxattr(...) syscall(__NR_fsetxattr, __VA_ARGS__)
ssize_t
__getline
(
char
**
,
size_t
*
,
FILE
*
);
native/jni/
resetprop
/private/bionic_defs.h
→
native/jni/
systemproperties/include
/private/bionic_defs.h
View file @
a0998009
File moved
native/jni/systemproperties/include/private/hacks.h
0 → 100644
View file @
a0998009
#pragma once
#include <stdio.h>
#include <syscall.h>
// Missing defines
#ifndef PR_SET_VMA
#define PR_SET_VMA 0x53564d41
#endif
#ifndef PR_SET_VMA_ANON_NAME
#define PR_SET_VMA_ANON_NAME 0
#endif
// Missing functions
#define fsetxattr(...) syscall(__NR_fsetxattr, __VA_ARGS__)
#define getline __getline
ssize_t
__getline
(
char
**
,
size_t
*
,
FILE
*
);
// Rename symbols
#pragma redefine_extname __system_property_set _system_property_set2
#pragma redefine_extname __system_property_find _system_property_find2
#pragma redefine_extname __system_property_read_callback _system_property_read_callback2
#pragma redefine_extname __system_property_foreach __system_property_foreach2
#pragma redefine_extname __system_property_wait __system_property_wait2
#pragma redefine_extname __system_property_read __system_property_read2
#pragma redefine_extname __system_property_get __system_property_get2
#pragma redefine_extname __system_property_find_nth __system_property_find_nth2
#pragma redefine_extname __system_property_set_filename __system_property_set_filename2
#pragma redefine_extname __system_property_area_init __system_property_area_init2
#pragma redefine_extname __system_property_area_serial __system_property_area_serial2
#pragma redefine_extname __system_property_add __system_property_add2
#pragma redefine_extname __system_property_update __system_property_update2
#pragma redefine_extname __system_property_serial __system_property_serial2
#pragma redefine_extname __system_properties_init __system_properties_init2
#pragma redefine_extname __system_property_wait_any __system_property_wait_any2
native/jni/
resetprop/privat
e/system_properties.h
→
native/jni/
systemproperties/includ
e/system_properties.h
View file @
a0998009
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
#include <stdbool.h>
#include <stdbool.h>
#include <stddef.h>
#include <stddef.h>
#include <stdint.h>
#include <stdint.h>
#include "redefs.h"
#include "private/hacks.h"
__BEGIN_DECLS
__BEGIN_DECLS
...
...
native/jni/systemproperties/include/system_properties/prop_info.h
View file @
a0998009
...
@@ -30,10 +30,10 @@
...
@@ -30,10 +30,10 @@
#include <stdatomic.h>
#include <stdatomic.h>
#include <stdint.h>
#include <stdint.h>
#include <sys/system_properties.h>
//#include <sys/system_properties.h>
#include "../system_properties.h"
#include "private/bionic_macros.h"
#include "private/bionic_macros.h"
#include "hacks.h"
// The C11 standard doesn't allow atomic loads from const fields,
// The C11 standard doesn't allow atomic loads from const fields,
// though C++11 does. Fudge it until standards get straightened out.
// though C++11 does. Fudge it until standards get straightened out.
...
...
native/jni/systemproperties/include/system_properties/system_properties.h
View file @
a0998009
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
#include <stdint.h>
#include <stdint.h>
#include <sys/param.h>
#include <sys/param.h>
#include <sys/system_properties.h>
//#include <sys/system_properties.h>
#include "../system_properties.h"
#include "contexts.h"
#include "contexts.h"
#include "contexts_pre_split.h"
#include "contexts_pre_split.h"
...
...
native/jni/
resetprop
/system_property_api.cpp
→
native/jni/
systemproperties
/system_property_api.cpp
View file @
a0998009
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
//#include <sys/_system_properties.h>
//#include <sys/_system_properties.h>
#include
"private/_system_properties.h"
#include
<_system_properties.h>
#include <system_properties/prop_area.h>
#include <system_properties/prop_area.h>
#include <system_properties/system_properties.h>
#include <system_properties/system_properties.h>
...
...
native/jni/
resetprop
/system_property_set.cpp
→
native/jni/
systemproperties
/system_property_set.cpp
View file @
a0998009
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
#include <sys/un.h>
#include <sys/un.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
//#include <sys/_system_properties.h>
//#include <sys/_system_properties.h>
#include
"private/_system_properties.h"
#include
<_system_properties.h>
#include <unistd.h>
#include <unistd.h>
#include <async_safe/log.h>
#include <async_safe/log.h>
...
@@ -173,7 +173,7 @@ class SocketWriter {
...
@@ -173,7 +173,7 @@ class SocketWriter {
uint32_t
uint_buf_
[
kUintBufSize
];
uint32_t
uint_buf_
[
kUintBufSize
];
size_t
uint_buf_index_
;
size_t
uint_buf_index_
;
DISALLOW_IMPLICIT_CONSTRUCTORS
(
SocketWriter
);
BIONIC_
DISALLOW_IMPLICIT_CONSTRUCTORS
(
SocketWriter
);
};
};
struct
prop_msg
{
struct
prop_msg
{
...
...
native/jni/utils/cpio.cpp
View file @
a0998009
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
#include <stdlib.h>
#include <stdlib.h>
#include <algorithm>
#include <algorithm>
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include <cpio.h>
#include <cpio.h
pp
>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/utils/file.cpp
View file @
a0998009
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
#include <string.h>
#include <string.h>
#include <libgen.h>
#include <libgen.h>
#include <utils.h>
#include <utils.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
using
namespace
std
;
using
namespace
std
;
...
...
native/jni/utils/files.h
→
native/jni/utils/files.h
pp
View file @
a0998009
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include <functional>
#include <functional>
#include <string_view>
#include <string_view>
#include "xwrap.h"
#include "xwrap.h
pp
"
#define do_align(p, a) (((p) + (a) - 1) / (a) * (a))
#define do_align(p, a) (((p) + (a) - 1) / (a) * (a))
#define align_off(p, a) (do_align(p, a) - (p))
#define align_off(p, a) (do_align(p, a) - (p))
...
...
native/jni/utils/include/blocking_queue.h
→
native/jni/utils/include/blocking_queue.h
pp
View file @
a0998009
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <pthread.h>
#include <pthread.h>
#include <deque>
#include <deque>
#include <
misc.h
>
#include <
../misc.hpp
>
template
<
typename
T
>
template
<
typename
T
>
class
blocking_queue
{
class
blocking_queue
{
...
...
native/jni/utils/include/cpio.h
→
native/jni/utils/include/cpio.h
pp
View file @
a0998009
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include <map>
#include <map>
#include <string_view>
#include <string_view>
#include <stream.h>
#include <stream.h
pp
>
struct
cpio_newc_header
;
struct
cpio_newc_header
;
...
...
native/jni/utils/include/logging.h
→
native/jni/utils/include/logging.h
pp
View file @
a0998009
File moved
native/jni/utils/include/selinux.h
→
native/jni/utils/include/selinux.h
pp
View file @
a0998009
File moved
native/jni/utils/include/stream.h
→
native/jni/utils/include/stream.h
pp
View file @
a0998009
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <stdio.h>
#include <memory>
#include <memory>
#include "../files.h"
#include "../files.h
pp
"
class
stream
{
class
stream
{
public
:
public
:
...
...
native/jni/utils/include/utils.h
deleted
100644 → 0
View file @
d6fdbfe9
#pragma once
#include "../missing.h"
#include "../xwrap.h"
#include "../files.h"
#include "../misc.h"
native/jni/utils/include/utils.hpp
0 → 100644
View file @
a0998009
#pragma once
#include "../missing.hpp"
#include "../xwrap.hpp"
#include "../files.hpp"
#include "../misc.hpp"
native/jni/utils/logging.cpp
View file @
a0998009
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <android/log.h>
#include <android/log.h>
#include <logging.h>
#include <logging.h
pp
>
#include <flags.h>
#include <flags.h>
int
nop_log
(
const
char
*
fmt
,
va_list
ap
)
{
int
nop_log
(
const
char
*
fmt
,
va_list
ap
)
{
...
...
native/jni/utils/misc.cpp
View file @
a0998009
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
#include <syscall.h>
#include <syscall.h>
#include <random>
#include <random>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
int
fork_dont_care
()
{
int
fork_dont_care
()
{
int
pid
=
xfork
();
int
pid
=
xfork
();
...
...
native/jni/utils/misc.h
→
native/jni/utils/misc.h
pp
View file @
a0998009
File moved
native/jni/utils/missing.cpp
View file @
a0998009
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include <errno.h>
#include <errno.h>
#include <mntent.h>
#include <mntent.h>
#include "missing.h"
#include "missing.h
pp
"
/* Original source: https://opensource.apple.com/source/cvs/cvs-19/cvs/lib/getline.c
/* Original source: https://opensource.apple.com/source/cvs/cvs-19/cvs/lib/getline.c
* License: GPL 2 or later
* License: GPL 2 or later
...
...
native/jni/utils/missing.h
→
native/jni/utils/missing.h
pp
View file @
a0998009
File moved
native/jni/utils/selinux.cpp
View file @
a0998009
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
#include <syscall.h>
#include <syscall.h>
#include <string_view>
#include <string_view>
#include <magisk.h>
#include <magisk.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
#include <selinux.h>
#include <selinux.h
pp
>
using
namespace
std
::
literals
;
using
namespace
std
::
literals
;
...
...
native/jni/utils/stream.cpp
View file @
a0998009
#include <utils.h>
#include <utils.h
pp
>
#include <logging.h>
#include <logging.h
pp
>
#include <stream.h>
#include <stream.h
pp
>
static
int
strm_read
(
void
*
v
,
char
*
buf
,
int
len
)
{
static
int
strm_read
(
void
*
v
,
char
*
buf
,
int
len
)
{
auto
strm
=
reinterpret_cast
<
stream
*>
(
v
);
auto
strm
=
reinterpret_cast
<
stream
*>
(
v
);
...
...
native/jni/utils/xwrap.cpp
View file @
a0998009
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
#include <sys/mman.h>
#include <sys/mman.h>
#include <sys/sendfile.h>
#include <sys/sendfile.h>
#include <logging.h>
#include <logging.h
pp
>
#include <utils.h>
#include <utils.h
pp
>
FILE
*
xfopen
(
const
char
*
pathname
,
const
char
*
mode
)
{
FILE
*
xfopen
(
const
char
*
pathname
,
const
char
*
mode
)
{
FILE
*
fp
=
fopen
(
pathname
,
mode
);
FILE
*
fp
=
fopen
(
pathname
,
mode
);
...
...
native/jni/utils/xwrap.h
→
native/jni/utils/xwrap.h
pp
View file @
a0998009
File moved
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