diff --git a/build.gradle b/build.gradle index a38bb8a9e..da17920b4 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ android { applicationId "com.topjohnwu.magisk" minSdkVersion 21 targetSdkVersion 27 - versionCode 91 + versionCode 94 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' diff --git a/src/main/assets/changelog.md b/src/main/assets/changelog.md index e76b29d7f..10ae4b44b 100644 --- a/src/main/assets/changelog.md +++ b/src/main/assets/changelog.md @@ -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 diff --git a/src/main/java/com/topjohnwu/magisk/database/SuDatabaseHelper.java b/src/main/java/com/topjohnwu/magisk/database/SuDatabaseHelper.java index cd52d5998..67d4ca449 100644 --- a/src/main/java/com/topjohnwu/magisk/database/SuDatabaseHelper.java +++ b/src/main/java/com/topjohnwu/magisk/database/SuDatabaseHelper.java @@ -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; }