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
c826318d
Commit
c826318d
authored
Jan 20, 2022
by
John Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CLI usage text
parent
6582a4ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
magiskpolicy.cpp
native/jni/magiskpolicy/magiskpolicy.cpp
+11
-12
No files found.
native/jni/magiskpolicy/magiskpolicy.cpp
View file @
c826318d
...
@@ -4,30 +4,29 @@
...
@@ -4,30 +4,29 @@
#include "sepolicy.hpp"
#include "sepolicy.hpp"
using
namespace
std
::
literals
;
using
namespace
std
;
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
R"EOF(MagiskPolicy - S
ep
olicy Patch Tool
R"EOF(MagiskPolicy - S
ELinux P
olicy Patch Tool
Usage: %s [--options...] [policy statements...]
Usage: %s [--options...] [policy statements...]
Options:
Options:
--help show help message for policy statements
--help show help message for policy statements
--load FILE load
policies
from FILE
--load FILE load
monolithic sepolicy
from FILE
--load-split load from precompiled sepolicy or compile
--load-split load from precompiled sepolicy or compile
split policies
split
cil
policies
--compile-split compile split cil policies
--compile-split compile split cil policies
--save FILE save policies to FILE
--save FILE dump monolithic sepolicy to FILE
--live directly apply sepolicy live
--live immediately load sepolicy into the kernel
--magisk inject built-in rules for a minimal
--magisk apply built-in Magisk sepolicy rules
Magisk selinux environment
--apply FILE apply rules from FILE, read and parsed
--apply FILE apply rules from FILE, read and parsed
line by line as policy statements
line by line as policy statements
(multiple --apply a
llows
)
(multiple --apply a
re allowed
)
If neither --load
or --compile-split is specified, it will load
If neither --load
, --load-split, nor --compile-split is specified,
from current live policies (/sys/fs/selinux/policy)
it will load
from current live policies (/sys/fs/selinux/policy)
)EOF"
,
arg0
);
)EOF"
,
arg0
);
exit
(
1
);
exit
(
1
);
...
@@ -36,7 +35,7 @@ from current live policies (/sys/fs/selinux/policy)
...
@@ -36,7 +35,7 @@ from current live policies (/sys/fs/selinux/policy)
int
magiskpolicy_main
(
int
argc
,
char
*
argv
[])
{
int
magiskpolicy_main
(
int
argc
,
char
*
argv
[])
{
cmdline_logging
();
cmdline_logging
();
const
char
*
out_file
=
nullptr
;
const
char
*
out_file
=
nullptr
;
std
::
vector
<
std
::
string_view
>
rule_files
;
vector
<
string_view
>
rule_files
;
sepolicy
*
sepol
=
nullptr
;
sepolicy
*
sepol
=
nullptr
;
bool
magisk
=
false
;
bool
magisk
=
false
;
bool
live
=
false
;
bool
live
=
false
;
...
...
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