You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Prevent crashes on non rooted devices
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
### 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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user