From 9ddb6f4a42b9dc443742614c41ad6afd58835942 Mon Sep 17 00:00:00 2001 From: SathamHussainM Date: Wed, 1 Feb 2023 16:54:19 +0000 Subject: [PATCH] removed FBE cache some user facing encryption issue after wipe fbe cache Revert "PBRP: Additional checks for FBE cache wiping" This reverts commit 2f435e4 Revert "PBRP: Wipe: add FBE cache" This reverts commit bc9b7d7 Signed-off-by: SathamHussainM --- gui/action.cpp | 12 ++---------- gui/theme/common/languages/cz.xml | 2 -- gui/theme/common/languages/de.xml | 2 -- gui/theme/common/languages/el.xml | 2 -- gui/theme/common/languages/en.xml | 2 -- gui/theme/common/languages/fr.xml | 2 -- gui/theme/common/languages/hu.xml | 2 -- gui/theme/common/languages/in.xml | 2 -- gui/theme/common/languages/it.xml | 2 -- gui/theme/common/languages/ja.xml | 2 -- gui/theme/common/languages/ko.xml | 2 -- gui/theme/common/languages/pt_PT.xml | 2 -- gui/theme/common/languages/ru.xml | 2 -- gui/theme/common/languages/sk.xml | 2 -- gui/theme/common/languages/sl.xml | 2 -- gui/theme/common/languages/tr.xml | 2 -- gui/theme/common/languages/uk.xml | 2 -- gui/theme/common/languages/zh_TW.xml | 2 -- partitionmanager.cpp | 27 --------------------------- partitions.hpp | 1 - 20 files changed, 2 insertions(+), 72 deletions(-) diff --git a/gui/action.cpp b/gui/action.cpp index 3db5ec530..c9c8401dd 100755 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -963,7 +963,7 @@ int GUIAction::checkpartitionlist(std::string arg) while (end_pos != string::npos && start_pos < List.size()) { part_path = List.substr(start_pos, end_pos - start_pos); LOGINFO("checkpartitionlist part_path '%s'\n", part_path.c_str()); - if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MAGISK" || part_path == "FBE") { + if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MAGISK") { // Do nothing } else { count++; @@ -992,7 +992,7 @@ int GUIAction::getpartitiondetails(std::string arg) while (end_pos != string::npos && start_pos < List.size()) { part_path = List.substr(start_pos, end_pos - start_pos); LOGINFO("getpartitiondetails part_path '%s'\n", part_path.c_str()); - if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MAGISK" || part_path == "FBE") { + if (part_path == "/and-sec" || part_path == "DALVIK" || part_path == "INTERNAL" || part_path == "SUBSTRATUM" || part_path == "MAGISK") { // Do nothing } else { DataManager::SetValue("tw_partition_path", part_path); @@ -1420,14 +1420,6 @@ int GUIAction::wipe(std::string arg) } else { skip = true; } - } else if (wipe_path == "FBE" && DataManager::GetIntValue(TW_IS_FBE)) { - if (!PartitionManager.Wipe_FBE_Cache()) { - gui_err("pb_fbe_wipe_err=Failed to wipe fbe cache"); - ret_val = false; - break; - } else { - skip = true; - } } else if (wipe_path == "INTERNAL") { if (!PartitionManager.Wipe_Media_From_Data()) { ret_val = false; diff --git a/gui/theme/common/languages/cz.xml b/gui/theme/common/languages/cz.xml index e33750772..343bf610c 100644 --- a/gui/theme/common/languages/cz.xml +++ b/gui/theme/common/languages/cz.xml @@ -906,8 +906,6 @@ Po přepnutí Codenames je nutné restartovat počítač Změna názvu zařízení PBRP Codename Changer - Mezipaměť FBE - - Vymazání mezipaměti FBE bylo dokončeno! Hodnota jasu svítilny: %pb_bright_value%% Před instalací ZIP odpojte systém Odpojení systému ... diff --git a/gui/theme/common/languages/de.xml b/gui/theme/common/languages/de.xml index 9cc710ee5..2cbfbfe17 100644 --- a/gui/theme/common/languages/de.xml +++ b/gui/theme/common/languages/de.xml @@ -921,8 +921,6 @@ Ein Neustart ist nach dem Wechseln der Codenamen obligatorisch PBRP Device Codename Changer Codename Changer - FBE-Cache - - FBE Cache Wipe abgeschlossen! Helligkeitswert der Taschenlampe: %pb_bright_value%% Hängen Sie das System aus, bevor Sie eine ZIP-Datei installieren System aushängen ... diff --git a/gui/theme/common/languages/el.xml b/gui/theme/common/languages/el.xml index a9f1f7bfd..b1b2aeda1 100644 --- a/gui/theme/common/languages/el.xml +++ b/gui/theme/common/languages/el.xml @@ -896,8 +896,6 @@ Η επανεκκίνηση είναι υποχρεωτική Μετά την αλλαγή κωδικών Αλλαγή κωδικού ονόματος συσκευής PBRP Κωδικός Changer - Προσωρινή μνήμη FBE - - Ολοκληρώθηκε η διαγραφή FBE Cache! Τιμή φωτεινότητας φακού: %pb_bright_value%% Αποσύνδεση συστήματος πριν εγκαταστήσετε ένα ZIP Αποσύνδεση συστήματος ... diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index 389beabbf..437443d2d 100644 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -950,8 +950,6 @@ PBRP Device Codename Changer Codename Changer -- Magisk Modules Wipe Complete! - FBE Cache - -- FBE Cache Wipe Complete! Flashlight Brightness Value: %pb_bright_value%% Patch AVB2.0 Verity Patched AVB2.0 diff --git a/gui/theme/common/languages/fr.xml b/gui/theme/common/languages/fr.xml index 5fb944de2..34f0a0976 100644 --- a/gui/theme/common/languages/fr.xml +++ b/gui/theme/common/languages/fr.xml @@ -923,8 +923,6 @@ Un redémarrage est obligatoire après le changement de nom de code PBRP Device Codename Changer Codename Changer - FBE Cache - -- FBE Cache Wipe Complete! Valeur de luminosité de la lampe de poche: %pb_bright_value%% Démonter le système avant d'installer un ZIP Démontage du système ... diff --git a/gui/theme/common/languages/hu.xml b/gui/theme/common/languages/hu.xml index 1048713a9..a6139833e 100644 --- a/gui/theme/common/languages/hu.xml +++ b/gui/theme/common/languages/hu.xml @@ -929,8 +929,6 @@ Az újraindítás kötelező a kódnevek váltása után PBRP eszköz kódnév váltó Kódnév váltó - FBE gyorsítótár - - Az FBE gyorsítótár törlése kész! Lámpa fényerő értéke: %pb_bright_value%% Vegye le a rendszert a ZIP telepítése előtt Rendszer leszerelése ... diff --git a/gui/theme/common/languages/in.xml b/gui/theme/common/languages/in.xml index 1726bfd11..340e0ef80 100644 --- a/gui/theme/common/languages/in.xml +++ b/gui/theme/common/languages/in.xml @@ -962,8 +962,6 @@ Reboot adalah wajib Setelah mengganti Nama Kode Pengubah Nama Kode Perangkat PBRP Codename Changer - Cache FBE - - Penghapusan Cache FBE Selesai! Nilai Kecerahan Senter: %pb_bright_value%% Lepaskan Sistem sebelum menginstal ZIP Melepas Sistem ... diff --git a/gui/theme/common/languages/it.xml b/gui/theme/common/languages/it.xml index c49070e56..86bc1b8ae 100644 --- a/gui/theme/common/languages/it.xml +++ b/gui/theme/common/languages/it.xml @@ -917,8 +917,6 @@ Un riavvio è obbligatorio dopo aver cambiato i nomi in codice Cambia nome in codice dispositivo PBRP Cambia nome in codice - Cache FBE - - Cancellazione cache FBE completata! Valore di luminosità della torcia: %pb_bright_value%% Smonta il sistema prima di installare un file ZIP Sistema di smontaggio ... diff --git a/gui/theme/common/languages/ja.xml b/gui/theme/common/languages/ja.xml index 3a6f68739..f76e1650f 100644 --- a/gui/theme/common/languages/ja.xml +++ b/gui/theme/common/languages/ja.xml @@ -957,8 +957,6 @@ コードネームを切り替えた後の再起動は必須です PBRPデバイスコードネームチェンジャー コードネームチェンジャー - FBEキャッシュ - -FBEキャッシュワイプの完了! 懐中電灯の明るさの値:%pb_bright_value %% ZIPをインストールする前にシステムをアンマウントする システムのマウントを解除しています... diff --git a/gui/theme/common/languages/ko.xml b/gui/theme/common/languages/ko.xml index 28a81439e..2cfb86f6c 100644 --- a/gui/theme/common/languages/ko.xml +++ b/gui/theme/common/languages/ko.xml @@ -939,8 +939,6 @@ PBRP 기기 코드명 변경 코드명 변경 -- Magisk 모듈이 삭제되었습니다! - 파일 기반 암호화 캐시 - -- 파일 기반 암호화 캐시가 삭제되었습니다! 플래시 밝기 값: %pb_bright_value%% AVB 2.0 검증 AVB 2.0 패치됨 diff --git a/gui/theme/common/languages/pt_PT.xml b/gui/theme/common/languages/pt_PT.xml index 8daca8a88..a066e3b7a 100644 --- a/gui/theme/common/languages/pt_PT.xml +++ b/gui/theme/common/languages/pt_PT.xml @@ -917,8 +917,6 @@ A reinicialização é obrigatória após a troca de codinomes Trocador de nome de código do dispositivo PBRP Codename Changer - FBE Cache - - FBE Cache Wipe Complete! Valor de brilho da lanterna: %pb_bright_value%% Desmonte o sistema antes de instalar um ZIP Desmontando sistema ... diff --git a/gui/theme/common/languages/ru.xml b/gui/theme/common/languages/ru.xml index 1424b676d..75a4b97a4 100644 --- a/gui/theme/common/languages/ru.xml +++ b/gui/theme/common/languages/ru.xml @@ -887,8 +887,6 @@ Перезагрузка обязательна после переключения кодовых имен Смена имени Смена имени - Кэш FBE - - Очистка кэша FBE завершена! Значение яркости фонарика:%pb_bright_value%% Пожалуйста, посмотрите инструкцию для включений обновлений по OTA на Батарея: %tw_battery% diff --git a/gui/theme/common/languages/sk.xml b/gui/theme/common/languages/sk.xml index e10dfd87f..9daf19e81 100644 --- a/gui/theme/common/languages/sk.xml +++ b/gui/theme/common/languages/sk.xml @@ -903,8 +903,6 @@ Po prepnutí Codenames je povinný reštart Menič kódov zariadení PBRP Menič kódov - FBE Cache - - Vymazanie vyrovnávacej pamäte FBE bolo dokončené! Hodnota jasu baterky: %pb_bright_value%% Pred inštaláciou ZIP odpojte systém Odpojenie systému ... diff --git a/gui/theme/common/languages/sl.xml b/gui/theme/common/languages/sl.xml index 6d0cc3583..5ff91d483 100644 --- a/gui/theme/common/languages/sl.xml +++ b/gui/theme/common/languages/sl.xml @@ -903,8 +903,6 @@ Po zamenjavi kodnih imen je obvezen ponovni zagon Izmenjevalnik kodnega imena naprave PBRP Changer Changer - FBE predpomnilnik - - FBE predpomnilnik obrišite popolno! Vrednost svetlosti svetilke: %pb_bright_value%% Pred namestitvijo ZIP-ja izklopite sistem Odstranjevanje sistema ... diff --git a/gui/theme/common/languages/tr.xml b/gui/theme/common/languages/tr.xml index 62a565040..5930cde1f 100644 --- a/gui/theme/common/languages/tr.xml +++ b/gui/theme/common/languages/tr.xml @@ -916,8 +916,6 @@ Kod adlarını değiştirdikten sonra Yeniden Başlatma zorunludur PBRP Cihazı Kod Adı Değiştirici Kod Adı Değiştirici - FBE Önbelleği - - FBE Önbellek Temizleme Tamamlandı! El Feneri Parlaklık Değeri: %pb_bright_value%% Bir ZIP kurmadan önce Sistemin Bağlantısını Kes Sistemin Sökülmesi ... diff --git a/gui/theme/common/languages/uk.xml b/gui/theme/common/languages/uk.xml index edb2bd547..0ffbde400 100644 --- a/gui/theme/common/languages/uk.xml +++ b/gui/theme/common/languages/uk.xml @@ -920,8 +920,6 @@ Після переключення кодових імен обов'язкове перезавантаження Зміна кодової назви пристрою PBRP Changer Changer - Кеш FBE - - Завантажити кеш-пам'ять FBE! Значення яскравості ліхтарика: %pb_bright_value%% Відключіть систему перед встановленням ZIP Демонтаж системи ... diff --git a/gui/theme/common/languages/zh_TW.xml b/gui/theme/common/languages/zh_TW.xml index e9ac45ccd..2e44617c5 100644 --- a/gui/theme/common/languages/zh_TW.xml +++ b/gui/theme/common/languages/zh_TW.xml @@ -939,8 +939,6 @@ 切換代號後必須重新啟動 PBRP設備代號更改 代號換 - FBE快取 - -FBE緩存擦除完成! 手電筒亮度值:%pb_bright_value %% 安裝ZIP之前先卸載系統 卸載系統... diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 81a14d17c..58bfc4bbe 100755 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1506,26 +1506,6 @@ int TWPartitionManager::Wipe_Magisk_Modules(void) { return true; } -int TWPartitionManager::Wipe_FBE_Cache(void) { - string fbe_dir = "/data/misc"; - string fbe_dir2 = "/data/system"; - string fbe_dir3 = "/data/system_de"; - string fbe_dir4 = "/data/unencrypted"; - - if (!Mount_By_Path("/data", true)) return false; - - if (TWFunc::Path_Exists(fbe_dir)) TWFunc::removeDir(fbe_dir, false); - - if (TWFunc::Path_Exists(fbe_dir2)) TWFunc::removeDir(fbe_dir2, false); - - if (TWFunc::Path_Exists(fbe_dir3)) TWFunc::removeDir(fbe_dir3, false); - - if (TWFunc::Path_Exists(fbe_dir4)) TWFunc::removeDir(fbe_dir4, false); - - gui_msg("fbe_done=-- FBE Cache Wipe Complete!"); - return true; -} - int TWPartitionManager::Wipe_By_Path(string Path, string New_File_System) { std::vector::iterator iter; int ret = false; @@ -2654,13 +2634,6 @@ void TWPartitionManager::Get_Partition_List(string ListType, magisk.Mount_Point = "MAGISK"; magisk.selected = 0; Partition_List->push_back(magisk); - if (DataManager::GetIntValue(TW_IS_FBE)) { - struct PartitionList fbe; - fbe.Display_Name = gui_parse_text("{@pb_wipe_fbe_cache}"); - fbe.Mount_Point = "FBE"; - fbe.selected = 0; - Partition_List->push_back(fbe); - } for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Wipe_Available_in_GUI && !(*iter)->Is_SubPartition) { struct PartitionList part; diff --git a/partitions.hpp b/partitions.hpp index 0f9f670ca..6958978aa 100755 --- a/partitions.hpp +++ b/partitions.hpp @@ -347,7 +347,6 @@ class TWPartitionManager int Wipe_Dalvik_Cache(); // Wipes dalvik cache int Wipe_Substratum_Overlays(); // Wipe substratum overlays int Wipe_Magisk_Modules(); // Wipe magisk modules - int Wipe_FBE_Cache(); // Wipe fbe cache int Wipe_Rotate_Data(); // Wipes rotation data -- int Wipe_Battery_Stats(); // Wipe battery stats -- /data/system/batterystats.bin int Wipe_Android_Secure(); // Wipes android secure