From e86015badc0d6aa3b633bd9cb50620bbf05819b6 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 27 Jun 2018 05:58:56 +0800 Subject: [PATCH] New uninstallation method --- .gitignore | 2 +- build.gradle | 2 +- .../com/topjohnwu/magisk/FlashActivity.java | 22 ++++++++ .../com/topjohnwu/magisk/MagiskManager.java | 7 ++- .../topjohnwu/magisk/asyncs/CheckUpdates.java | 2 + .../com/topjohnwu/magisk/asyncs/FlashZip.java | 3 +- .../magisk/asyncs/InstallMagisk.java | 5 +- .../magisk/asyncs/RestoreImages.java | 26 +++++---- .../magisk/utils/ShellInitializer.java | 2 +- .../com/topjohnwu/magisk/utils/ShowUI.java | 54 ++++++------------- src/full/res/raw/utils.sh | 22 ++++++++ src/full/res/values-bg/strings.xml | 2 - src/full/res/values-de/strings.xml | 2 - src/full/res/values-el/strings.xml | 1 - src/full/res/values-es/strings.xml | 2 - src/full/res/values-et/strings.xml | 2 - src/full/res/values-fr/strings.xml | 2 - src/full/res/values-hr/strings.xml | 1 - src/full/res/values-in/strings.xml | 2 - src/full/res/values-it/strings.xml | 6 +-- src/full/res/values-ja/strings.xml | 2 - src/full/res/values-lt/strings.xml | 2 - src/full/res/values-nl/strings.xml | 2 - src/full/res/values-pl/strings.xml | 2 - src/full/res/values-pt-rBR/strings.xml | 2 - src/full/res/values-ro/strings.xml | 1 - src/full/res/values-ru/strings.xml | 2 - src/full/res/values-sr/strings.xml | 1 - src/full/res/values-tr/strings.xml | 2 - src/full/res/values-uk/strings.xml | 2 - src/full/res/values-zh-rCN/strings.xml | 2 - src/full/res/values-zh-rTW/strings.xml | 2 - src/full/res/values/strings.xml | 6 ++- .../com/topjohnwu/magisk/utils/Const.java | 3 +- 34 files changed, 97 insertions(+), 101 deletions(-) diff --git a/.gitignore b/.gitignore index 3155df90c..0c1a13c1e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ app/release *.hprof .externalNativeBuild/ -src/full/assets +src/full/res/raw/util_functions.sh public.certificate.x509.pem private.key.pk8 *.apk diff --git a/build.gradle b/build.gradle index 18f887f12..8bcefccad 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ android { productFlavors { full { - versionCode 121 + versionCode 122 versionName "5.7.0" } stub { diff --git a/src/full/java/com/topjohnwu/magisk/FlashActivity.java b/src/full/java/com/topjohnwu/magisk/FlashActivity.java index 3acb070b2..8c892d724 100644 --- a/src/full/java/com/topjohnwu/magisk/FlashActivity.java +++ b/src/full/java/com/topjohnwu/magisk/FlashActivity.java @@ -3,6 +3,7 @@ package com.topjohnwu.magisk; import android.content.Intent; import android.net.Uri; import android.os.Bundle; +import android.os.Handler; import android.support.v7.app.ActionBar; import android.support.v7.widget.Toolbar; import android.text.TextUtils; @@ -17,6 +18,7 @@ import com.topjohnwu.magisk.asyncs.FlashZip; import com.topjohnwu.magisk.asyncs.InstallMagisk; import com.topjohnwu.magisk.components.Activity; import com.topjohnwu.magisk.utils.Const; +import com.topjohnwu.magisk.utils.RootUtils; import com.topjohnwu.superuser.CallbackList; import com.topjohnwu.superuser.Shell; @@ -113,6 +115,9 @@ public class FlashActivity extends Activity { case Const.Value.FLASH_ZIP: new FlashZip(this, uri, console, logs).exec(); break; + case Const.Value.UNINSTALL: + new UninstallMagisk(this, uri, console, logs).exec(); + break; case Const.Value.FLASH_MAGISK: new InstallMagisk(this, console, logs, uri, InstallMagisk.DIRECT_MODE).exec(); break; @@ -130,4 +135,21 @@ public class FlashActivity extends Activity { public void onBackPressed() { // Prevent user accidentally press back button } + + private static class UninstallMagisk extends FlashZip { + + private UninstallMagisk(Activity context, Uri uri, List console, List logs) { + super(context, uri, console, logs); + } + + @Override + protected void onPostExecute(Integer result) { + if (result == 1) { + new Handler().postDelayed(() -> + RootUtils.uninstallPkg(getActivity().getPackageName()), 3000); + } else { + super.onPostExecute(result); + } + } + } } diff --git a/src/full/java/com/topjohnwu/magisk/MagiskManager.java b/src/full/java/com/topjohnwu/magisk/MagiskManager.java index 16ea4f552..504c1c6c4 100644 --- a/src/full/java/com/topjohnwu/magisk/MagiskManager.java +++ b/src/full/java/com/topjohnwu/magisk/MagiskManager.java @@ -54,11 +54,14 @@ public class MagiskManager extends Application implements Shell.Container { public int magiskVersionCode = -1; public String remoteMagiskVersionString; public int remoteMagiskVersionCode = -1; - public String magiskLink; - public String releaseNoteLink; public String remoteManagerVersionString; public int remoteManagerVersionCode = -1; + + public String magiskLink; + public String releaseNoteLink; public String managerLink; + public String uninstallerLink; + public boolean keepVerity = false; public boolean keepEnc = false; diff --git a/src/full/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java b/src/full/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java index 3652742c3..bea806e2a 100644 --- a/src/full/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java +++ b/src/full/java/com/topjohnwu/magisk/asyncs/CheckUpdates.java @@ -47,6 +47,8 @@ public class CheckUpdates extends ParallelTask { mm.remoteManagerVersionString = manager.getString("version"); mm.remoteManagerVersionCode = manager.getInt("versionCode"); mm.managerLink = manager.getString("link"); + JSONObject uninstaller = json.getJSONObject("uninstaller"); + mm.uninstallerLink = uninstaller.getString("link"); } catch (JSONException ignored) {} return null; } diff --git a/src/full/java/com/topjohnwu/magisk/asyncs/FlashZip.java b/src/full/java/com/topjohnwu/magisk/asyncs/FlashZip.java index b214101f9..85255425a 100644 --- a/src/full/java/com/topjohnwu/magisk/asyncs/FlashZip.java +++ b/src/full/java/com/topjohnwu/magisk/asyncs/FlashZip.java @@ -40,8 +40,7 @@ public class FlashZip extends ParallelTask { private boolean unzipAndCheck() throws Exception { ZipUtils.unzip(mCachedFile, mCachedFile.getParentFile(), "META-INF/com/google/android", true); - String s = ShellUtils.fastCmd("head -n 1 " + new File(mCachedFile.getParentFile(), "updater-script")); - return s != null && s.contains("#MAGISK"); + return ShellUtils.fastCmdResult("grep -q '#MAGISK' " + new File(mCachedFile.getParentFile(), "updater-script")); } @Override diff --git a/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java b/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java index 9fa62cf16..9d05d950d 100644 --- a/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java +++ b/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java @@ -26,7 +26,6 @@ import org.kamranzafar.jtar.TarOutputStream; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; @@ -73,8 +72,8 @@ public class InstallMagisk extends ParallelTask { @Override protected void onPreExecute() { if (mode == FIX_ENV_MODE) { - dialog = ProgressDialog.show(getActivity(), - "Additional Setup", "Running environment setup..."); + Activity a = getActivity(); + dialog = ProgressDialog.show(a, a.getString(R.string.setup_title), a.getString(R.string.setup_msg)); console = new NOPList<>(); } } diff --git a/src/full/java/com/topjohnwu/magisk/asyncs/RestoreImages.java b/src/full/java/com/topjohnwu/magisk/asyncs/RestoreImages.java index fbc26be11..e21d2f6e5 100644 --- a/src/full/java/com/topjohnwu/magisk/asyncs/RestoreImages.java +++ b/src/full/java/com/topjohnwu/magisk/asyncs/RestoreImages.java @@ -1,5 +1,7 @@ package com.topjohnwu.magisk.asyncs; +import android.app.Activity; +import android.app.ProgressDialog; import android.widget.Toast; import com.topjohnwu.magisk.MagiskManager; @@ -8,22 +10,26 @@ import com.topjohnwu.superuser.ShellUtils; public class RestoreImages extends ParallelTask { + private ProgressDialog dialog; + + public RestoreImages(Activity activity) { + super(activity); + } + + @Override + protected void onPreExecute() { + Activity a = getActivity(); + dialog = ProgressDialog.show(a, a.getString(R.string.restore_img_title), a.getString(R.string.restore_img_msg)); + } + @Override protected Boolean doInBackground(Void... voids) { - String sha1; - sha1 = ShellUtils.fastCmd("cat /.backup/.sha1"); - if (sha1 == null) { - sha1 = ShellUtils.fastCmd("cat /init.magisk.rc | grep STOCKSHA1"); - if (sha1 == null) - return false; - sha1 = sha1.substring(sha1.indexOf('=') + 1); - } - - return ShellUtils.fastCmdResult("restore_imgs " + sha1); + return ShellUtils.fastCmdResult("restore_imgs"); } @Override protected void onPostExecute(Boolean result) { + dialog.cancel(); if (result) { MagiskManager.toast(R.string.restore_done, Toast.LENGTH_SHORT); } else { diff --git a/src/full/java/com/topjohnwu/magisk/utils/ShellInitializer.java b/src/full/java/com/topjohnwu/magisk/utils/ShellInitializer.java index c30da58c0..4f7f0fd11 100644 --- a/src/full/java/com/topjohnwu/magisk/utils/ShellInitializer.java +++ b/src/full/java/com/topjohnwu/magisk/utils/ShellInitializer.java @@ -15,7 +15,7 @@ public class ShellInitializer extends Shell.Initializer { @Override public boolean onRootShellInit(Context context, @NonNull Shell shell) throws Exception { BusyBox.BB_PATH = new File(Const.BUSYBOX_PATH); - try (InputStream magiskUtils = context.getAssets().open(Const.UTIL_FUNCTIONS); + try (InputStream magiskUtils = context.getResources().openRawResource(R.raw.util_functions); InputStream managerUtils = context.getResources().openRawResource(R.raw.utils) ) { shell.loadInputStream(null, null, magiskUtils); diff --git a/src/full/java/com/topjohnwu/magisk/utils/ShowUI.java b/src/full/java/com/topjohnwu/magisk/utils/ShowUI.java index aeac6a5c6..efdc9eef3 100644 --- a/src/full/java/com/topjohnwu/magisk/utils/ShowUI.java +++ b/src/full/java/com/topjohnwu/magisk/utils/ShowUI.java @@ -7,10 +7,10 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.os.Handler; import android.support.v4.app.NotificationCompat; import android.support.v4.app.TaskStackBuilder; import android.support.v7.app.AlertDialog; +import android.text.TextUtils; import android.widget.Toast; import com.topjohnwu.magisk.FlashActivity; @@ -27,9 +27,6 @@ import com.topjohnwu.magisk.receivers.RebootReceiver; import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.ShellUtils; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; import java.util.ArrayList; import java.util.List; @@ -249,40 +246,23 @@ public class ShowUI { public static void uninstallDialog(Activity activity) { MagiskManager mm = Utils.getMagiskManager(activity); - new AlertDialogBuilder(activity) + AlertDialog.Builder b = new AlertDialogBuilder(activity) .setTitle(R.string.uninstall_magisk_title) .setMessage(R.string.uninstall_magisk_msg) - .setPositiveButton(R.string.complete_uninstall, (d, i) -> { - ByteArrayOutputStream uninstaller = new ByteArrayOutputStream(); - try (InputStream in = mm.getAssets().open(Const.UNINSTALLER)) { - ShellUtils.pump(in, uninstaller); - } catch (IOException e) { - e.printStackTrace(); - return; - } - ByteArrayOutputStream utils = new ByteArrayOutputStream(); - try (InputStream in = mm.getAssets().open(Const.UTIL_FUNCTIONS)) { - ShellUtils.pump(in, utils); - } catch (IOException e) { - e.printStackTrace(); - return; - } - - Shell.Sync.su( - Utils.fmt("echo '%s' > /cache/%s", uninstaller.toString().replace("'", "'\\''"), Const.UNINSTALLER), - Utils.fmt("echo '%s' > %s/%s", utils.toString().replace("'", "'\\''"), - mm.magiskVersionCode >= Const.MAGISK_VER.HIDDEN_PATH ? "/data/adb/magisk" : "/data/magisk", Const.UTIL_FUNCTIONS) - ); - try { - uninstaller.close(); - utils.close(); - } catch (IOException ignored) {} - - MagiskManager.toast(R.string.uninstall_toast, Toast.LENGTH_LONG); - new Handler().postDelayed(() -> RootUtils.uninstallPkg(mm.getPackageName()), 5000); - }) - .setNeutralButton(R.string.restore_img, (d, i) -> new RestoreImages().exec()) - .setNegativeButton(R.string.uninstall_app, (d, i) -> RootUtils.uninstallPkg(mm.getPackageName())) - .show(); + .setNeutralButton(R.string.restore_img, (d, i) -> new RestoreImages(activity).exec()); + if (!TextUtils.isEmpty(mm.uninstallerLink)) { + b.setPositiveButton(R.string.complete_uninstall, (d, i) -> + Utils.dlAndReceive(activity, new DownloadReceiver() { + @Override + public void onDownloadDone(Context context, Uri uri) { + Intent intent = new Intent(context, FlashActivity.class) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + .setData(uri) + .putExtra(Const.Key.FLASH_ACTION, Const.Value.UNINSTALL); + context.startActivity(intent); + } + }, mm.uninstallerLink, "magisk-uninstaller.zip")); + } + b.show(); } } diff --git a/src/full/res/raw/utils.sh b/src/full/res/raw/utils.sh index 9d6e32ecf..337ac20f6 100644 --- a/src/full/res/raw/utils.sh +++ b/src/full/res/raw/utils.sh @@ -52,3 +52,25 @@ mm_patch_dtbo() { patch_dtbo_image >/dev/null 2>&1 && echo true || echo false fi } + +restore_imgs() { + SHA1=`cat /.backup/.sha1` + [ -z $SHA1 ] && SHA1=`grep_prop #STOCKSHA1` + [ -z $SHA1 ] && return 1 + STOCKBOOT=/data/stock_boot_${SHA1}.img.gz + STOCKDTBO=/data/stock_dtbo.img.gz + [ -f $STOCKBOOT ] || return 1 + + find_boot_image + find_dtbo_image + + magisk --unlock-blocks 2>/dev/null + if [ -b "$DTBOIMAGE" -a -f $STOCKDTBO ]; then + gzip -d < $STOCKDTBO > $DTBOIMAGE + fi + if [ -b "$BOOTIMAGE" -a -f $STOCKBOOT ]; then + gzip -d < $STOCKBOOT | cat - /dev/zero > $BOOTIMAGE 2>/dev/null + return 0 + fi + return 1 +} diff --git a/src/full/res/values-bg/strings.xml b/src/full/res/values-bg/strings.xml index 77ec9f3fa..e4306ed33 100644 --- a/src/full/res/values-bg/strings.xml +++ b/src/full/res/values-bg/strings.xml @@ -107,10 +107,8 @@ Изберете стоков Boot образ с формат .img или .img.tar Пълно деинсталиране Възстановяване на образи - Деинсталиране на приложението Възстановяването е успешно! Не е налице архив на стоковия образ! - Деинсталиране на Magisk Manager до 5 секунди, моля по-късно да рестартирате Изтегляне на патентования код Magisk Manager е FOSS и затова не включва частния код за SafetyNet ППИ на Google.\n\nПозволявате ли на Magisk Manager да изтегли добавката (включва GoogleApiClient) за SafetyNet проверки? Базата данни за SU е повредена, ще създадем нов db файл diff --git a/src/full/res/values-de/strings.xml b/src/full/res/values-de/strings.xml index 0c9138700..41c092ce4 100644 --- a/src/full/res/values-de/strings.xml +++ b/src/full/res/values-de/strings.xml @@ -110,10 +110,8 @@ Selektiere das originale Boot image dump im Format .img oder .img.tar Komplette Deinstallation Stelle Images wieder her - Deinstalliere die Anwendung Wiederherstellung durchgeführt! Kein Original Backup vorhanden! - Deinstalliere Magisk Manager in 5 Sekunden, bitte im Anschluss manuell neustarten Lade proprietären Code herunter Magisk Manager ist FOSS und enthält keinen proprietären SafetyNet API Code von Google. Magisk Manager erlauben eine Erweiterung (enthält GoogleApiClient) für SafetyNet-Checks herunterzuladen? Datenbank für SU ist fehlerhaft, es wird eine neue erstellt diff --git a/src/full/res/values-el/strings.xml b/src/full/res/values-el/strings.xml index a8700d699..1cc194901 100644 --- a/src/full/res/values-el/strings.xml +++ b/src/full/res/values-el/strings.xml @@ -108,7 +108,6 @@ Πλήρης απεγκατάσταση Η ανάκτηση έγινε! Δεν υπάρχει αντίγραφο ασφαλείας! - Απεγκατάσταση του Magisk Manager σε 5 δευτερόλεπτα, παρακαλώ επανεκκινήστε χειροκίνητα αμέσως μετά Λήψη Ιδιόκτητου Κώδικα Το Magisk Manager είναι FOSS οπότε δεν περιέχει της Google τον ιδιόκτητο κώδικα του SafetyNet API.\n\nΕπιτρέπετε στο Magisk Manager να κατεβάσει μια επέκταση (περιέχει το GoogleApiClient) για ελέγχους του SafetyNet? Η βάση δεδομένων SU είναι κατεστραμμένη, θα αναδημιουργηθεί νέα diff --git a/src/full/res/values-es/strings.xml b/src/full/res/values-es/strings.xml index 27b3c3da3..d8063c90a 100644 --- a/src/full/res/values-es/strings.xml +++ b/src/full/res/values-es/strings.xml @@ -107,10 +107,8 @@ Seleccione el volcado de la imagen boot en formato .img o .img.tar Desinstalación completa Restaurar imágenes - Desinstalar Aplicación ¡Restauración Terminada! ¡El respaldo de la imagen boot Stock no existe! - Desinstalación de Magisk Manager en 5 segundos, por favor después reinicie manualmente Descargar Código Propietario Magisk Manager es un Software Libre por lo que no contiene el código API de SafetyNet (Código Propietario de Google).\n\n ¿Puede permitir que Magisk Manager descargue una extensión (contiene el GoogleApiClient) para la comprobación de SafetyNet? La base de datos SU está dañada, se creará nueva base de datos diff --git a/src/full/res/values-et/strings.xml b/src/full/res/values-et/strings.xml index d61000af7..ad689ac7b 100644 --- a/src/full/res/values-et/strings.xml +++ b/src/full/res/values-et/strings.xml @@ -108,10 +108,8 @@ Vali originaalne käivituspildi väljastus .img või .img.tar vormingus Täielik eemaldus Taasta pildid - Desinstalli rakendus Taastus valmis! Originaalne varundus puudub! - Eemaldan Magisk Manager\'i 5 sekundi pärast, palun tee peale seda käsitsi taaskäivitus Laadi alla suletud koodi Magisk Manager on vaba ja avatud lähtekoodiga, mis ei sisalda Google\'i suletud SafetyNet\'i API koodi.\n \n diff --git a/src/full/res/values-fr/strings.xml b/src/full/res/values-fr/strings.xml index 972fd1dca..ec320fed0 100644 --- a/src/full/res/values-fr/strings.xml +++ b/src/full/res/values-fr/strings.xml @@ -106,10 +106,8 @@ Sélectionnez l\'image par défaut de démarrage stockée au format .img ou .img.tar Désinstallation terminée Restauration des images - Désinstallation de l\'application Restauration terminée! Le sauvegarde par défaut n\'existe pas! - Désinstallation du Gestionnaire Magisk dans 5 secondes, merci de redémarrer manuellement après celà Télécharger Code Propriétaire Magisk Manager est Libre, il ne contient pas le code API SafetyNet propriétaire de Google. \ N \ nAutorisez vous le Gestionnaire Magisk à télécharger une extension (contenant GoogleApiClient) pour les contrôles SafetyNet? La base de données SU est corrompue, une nouvelle base de donnée va être re-créé diff --git a/src/full/res/values-hr/strings.xml b/src/full/res/values-hr/strings.xml index 1a67f68da..89d11d308 100644 --- a/src/full/res/values-hr/strings.xml +++ b/src/full/res/values-hr/strings.xml @@ -98,7 +98,6 @@ Potpuna deinstalacija Obnova je dovršena! Stock backup does not exist! - Deinstaliranje Magisk Manager aplikacije unutar 5 sekundi, molimo ponovno pokrenite uređaj nakon toga Preuzmite vlasnički kod Magisk Manager je FOSS aplikacija te ne sadrži Googleov SafetyNet API kod.\n\nDopuštate li Magisk Manager aplikaciji da preuzme proširenje (sadrži GoogleApiClient) za SafetyNet provjere? diff --git a/src/full/res/values-in/strings.xml b/src/full/res/values-in/strings.xml index f6cab5834..34eed391f 100644 --- a/src/full/res/values-in/strings.xml +++ b/src/full/res/values-in/strings.xml @@ -106,11 +106,9 @@ Versi target Magisk tidak mendukung penambalan file boot image Pilih stock boot image dump dalam format .img atau .img.tar Pulihkan Image - Copot Apl Copot Total Pemulihan selesai! Cadangan stock tidak ada! - Mencopot Magisk Manager dalam 5 detik, silahkan reboot secara manual setelahnya Unduh Kode Proprieter Magisk Manager adalah aplikasi FOSS, yang tidak menyertakan kode API proprieter Google SafetyNet.\n\nApakah Anda mengizinkan Magisk Manager untuk mengunduh sebuah ekstensi (berisi GoogleApiClient) untuk pemeriksaan SafetyNet? Database SU rusak, akan membuat db baru diff --git a/src/full/res/values-it/strings.xml b/src/full/res/values-it/strings.xml index b0bb0ac89..ce8895451 100644 --- a/src/full/res/values-it/strings.xml +++ b/src/full/res/values-it/strings.xml @@ -107,11 +107,9 @@ Seleziona l\'immagine originale di boot in formato .img o img.tar Disinstallazione completa Ripristina Immagini - Disinstalla App - Ripristino completato! + Ripristino completato! Non esiste un\'immagine originale di boot! - Disinstallazione di Magisk Manager in 5 secondi, riavvia manualmente per completare - Scarica codice proprietario + Scarica codice proprietario Magisk Manager è FOSS, quindi non contiene codice proprietario delle API Google SafetyNet.\n\nVuoi permettere il download di un\'estensione (che contiene GoogleApiClient) per controllare lo stato di SafetyNet? Il database SU è corrotto, un nuovo DB verrà ricreato Impossibile controllare SafetyNet diff --git a/src/full/res/values-ja/strings.xml b/src/full/res/values-ja/strings.xml index ed895a131..901aae529 100644 --- a/src/full/res/values-ja/strings.xml +++ b/src/full/res/values-ja/strings.xml @@ -107,10 +107,8 @@ StockのBootイメージ (.img または .img.tar形式) を選択してください 完全にアンインストール イメージのリストア - アプリのアンインストール リストア完了! Stockのバックアップがありません! - 5秒以内にMagisk Managerをアンインストールします。手動で再起動してください プロプライエタリコードのダウンロード Magisk ManagerはFOSSのため、GoogleのプロプライエタリなSafetyNet APIコードを含んでいません。\n\nMagisk ManagerがSafetyNetチェックのための拡張機能 (GoogleApiClientを含む) をダウンロードすることを許可しますか? SUデータベースが壊れています。DBを再生成します diff --git a/src/full/res/values-lt/strings.xml b/src/full/res/values-lt/strings.xml index 8a3238723..76a781563 100644 --- a/src/full/res/values-lt/strings.xml +++ b/src/full/res/values-lt/strings.xml @@ -108,10 +108,8 @@ Pasirinkti boot failą .img ar .img.tar formate Pilnas pašalinimas Atstatyti boot failą - Pašalinti programėlę Atstatymas įvykdytas! Gamyklinis atstatymo failas neegzistuoja! - Magisk Manager bus pašalintas po 5 sekundžių, pašalinus perkraukite telefoną Atsisiųsti patentuotą kodą Magisk Manager yra FOSS todėl neturi Google patentuoto SafetyNet API kodo.\n\nAr jūs leidžiate Magisk Manager atsisiųsti papildinį (turintį GoogleApiClient) SafetyNet paieškai? Supervartotojo duomenų bazė yra sugadinta, perkursime naują duomenų bazę diff --git a/src/full/res/values-nl/strings.xml b/src/full/res/values-nl/strings.xml index 3fbb5c21f..4e7986c3e 100644 --- a/src/full/res/values-nl/strings.xml +++ b/src/full/res/values-nl/strings.xml @@ -107,10 +107,8 @@ Kies originele boot image-dump in .img- of .img.tar-formaat Compleet deïnstalleren Images herstellen - App deïnstalleren Herstel voltooid! Originele back-up bestaat niet! - Magisk Manager wordt over 5 seconden verwijderd, hierna handmatig herstarten aub Google\'s code downloaden Magisk Manager is FOSS, dus bevat geen SafetyNet API code van Google.\n\nSta je Magisk Manager toe om een extensie te downloaden (bevat GoogleApiClient) voor SafetyNet controles? SU database is corrupt, nieuwe db maken… diff --git a/src/full/res/values-pl/strings.xml b/src/full/res/values-pl/strings.xml index 6f0c92aa7..7bf4e3172 100644 --- a/src/full/res/values-pl/strings.xml +++ b/src/full/res/values-pl/strings.xml @@ -106,10 +106,8 @@ Wybierz stock boot image w formacie .img lub .img.tar Odinstalowywanie Zakończone Przywróć Obraz - Odinstaluj Aplikację Przywracanie zakończone! Stock backup nie istnieje! - Odinstalowanie Magisk Manager w ciągu 5 sekund, proszę następnie ręcznie ponownie uruchomić urządzenie Pobierz Kod Magisk Manager to FOSS, więc nie zawiera zastrzeżonego kodu API SafetyNet. \n\nCzy zezwolić Magisk Managerowi na pobranie rozszerzenia (zawierającego GoogleApiClient) do sprawdzenia SafetyNet? Baza danych SU jest uszkodzona, odtworzy nową bazę danych diff --git a/src/full/res/values-pt-rBR/strings.xml b/src/full/res/values-pt-rBR/strings.xml index 4011d499c..6d1868650 100644 --- a/src/full/res/values-pt-rBR/strings.xml +++ b/src/full/res/values-pt-rBR/strings.xml @@ -107,10 +107,8 @@ Selecionar depósito de imagem de inicialização de fábrica no formato .img ou .img.tar Completar Desinstalação Restaurar Imagens - Desinstalar App Restauração concluída! Backup de fábrica não existe! - Desinstalando Magisk Manager em 5 segundos, manualmente reinicie logo após Baixar Código de Propriedade Magisk Manager é FOSS, que não contém o código de propriedade de SafetyNet API da Google.\n\nPermitir ao Magisk Manager baixar uma extensão (que contém a GoogleApiClient) para verificação de SafetyNet? Banco de dados do SU está corrompido, será recriado novo db diff --git a/src/full/res/values-ro/strings.xml b/src/full/res/values-ro/strings.xml index 895dcbac2..363ac5101 100644 --- a/src/full/res/values-ro/strings.xml +++ b/src/full/res/values-ro/strings.xml @@ -102,7 +102,6 @@ Dezinstalare totală Restabilire finalizată! Backup stoc nu există! - Dezinstalare Magisk Manager în 5 secunde, ulterior reporniți manual Descărcare cod proprietar Magisk Manager este FOSS așa că nu conține codul API SafetyNet de la Google.\n\nPermiteți ca Magisk Manager să descarce o extensie (conține GoogleApiClient) pentru verificările SafetyNet? Baza de date SU este defectă, va fi creată o bază nouă diff --git a/src/full/res/values-ru/strings.xml b/src/full/res/values-ru/strings.xml index 7b79ac39d..96a98f6a8 100644 --- a/src/full/res/values-ru/strings.xml +++ b/src/full/res/values-ru/strings.xml @@ -107,10 +107,8 @@ Выберите файл ядра (boot), *.img либо *.img.tar формата Полное удаление Восстановить разделы - Удалить приложение Восстановление завершено! Резервная копия отсутствует! - Удаление Magisk Manager в течении 5 секунд. Перезагрузите устройство. Загрузка SafetyNet Magisk Manager — свободно распространяемый продукт, он не содержит собственный код SafetyNet API от Google.\n\nРазрешить Magisk Manager загрузить расширение (содержит GoogleApiClient) для проверки SafetyNet? База данных SU повреждена, будет создана новая diff --git a/src/full/res/values-sr/strings.xml b/src/full/res/values-sr/strings.xml index c0d2cba64..6724e8430 100644 --- a/src/full/res/values-sr/strings.xml +++ b/src/full/res/values-sr/strings.xml @@ -101,7 +101,6 @@ Комплетна Унинсталација Повратак успешан! Фабрички бекап не постоји! - Уклањање Магиск Менаџера за 5 секунди, молим вас да ручно рестартујете телефон Преузми Власнички Код Магиск Менаџер је \'FOSS\' што значи да не садржи Гуглов власнички код од СигурнаМрежа АПИ.\n\nДа ли дозвољавате да Магиск Менаџер преузме додатак (садржи GoogleApiClient) за СигурнаМрежа провере? СК база података оштећена, креирам нову diff --git a/src/full/res/values-tr/strings.xml b/src/full/res/values-tr/strings.xml index a35db5a00..c58f4c3d8 100644 --- a/src/full/res/values-tr/strings.xml +++ b/src/full/res/values-tr/strings.xml @@ -106,10 +106,8 @@ .img veya .img.tar formatında stok önyükleme imajını seçin Tamamen Kaldır Önyükleme İmajını Geri Yükle - Uygulamayı Kaldır Yenileme tamamlandı! Stok önyükleme yedeği yok! - Magisk Manager\'ı 5 saniye içinde kaldırdıktan sonra lütfen daha sonra elle yeniden başlatın Tescil Kodunu İndirin Magisk Yöneticisi, FOSS olduğundan Google\'ın tescilli olduğu SafetyNet API kodunu içermez.\n\nMagisk Manager\'ın SafetyNet kontrolü için bir uzantıyı (GoogleApiClient içeriyor) indirmesine izin veriyor musunuz? SU veritabanı bozuk, yeni db oluşturacak diff --git a/src/full/res/values-uk/strings.xml b/src/full/res/values-uk/strings.xml index 04029df59..deec2bbea 100644 --- a/src/full/res/values-uk/strings.xml +++ b/src/full/res/values-uk/strings.xml @@ -106,10 +106,8 @@ Виберіть оригінальний дамп boot образу в форматі .img чи .img.tar Видалення виконано Відновити образ - Видалити додаток Відновлення завершено! Немає резервної копії оригінального boot образу - Видалення Magisk Manager протягом 5 секунд, потім, будь ласка, вручну перезавантажте пристрій Завантажити пропрієтарний код Magisk Manager — це безкоштовний додаток з відкритим вихідним кодом, тому він не містить пропрієтарний код API SafetyNet від компанії Google.\n\nДозволити Magisk Manager завантажити розширення (яке містить GoogleApiClient) для перевірки SafetyNet? База даних SU пошкоджена, буде створено нову БД diff --git a/src/full/res/values-zh-rCN/strings.xml b/src/full/res/values-zh-rCN/strings.xml index a853d8bf0..69e063fbb 100644 --- a/src/full/res/values-zh-rCN/strings.xml +++ b/src/full/res/values-zh-rCN/strings.xml @@ -107,10 +107,8 @@ 选择原厂 Boot 镜像备份;支持 .img 以及 .img.tar 格式 完全卸载 还原原厂镜像 - 卸载应用 还原完成! 原厂 Boot 镜像备份不存在! - 将在 5 秒内卸载 Magisk Manager,接下来请手动重新启动 下载专有代码 Magisk Manager 是一个 100% 开源的应用,因此不会包含 Google 专有的 SafetyNet API 代码。\n\n允许 Magisk Manager 下载一个扩展(包含 GoogleApiClient)用于 SafetyNet 检查吗? SU 数据库已损坏,将重新创建数据库 diff --git a/src/full/res/values-zh-rTW/strings.xml b/src/full/res/values-zh-rTW/strings.xml index 363bf48a7..4a6e3e258 100644 --- a/src/full/res/values-zh-rTW/strings.xml +++ b/src/full/res/values-zh-rTW/strings.xml @@ -182,7 +182,6 @@ 原廠 boot 映像備份不存在! 選擇原廠 boot 映像備份;支援 .img 以及 .img.tar 格式 安裝到第二分區 (安裝完OTA後) - 將在 5 秒內解除安裝 Magisk Manager,接下來請手動重新啟動 SafetyNet API 錯誤 下載非開源程式 Magisk Manager 是一個 100% 開源的程式,因此不會包含 Google 私有所有權的 SafetyNet API 程式碼。\n\n你允許 Magisk Manager 下載一個擴充包 (包含 GoogleApiClient) 以執行 SafetyNet 檢查嗎? @@ -198,7 +197,6 @@ 重啟到 Bootloader 重啟到 Download 不支援 Android 8.0+ - 解除安裝應用程式 還原原廠映像檔 更新於:%1$s 排序方式 diff --git a/src/full/res/values/strings.xml b/src/full/res/values/strings.xml index f06395d74..a4ea7fa3e 100644 --- a/src/full/res/values/strings.xml +++ b/src/full/res/values/strings.xml @@ -106,10 +106,10 @@ Select stock boot image dump in .img or .img.tar format Complete Uninstall Restore Images - Uninstall App + Restoring Images + Restoring… Restoration done! Stock backup does not exist! - Uninstalling Magisk Manager in 5 seconds, please manually reboot afterwards Download Proprietary Code Magisk Manager is FOSS, which doesn\'t contain Google\'s proprietary SafetyNet API code.\n\nDo you allow Magisk Manager to download an extension (contains GoogleApiClient) for SafetyNet checks? SU database is corrupted, will recreate new db @@ -119,6 +119,8 @@ Setup failed Requires Additional Setup Your device needs additional setup for Magisk to work properly. It will download the Magisk setup zip, do you want to proceed now? + Additional Setup + Running environment setup… General diff --git a/src/main/java/com/topjohnwu/magisk/utils/Const.java b/src/main/java/com/topjohnwu/magisk/utils/Const.java index 9b10dff15..7c761dfcb 100644 --- a/src/main/java/com/topjohnwu/magisk/utils/Const.java +++ b/src/main/java/com/topjohnwu/magisk/utils/Const.java @@ -17,8 +17,6 @@ public class Const { public static final String MAGISKHIDE_PROP = "persist.magisk.hide"; // APK content - public static final String UNINSTALLER = "magisk_uninstaller.sh"; - public static final String UTIL_FUNCTIONS= "util_functions.sh"; public static final String ANDROID_MANIFEST = "AndroidManifest.xml"; public static final String SU_KEYSTORE_KEY = "su_key"; @@ -159,6 +157,7 @@ public class Const { public static final String PATCH_BOOT = "patch"; public static final String FLASH_MAGISK = "magisk"; public static final String FLASH_SECOND_SLOT = "slot"; + public static final String UNINSTALL = "uninstall"; public static final int[] timeoutList = {0, -1, 10, 20, 30, 60}; public static final int ORDER_NAME = 0; public static final int ORDER_DATE = 1;