mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-29 06:07:41 +00:00
Notify su db corruption
This commit is contained in:
parent
bd37d90228
commit
708d8f75c0
@ -9,8 +9,10 @@ import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.topjohnwu.magisk.MagiskManager;
|
||||
import com.topjohnwu.magisk.R;
|
||||
import com.topjohnwu.magisk.container.Policy;
|
||||
import com.topjohnwu.magisk.container.SuLogEntry;
|
||||
import com.topjohnwu.magisk.utils.Shell;
|
||||
@ -171,6 +173,7 @@ public class SuDatabaseHelper extends SQLiteOpenHelper {
|
||||
|
||||
@Override
|
||||
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
MagiskManager.toast(R.string.su_db_corrupt, Toast.LENGTH_LONG);
|
||||
// Remove everything, we do not support downgrade
|
||||
db.execSQL("DROP TABLE IF EXISTS " + POLICY_TABLE);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + LOG_TABLE);
|
||||
|
@ -206,5 +206,6 @@
|
||||
<string name="invalid_update_channel">不合法的更新頻道</string>
|
||||
<string name="settings_update_custom">自訂</string>
|
||||
<string name="settings_update_custom_msg">請輸入自訂網址</string>
|
||||
<string name="su_db_corrupt">SU 資料庫已毀損,將會重新建置</string>
|
||||
|
||||
</resources>
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
<!--Status Fragment-->
|
||||
<string name="magisk_version_error">Magisk is not installed</string>
|
||||
|
||||
<string name="checking_for_updates">Checking for updates…</string>
|
||||
<string name="magisk_update_available">Magisk v%1$s is available!</string>
|
||||
<string name="invalid_update_channel">Invalid Update Channel</string>
|
||||
@ -118,6 +117,7 @@
|
||||
<string name="uninstall_toast">Uninstalling Magisk Manager in 5 seconds, please manually reboot afterwards</string>
|
||||
<string name="proprietary_title">Download Proprietary Code</string>
|
||||
<string name="proprietary_notice">Magisk Manager is FOSS so doesn\'t contain Google\'s proprietary SafetyNet API code.\n\nDo you allow Magisk Manager to download an extension (contains GoogleApiClient) for SafetyNet checks?</string>
|
||||
<string name="su_db_corrupt">SU database is corrupted, will recreate new db</string>
|
||||
|
||||
<!--Settings Activity -->
|
||||
<string name="settings_general_category">General</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user