Install to Second Slot -> Install to Inactive slot

This commit is contained in:
topjohnwu 2018-07-29 15:45:04 +08:00
parent b8eaff66fa
commit 89861eceef
26 changed files with 7 additions and 28 deletions

View File

@ -121,7 +121,7 @@ public class FlashActivity extends Activity {
case Const.Value.FLASH_MAGISK:
new InstallMagisk(this, console, logs, uri, InstallMagisk.DIRECT_MODE).exec();
break;
case Const.Value.FLASH_SECOND_SLOT:
case Const.Value.FLASH_INACTIVE_SLOT:
new InstallMagisk(this, console, logs, uri, InstallMagisk.SECOND_SLOT_MODE).exec();
break;
case Const.Value.PATCH_BOOT:

View File

@ -70,7 +70,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
Intent intent = new Intent(context, FlashActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setData(uri).putExtra(Const.Key.FLASH_ACTION,
Const.Value.FLASH_SECOND_SLOT);
Const.Value.FLASH_INACTIVE_SLOT);
context.startActivity(intent);
}
};
@ -80,7 +80,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
});
}
private class SelectBoot extends DownloadReceiver {
private static class SelectBoot extends DownloadReceiver {
private Intent data;

View File

@ -32,7 +32,7 @@ public class MagiskInstallDialog extends CustomAlertDialog {
}
String s = ShellUtils.fastCmd("grep_prop ro.build.ab_update");
if (!s.isEmpty() && Boolean.parseBoolean(s)) {
options.add(mm.getString(R.string.install_second_slot));
options.add(mm.getString(R.string.install_inactive_slot));
}
new InstallMethodDialog(activity, options, filename).show();
});

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">Изтегляне само на архив</string>
<string name="patch_boot_file">Модифициране на Boot образа</string>
<string name="direct_install">Директно инсталиране (Препоръчва се)</string>
<string name="install_second_slot">Инсталиране на втория слот (След OTA)</string>
<string name="select_method">Избор на метод</string>
<string name="no_boot_file_patch_support">Избраната версия на Magisk не поддържа модифициране на Boot образи</string>
<string name="boot_file_patch_msg">Изберете стоков Boot образ с формат .img или .img.tar</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Zip-Datei nur herunterladen</string>
<string name="patch_boot_file">Boot-Image-Datei patchen</string>
<string name="direct_install">Direkt installieren (empfohlen)</string>
<string name="install_second_slot">Installiere auf zweiten Slot (Nach OTA)</string>
<string name="select_method">Methode auswählen</string>
<string name="no_boot_file_patch_support">Magisk Zielversion unterstützt das Patchen des Boot-Images nicht</string>
<string name="boot_file_patch_msg">Selektiere das originale Boot image dump im Format .img oder .img.tar</string>

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">Λήψη Zip Μόνο</string>
<string name="patch_boot_file">Εφαρμογή Patch στο Αρχείο Εικόνας Boot</string>
<string name="direct_install">Απευθείας Εγκατάσταση (Προτείνεται)</string>
<string name="install_second_slot">Εγκατάσταση σε Second Slot (Μετά από ΟΤΑ)</string>
<string name="select_method">Επιλογή Μεθόδου</string>
<string name="no_boot_file_patch_support">Αυτή η Magisk έκδοση δεν υποστηρίζει patch του boot image αρχείου</string>
<string name="boot_file_patch_msg">Επιλογή stock boot image dump σε μορφή .img ή .img.tar</string>

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">Descargar sólo el archivo ZIP</string>
<string name="patch_boot_file">Parcheo de la imagen boot</string>
<string name="direct_install">Instalación Directa (Recomendado)</string>
<string name="install_second_slot">Instalación en el segundo espacio (Después de OTA)</string>
<string name="select_method">Seleccionar Método</string>
<string name="no_boot_file_patch_support">La versión de Magisk no admite el parcheo de la imagen boot</string>
<string name="boot_file_patch_msg">Seleccione el volcado de la imagen boot en formato .img o .img.tar</string>

View File

@ -101,7 +101,6 @@
<string name="download_zip_only">Laadi ainult ZIP alla</string>
<string name="patch_boot_file">Paika käivituspildi fail</string>
<string name="direct_install">Otsene install (soovitatud)</string>
<string name="install_second_slot">Installi teise lahtrisse (pärast üle õhu uuendust)</string>
<string name="select_method">Vali meetod</string>
<string name="no_boot_file_patch_support">Magisk\'i sihtversioon ei toeta käivituspildi faili paikamist</string>
<string name="boot_file_patch_msg">Vali originaalne käivituspildi väljastus .img või .img.tar vormingus</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Uniquement télécharger le zip</string>
<string name="patch_boot_file">Patch Fichier Image Démarrage</string>
<string name="direct_install">Installation directe (Recommendée)</string>
<string name="install_second_slot">Installer dans le second Slot (Après OTA)</string>
<string name="select_method">Sélectionner le méthode</string>
<string name="no_boot_file_patch_support">La version cible de Magisk ne prend pas en charge la correction de fichier image de démarrage</string>
<string name="boot_file_patch_msg">Sélectionnez l\'image par défaut de démarrage stockée au format .img ou .img.tar</string>

View File

@ -90,7 +90,6 @@
<string name="download_zip_only">Preuzmi samo zip</string>
<string name="patch_boot_file">Zakrpa datoteke za podizanje sustava</string>
<string name="direct_install">Izravna instalacija (preporuča se)</string>
<string name="install_second_slot">Instalirajte na drugo mjesto (nakon OTA-e)</string>
<string name="select_method">Odaberite metodu</string>
<string name="no_boot_file_patch_support">Ciljana verzija Magiska ne podržava zakrpu datoteke za podizanje sustava</string>
<string name="boot_file_patch_msg">Odaberite standardnu datoteku za podizanje sustava u .img ili .img.tar formatu</string>

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">Unduh Zip Saja</string>
<string name="patch_boot_file">Tambal File Boot Image</string>
<string name="direct_install">Pasang Langsung (Direkomendasikan)</string>
<string name="install_second_slot">Pasang ke Slot Kedua (Setelah OTA)</string>
<string name="select_method">Pilih Metode</string>
<string name="no_boot_file_patch_support">Versi target Magisk tidak mendukung penambalan file boot image</string>
<string name="boot_file_patch_msg">Pilih stock boot image dump dalam format .img atau .img.tar</string>

View File

@ -100,8 +100,7 @@
<string name="download_zip_only">Scarica solo il file zip</string>
<string name="patch_boot_file">Aggiorna l\'immagine di boot</string>
<string name="direct_install">Installazione diretta (raccomandata)</string>
<string name="install_second_slot">Installa nel secondo slot (dopo OTA)</string>
<string name="select_method">Seleziona un metodo</string>
<string name="select_method">Seleziona un metodo</string>
<string name="no_boot_file_patch_support">La versione Magisk di destinazione non supporta l\'aggiornamento dell\'immagine di boot</string>
<string name="boot_file_patch_msg">Seleziona l\'immagine originale di boot in formato .img o img.tar</string>
<string name="complete_uninstall">Disinstallazione completa</string>

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">ZIPのみダウンロード</string>
<string name="patch_boot_file">Bootイメージのパッチ</string>
<string name="direct_install">直接インストール (推奨)</string>
<string name="install_second_slot">第2スロットへインストール (OTA後)</string>
<string name="select_method">方法の選択</string>
<string name="no_boot_file_patch_support">指定されたMagiskバージョンはBootイメージのパッチに対応していません</string>
<string name="boot_file_patch_msg">StockのBootイメージ (.img または .img.tar形式) を選択してください</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Atsisiųsti zip failą</string>
<string name="patch_boot_file">Ištaisyti boot failą</string>
<string name="direct_install">Tiesioginis instaliavimas (Rekomenduojamas)</string>
<string name="install_second_slot">Instaliuoti į antrą vietą (Po OTA)</string>
<string name="select_method">Pasirinkite metodą</string>
<string name="no_boot_file_patch_support">Pasirinkta Magisk versija nepalaiko pakeitimų boot faile</string>
<string name="boot_file_patch_msg">Pasirinkti boot failą .img ar .img.tar formate</string>

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">Alleen zip downloaden</string>
<string name="patch_boot_file">Boot image-bestand patchen</string>
<string name="direct_install">Direct installeren (aangeraden)</string>
<string name="install_second_slot">Op tweede positie installeren (na OTA)</string>
<string name="select_method">Methode kiezen</string>
<string name="no_boot_file_patch_support">Magisk versie ondersteund geen boot image-bestand patchen</string>
<string name="boot_file_patch_msg">Kies originele boot image-dump in .img- of .img.tar-formaat</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Pobierz Tylko Zip</string>
<string name="patch_boot_file">Patchowanie Pliku Boot Image</string>
<string name="direct_install">Bezpośrednia instalacja (Zalecane)</string>
<string name="install_second_slot">Zainstaluj na Drugim Slocie (Po OTA)</string>
<string name="select_method">Wybierz Metodę</string>
<string name="no_boot_file_patch_support">Wersja docelowa programu Magisk nie obsługuje ładowania pliku boot image</string>
<string name="boot_file_patch_msg">Wybierz stock boot image w formacie .img lub .img.tar</string>

View File

@ -100,7 +100,6 @@
<string name="download_zip_only">Baixar Zip Apenas</string>
<string name="patch_boot_file">Emendar Arquivo de Imagem de Inicialização</string>
<string name="direct_install">Instalação Direta (Recomendado)</string>
<string name="install_second_slot">Instalar no Segundo Slot (Após OTA)</string>
<string name="select_method">Selecionar Método</string>
<string name="no_boot_file_patch_support">A versão alvo do Magisk não suporta emendamento de imagem de inicialização</string>
<string name="boot_file_patch_msg">Selecionar depósito de imagem de inicialização de fábrica no formato .img ou .img.tar</string>

View File

@ -94,7 +94,6 @@
<string name="download_zip_only">Doar descărcare fişier Zip</string>
<string name="patch_boot_file">Modificare fişier imagine Boot</string>
<string name="direct_install">Instalare directă (Recomandat)</string>
<string name="install_second_slot">Instalare în slotul secund (După OTA)</string>
<string name="select_method">Selectaţi metoda</string>
<string name="no_boot_file_patch_support">Versiunea Magisk nu acceptă modificarea imaginii de Boot</string>
<string name="boot_file_patch_msg">Selectaţi formatul .img sau .img.tar pentru imaginea de Boot stoc</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Загрузка установочного ZIP</string>
<string name="patch_boot_file">Пропатчить образ ядра (boot.img)</string>
<string name="direct_install">Прямая установка (Рекомендуется)</string>
<string name="install_second_slot">Установка во Второй Слот (После OTA)</string>
<string name="select_method">Выбор способа</string>
<string name="no_boot_file_patch_support">Целевая версия Magisk не поддерживает патчинг boot-образов</string>
<string name="boot_file_patch_msg">Выберите файл ядра (boot) - *.img или *.img.tar</string>

View File

@ -93,7 +93,6 @@
<string name="download_zip_only">Преузми само Зип</string>
<string name="patch_boot_file">Закрпи фајл слике покретања</string>
<string name="direct_install">Директна Инсталација (Препоручено)</string>
<string name="install_second_slot">Инсталирај у Други Слот (После ОТА)</string>
<string name="select_method">Изабери Методу</string>
<string name="no_boot_file_patch_support">Циљана Магиск верзија не подржава закрпу фајла слике покретања</string>
<string name="boot_file_patch_msg">Изабери испис фабричког фајла слике покретања у .img или img.tar формату</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Yalnızca Zip Dosyasını İndir</string>
<string name="patch_boot_file">Önyükleme İmaj Dosyasını Yamala</string>
<string name="direct_install">Doğrudan Yükle (Önerilen)</string>
<string name="install_second_slot">İkinci Yuvaya Yükle (OTA\'dan sonra)</string>
<string name="select_method">Yöntem Seçin</string>
<string name="no_boot_file_patch_support">Hedef Magisk sürümü önyükleme imaj dosyasını yamalamayı desteklemiyor</string>
<string name="boot_file_patch_msg">.img veya .img.tar formatında stok önyükleme imajını seçin</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">Тільки завантажити</string>
<string name="patch_boot_file">Пропатчити boot образ</string>
<string name="direct_install">Пряме встановлення (рекомендовано)</string>
<string name="install_second_slot">Встановити в Другий Слот (після OTA)</string>
<string name="select_method">Виберіть спосіб</string>
<string name="no_boot_file_patch_support">Цільова версія Magisk не підтримує пропатчування boot образу</string>
<string name="boot_file_patch_msg">Виберіть оригінальний дамп boot образу в форматі .img чи .img.tar</string>

View File

@ -99,7 +99,6 @@
<string name="download_zip_only">仅下载 Zip</string>
<string name="patch_boot_file">修补 Boot 镜像文件</string>
<string name="direct_install">直接安装(推荐)</string>
<string name="install_second_slot">安装到第二分区安装完OTA后</string>
<string name="select_method">选择安装方法</string>
<string name="no_boot_file_patch_support">目标安装版本不支持修补 Boot 镜像文件</string>
<string name="boot_file_patch_msg">选择原厂 Boot 镜像备份;支持 .img 以及 .img.tar 格式</string>

View File

@ -180,7 +180,6 @@
<string name="restore_done">還原完成!</string>
<string name="restore_fail">原廠 boot 映像備份不存在!</string>
<string name="boot_file_patch_msg">選擇原廠 boot 映像備份;支援 .img 以及 .img.tar 格式</string>
<string name="install_second_slot">安裝到第二分區 (安裝完OTA後)</string>
<string name="safetyNet_api_error">SafetyNet API 錯誤</string>
<string name="proprietary_title">下載非開源程式</string>
<string name="proprietary_notice">Magisk Manager 是一個 100% 開源的程式,因此不會包含 Google 私有所有權的 SafetyNet API 程式碼。\n\n你允許 Magisk Manager 下載一個擴充包 (包含 GoogleApiClient) 以執行 SafetyNet 檢查嗎?</string>

View File

@ -99,7 +99,7 @@
<string name="download_zip_only">Download Zip Only</string>
<string name="patch_boot_file">Patch Boot Image File</string>
<string name="direct_install">Direct Install (Recommended)</string>
<string name="install_second_slot">Install to Second Slot (After OTA)</string>
<string name="install_inactive_slot">Install to Inactive Slot (After OTA)</string>
<string name="select_method">Select Method</string>
<string name="no_boot_file_patch_support">Target Magisk version doesn\'t support boot image file patching</string>
<string name="boot_file_patch_msg">Select stock boot image dump in .img or .img.tar format</string>

View File

@ -155,7 +155,7 @@ public class Const {
public static final String FLASH_ZIP = "flash";
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 FLASH_INACTIVE_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;