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
b13a3505
Commit
b13a3505
authored
Jan 20, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support building standalone resetprop
parent
c3e77b1e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
26 deletions
+53
-26
build.py
build.py
+4
-1
Android.mk
native/jni/Android.mk
+49
-25
No files found.
build.py
View file @
b13a3505
...
@@ -56,7 +56,7 @@ cpu_count = multiprocessing.cpu_count()
...
@@ -56,7 +56,7 @@ cpu_count = multiprocessing.cpu_count()
gradlew
=
os
.
path
.
join
(
'.'
,
'gradlew'
+
(
'.bat'
if
is_windows
else
''
))
gradlew
=
os
.
path
.
join
(
'.'
,
'gradlew'
+
(
'.bat'
if
is_windows
else
''
))
archs
=
[
'armeabi-v7a'
,
'x86'
]
archs
=
[
'armeabi-v7a'
,
'x86'
]
arch64
=
[
'arm64-v8a'
,
'x86_64'
]
arch64
=
[
'arm64-v8a'
,
'x86_64'
]
support_targets
=
[
'magisk'
,
'magiskinit'
,
'magiskboot'
,
'magiskpolicy'
,
'busybox'
,
'test'
]
support_targets
=
[
'magisk'
,
'magiskinit'
,
'magiskboot'
,
'magiskpolicy'
,
'
resetprop'
,
'
busybox'
,
'test'
]
default_targets
=
[
'magisk'
,
'magiskinit'
,
'magiskboot'
,
'busybox'
]
default_targets
=
[
'magisk'
,
'magiskinit'
,
'magiskboot'
,
'busybox'
]
build_tools
=
os
.
path
.
join
(
os
.
environ
[
'ANDROID_HOME'
],
'build-tools'
,
'29.0.2'
)
build_tools
=
os
.
path
.
join
(
os
.
environ
[
'ANDROID_HOME'
],
'build-tools'
,
'29.0.2'
)
...
@@ -286,6 +286,9 @@ def build_binary(args):
...
@@ -286,6 +286,9 @@ def build_binary(args):
if
'magiskpolicy'
in
args
.
target
:
if
'magiskpolicy'
in
args
.
target
:
run_ndk_build
(
'B_POLICY=1'
)
run_ndk_build
(
'B_POLICY=1'
)
if
'resetprop'
in
args
.
target
:
run_ndk_build
(
'B_PROP=1'
)
if
'magiskboot'
in
args
.
target
:
if
'magiskboot'
in
args
.
target
:
run_ndk_build
(
'B_BOOT=1'
)
run_ndk_build
(
'B_BOOT=1'
)
...
...
native/jni/Android.mk
View file @
b13a3505
...
@@ -57,31 +57,6 @@ include $(BUILD_EXECUTABLE)
...
@@ -57,31 +57,6 @@ include $(BUILD_EXECUTABLE)
endif
endif
ifdef B_POLICY
include $(CLEAR_VARS)
LOCAL_MODULE := magiskpolicy
LOCAL_STATIC_LIBRARIES := libsepol libutils
LOCAL_C_INCLUDES := \
jni/include \
$(LIBSEPOL) \
$(LIBUTILS)
LOCAL_SRC_FILES := \
core/applet_stub.cpp \
magiskpolicy/api.cpp \
magiskpolicy/magiskpolicy.cpp \
magiskpolicy/rules.cpp \
magiskpolicy/policydb.cpp \
magiskpolicy/statement.cpp \
magiskpolicy/sepolicy.c
LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=magiskpolicy_main
LOCAL_LDFLAGS := -static
include $(BUILD_EXECUTABLE)
endif
include $(CLEAR_VARS)
include $(CLEAR_VARS)
ifdef B_INIT
ifdef B_INIT
...
@@ -152,6 +127,55 @@ include $(BUILD_EXECUTABLE)
...
@@ -152,6 +127,55 @@ include $(BUILD_EXECUTABLE)
endif
endif
ifdef B_POLICY
include $(CLEAR_VARS)
LOCAL_MODULE := magiskpolicy
LOCAL_STATIC_LIBRARIES := libsepol libutils
LOCAL_C_INCLUDES := \
jni/include \
$(LIBSEPOL) \
$(LIBUTILS)
LOCAL_SRC_FILES := \
core/applet_stub.cpp \
magiskpolicy/api.cpp \
magiskpolicy/magiskpolicy.cpp \
magiskpolicy/rules.cpp \
magiskpolicy/policydb.cpp \
magiskpolicy/statement.cpp \
magiskpolicy/sepolicy.c
LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=magiskpolicy_main
LOCAL_LDFLAGS := -static
include $(BUILD_EXECUTABLE)
endif
ifdef B_PROP
include $(CLEAR_VARS)
LOCAL_MODULE := resetprop
LOCAL_STATIC_LIBRARIES := libnanopb libsystemproperties libutils
LOCAL_C_INCLUDES := \
jni/include \
$(LIBNANOPB) \
$(LIBSYSTEMPROPERTIES) \
$(LIBUTILS)
LOCAL_SRC_FILES := \
core/applet_stub.cpp \
resetprop/persist_properties.cpp \
resetprop/resetprop.cpp \
resetprop/system_property_api.cpp \
resetprop/system_property_set.cpp
LOCAL_CFLAGS := -DAPPLET_STUB_MAIN=resetprop_main
LOCAL_LDFLAGS := -static
include $(BUILD_EXECUTABLE)
endif
ifdef B_TEST
ifdef B_TEST
include $(CLEAR_VARS)
include $(CLEAR_VARS)
...
...
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