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
50a49e2c
Commit
50a49e2c
authored
Jan 31, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent crashes on non rooted devices
parent
c60adb11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
build.gradle
build.gradle
+2
-2
changelog.md
src/main/assets/changelog.md
+4
-6
SuDatabaseHelper.java
.../java/com/topjohnwu/magisk/database/SuDatabaseHelper.java
+7
-7
No files found.
build.gradle
View file @
50a49e2c
...
...
@@ -8,7 +8,7 @@ android {
applicationId
"com.topjohnwu.magisk"
minSdkVersion
21
targetSdkVersion
27
versionCode
9
1
versionCode
9
4
versionName
"5.5.5"
javaCompileOptions
{
annotationProcessorOptions
{
...
...
@@ -46,7 +46,7 @@ repositories {
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
project
(
':utils'
)
implementation
'com.github.topjohnwu:libsu:1.0.
0
'
implementation
'com.github.topjohnwu:libsu:1.0.
1
'
implementation
'com.android.support:recyclerview-v7:27.0.2'
implementation
'com.android.support:cardview-v7:27.0.2'
implementation
'com.android.support:design:27.0.2'
...
...
src/main/assets/changelog.md
View file @
50a49e2c
### v5.5.5
-
Fix crashes on Lollipop and some devices that don't follow AOSP standards
### v5.5.4
-
Fix on-boot dtbo detection
-
Add fingerprint authentication for Superuser requests
### v5.5.5 (93)
-
Remove JNI requirement, Magisk Manager is now pure Java
-
Update the method to handle global su database (v15+), should fix root request not saving issue
on many devices
src/main/java/com/topjohnwu/magisk/database/SuDatabaseHelper.java
View file @
50a49e2c
...
...
@@ -55,6 +55,13 @@ public class SuDatabaseHelper {
private
SuDatabaseHelper
(
MagiskManager
mm
)
{
pm
=
mm
.
getPackageManager
();
mDb
=
openDatabase
(
mm
);
int
version
=
mDb
.
getVersion
();
if
(
version
<
DATABASE_VER
)
{
onUpgrade
(
mDb
,
version
);
}
else
if
(
version
>
DATABASE_VER
)
{
onDowngrade
(
mDb
);
}
mDb
.
setVersion
(
DATABASE_VER
);
clearOutdated
();
}
...
...
@@ -107,13 +114,6 @@ public class SuDatabaseHelper {
// Not using legacy mode, open the mounted global DB
db
=
SQLiteDatabase
.
openOrCreateDatabase
(
dbFile
,
null
);
}
int
version
=
db
.
getVersion
();
if
(
version
<
DATABASE_VER
)
{
onUpgrade
(
db
,
version
);
}
else
if
(
version
>
DATABASE_VER
)
{
onDowngrade
(
db
);
}
db
.
setVersion
(
DATABASE_VER
);
return
db
;
}
...
...
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