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
5ce29c30
Commit
5ce29c30
authored
Jan 11, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sepolicy copying
parent
70d67728
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
Const.kt
app/src/main/java/com/topjohnwu/magisk/core/Const.kt
+1
-1
LocalModule.kt
...ava/com/topjohnwu/magisk/core/model/module/LocalModule.kt
+4
-4
changelog.md
app/src/main/res/raw/changelog.md
+4
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Const.kt
View file @
5ce29c30
...
...
@@ -25,6 +25,7 @@ object Const {
fun
atLeast_20_2
()
=
Info
.
env
.
magiskVersionCode
>=
20200
||
isCanary
()
fun
atLeast_20_4
()
=
Info
.
env
.
magiskVersionCode
>=
20400
||
isCanary
()
fun
atLeast_21_0
()
=
Info
.
env
.
magiskVersionCode
>=
21000
||
isCanary
()
fun
atLeast_21_2
()
=
Info
.
env
.
magiskVersionCode
>=
21200
||
isCanary
()
fun
isCanary
()
=
Info
.
env
.
magiskVersionCode
%
100
!=
0
}
...
...
@@ -36,7 +37,6 @@ object Const {
// notifications
const
val
MAGISK_UPDATE_NOTIFICATION_ID
=
4
const
val
APK_UPDATE_NOTIFICATION_ID
=
5
const
val
HIDE_MANAGER_NOTIFICATION_ID
=
8
const
val
UPDATE_NOTIFICATION_CHANNEL
=
"update"
const
val
PROGRESS_NOTIFICATION_CHANNEL
=
"progress"
const
val
CHECK_MAGISK_UPDATE_WORKER_ID
=
"magisk_update"
...
...
app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt
View file @
5ce29c30
...
...
@@ -27,13 +27,13 @@ class LocalModule(path: String) : Module() {
val
dir
=
"$PERSIST/$id"
if
(
enable
)
{
disableFile
.
delete
()
if
(
Const
.
Version
.
isCanary
())
if
(
Const
.
Version
.
atLeast_21_2
())
Shell
.
su
(
"copy_sepolicy_rules"
).
submit
()
else
Shell
.
su
(
"mkdir -p $dir"
,
"cp -af $ruleFile $dir"
).
submit
()
}
else
{
!
disableFile
.
createNewFile
()
if
(
Const
.
Version
.
isCanary
())
if
(
Const
.
Version
.
atLeast_21_2
())
Shell
.
su
(
"copy_sepolicy_rules"
).
submit
()
else
Shell
.
su
(
"rm -rf $dir"
).
submit
()
...
...
@@ -45,13 +45,13 @@ class LocalModule(path: String) : Module() {
set
(
remove
)
{
if
(
remove
)
{
removeFile
.
createNewFile
()
if
(
Const
.
Version
.
isCanary
())
if
(
Const
.
Version
.
atLeast_21_2
())
Shell
.
su
(
"copy_sepolicy_rules"
).
submit
()
else
Shell
.
su
(
"rm -rf $PERSIST/$id"
).
submit
()
}
else
{
!
removeFile
.
delete
()
if
(
Const
.
Version
.
isCanary
())
if
(
Const
.
Version
.
atLeast_21_2
())
Shell
.
su
(
"copy_sepolicy_rules"
).
submit
()
else
Shell
.
su
(
"cp -af $ruleFile $PERSIST/$id"
).
submit
()
...
...
app/src/main/res/raw/changelog.md
View file @
5ce29c30
## v8.0.5
-
Fix sepolicy rule copying
## v8.0.4
-
A lot of stability changes and minor bug fixes
...
...
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