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
28649c07
Commit
28649c07
authored
Jun 20, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SU policy DB bug fix
parent
961e02be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
SuDatabaseHelper.java
.../java/com/topjohnwu/magisk/database/SuDatabaseHelper.java
+18
-4
No files found.
app/src/main/java/com/topjohnwu/magisk/database/SuDatabaseHelper.java
View file @
28649c07
...
...
@@ -159,11 +159,25 @@ public class SuDatabaseHelper extends SQLiteOpenHelper {
new
String
[]
{
String
.
valueOf
(
System
.
currentTimeMillis
())
});
try
(
Cursor
c
=
db
.
query
(
POLICY_TABLE
,
null
,
null
,
null
,
null
,
null
,
null
))
{
while
(
c
.
moveToNext
())
{
try
{
policy
=
new
Policy
(
c
,
pm
);
ret
.
add
(
policy
);
// The application changed UID for some reason, check user config
if
(
policy
.
info
.
uid
!=
policy
.
uid
)
{
if
(
magiskManager
.
suReauth
)
{
// Reauth required, remove from DB
deletePolicy
(
policy
.
uid
);
continue
;
}
else
{
// No reauth, we use the new UID
policy
.
uid
=
policy
.
info
.
uid
;
}
}
ret
.
add
(
policy
);
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
e
.
printStackTrace
();
// The app no longer exist, remove from DB
deletePolicy
(
c
.
getString
(
c
.
getColumnIndex
(
"package_name"
)));
}
}
}
db
.
close
();
Collections
.
sort
(
ret
);
...
...
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