Skip to content

Commit

Permalink
removed FBE cache
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
SathamHussainM committed Feb 1, 2023
1 parent d3e575c commit 9ddb6f4
Show file tree
Hide file tree
Showing 20 changed files with 2 additions and 72 deletions.
12 changes: 2 additions & 10 deletions gui/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/cz.xml
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,6 @@
<string name="pb_dev_reboot">Po přepnutí Codenames je nutné restartovat počítač</string>
<string name="pb_dev_name">Změna názvu zařízení PBRP</string>
<string name="codename_changer">Codename Changer</string>
<string name="pb_wipe_fbe_cache">Mezipaměť FBE</string>
<string name="fbe_done">- Vymazání mezipaměti FBE bylo dokončeno!</string>
<string name="sel_br_val">Hodnota jasu svítilny: %pb_bright_value%%</string>
<string name="unmount_sys_install">Před instalací ZIP odpojte systém</string>
<string name="unmount_system">Odpojení systému ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,6 @@
<string name="pb_dev_reboot">Ein Neustart ist nach dem Wechseln der Codenamen obligatorisch</string>
<string name="pb_dev_name">PBRP Device Codename Changer</string>
<string name="codename_changer">Codename Changer</string>
<string name="pb_wipe_fbe_cache">FBE-Cache</string>
<string name="fbe_done">- FBE Cache Wipe abgeschlossen!</string>
<string name="sel_br_val">Helligkeitswert der Taschenlampe: %pb_bright_value%%</string>
<string name="unmount_sys_install">Hängen Sie das System aus, bevor Sie eine ZIP-Datei installieren</string>
<string name="unmount_system">System aushängen ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/el.xml
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,6 @@
<string name="pb_dev_reboot">Η επανεκκίνηση είναι υποχρεωτική Μετά την αλλαγή κωδικών</string>
<string name="pb_dev_name">Αλλαγή κωδικού ονόματος συσκευής PBRP</string>
<string name="codename_changer">Κωδικός Changer</string>
<string name="pb_wipe_fbe_cache">Προσωρινή μνήμη FBE</string>
<string name="fbe_done">- Ολοκληρώθηκε η διαγραφή FBE Cache!</string>
<string name="sel_br_val">Τιμή φωτεινότητας φακού: %pb_bright_value%%</string>
<string name="unmount_sys_install">Αποσύνδεση συστήματος πριν εγκαταστήσετε ένα ZIP</string>
<string name="unmount_system">Αποσύνδεση συστήματος ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,6 @@
<string name="pb_dev_name">PBRP Device Codename Changer</string>
<string name="codename_changer">Codename Changer</string>
<string name="magisk_done">-- Magisk Modules Wipe Complete!</string>
<string name="pb_wipe_fbe_cache">FBE Cache</string>
<string name="fbe_done">-- FBE Cache Wipe Complete!</string>
<string name="sel_br_val">Flashlight Brightness Value: %pb_bright_value%%</string>
<string name="patch_avb2">Patch AVB2.0 Verity</string>
<string name="pb_patch_avb2">Patched AVB2.0</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,6 @@
<string name="pb_dev_reboot">Un redémarrage est obligatoire après le changement de nom de code</string>
<string name="pb_dev_name">PBRP Device Codename Changer</string>
<string name="codename_changer">Codename Changer</string>
<string name="pb_wipe_fbe_cache">FBE Cache</string>
<string name="fbe_done">-- FBE Cache Wipe Complete!</string>
<string name="sel_br_val">Valeur de luminosité de la lampe de poche: %pb_bright_value%%</string>
<string name="unmount_sys_install">Démonter le système avant d'installer un ZIP</string>
<string name="unmount_system">Démontage du système ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/hu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,6 @@
<string name="pb_dev_reboot">Az újraindítás kötelező a kódnevek váltása után</string>
<string name="pb_dev_name">PBRP eszköz kódnév váltó</string>
<string name="codename_changer">Kódnév váltó</string>
<string name="pb_wipe_fbe_cache">FBE gyorsítótár</string>
<string name="fbe_done">- Az FBE gyorsítótár törlése kész!</string>
<string name="sel_br_val">Lámpa fényerő értéke: %pb_bright_value%%</string>
<string name="unmount_sys_install">Vegye le a rendszert a ZIP telepítése előtt</string>
<string name="unmount_system">Rendszer leszerelése ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,6 @@
<string name="pb_dev_reboot">Reboot adalah wajib Setelah mengganti Nama Kode</string>
<string name="pb_dev_name">Pengubah Nama Kode Perangkat PBRP</string>
<string name="codename_changer">Codename Changer</string>
<string name="pb_wipe_fbe_cache">Cache FBE</string>
<string name="fbe_done">- Penghapusan Cache FBE Selesai!</string>
<string name="sel_br_val">Nilai Kecerahan Senter: %pb_bright_value%%</string>
<string name="unmount_sys_install">Lepaskan Sistem sebelum menginstal ZIP</string>
<string name="unmount_system">Melepas Sistem ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,6 @@
<string name="pb_dev_reboot">Un riavvio è obbligatorio dopo aver cambiato i nomi in codice</string>
<string name="pb_dev_name">Cambia nome in codice dispositivo PBRP</string>
<string name="codename_changer">Cambia nome in codice</string>
<string name="pb_wipe_fbe_cache">Cache FBE</string>
<string name="fbe_done">- Cancellazione cache FBE completata!</string>
<string name="sel_br_val">Valore di luminosità della torcia: %pb_bright_value%%</string>
<string name="unmount_sys_install">Smonta il sistema prima di installare un file ZIP</string>
<string name="unmount_system">Sistema di smontaggio ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/ja.xml
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,6 @@
<string name="pb_dev_reboot">コードネームを切り替えた後の再起動は必須です</string>
<string name="pb_dev_name">PBRPデバイスコードネームチェンジャー</string>
<string name="codename_changer">コードネームチェンジャー</string>
<string name="pb_wipe_fbe_cache">FBEキャッシュ</string>
<string name="fbe_done">-FBEキャッシュワイプの完了!</string>
<string name="sel_br_val">懐中電灯の明るさの値:%pb_bright_value %%</string>
<string name="unmount_sys_install">ZIPをインストールする前にシステムをアンマウントする</string>
<string name="unmount_system">システムのマウントを解除しています...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/ko.xml
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,6 @@
<string name="pb_dev_name">PBRP 기기 코드명 변경</string>
<string name="codename_changer">코드명 변경</string>
<string name="magisk_done">-- Magisk 모듈이 삭제되었습니다!</string>
<string name="pb_wipe_fbe_cache">파일 기반 암호화 캐시</string>
<string name="fbe_done">-- 파일 기반 암호화 캐시가 삭제되었습니다!</string>
<string name="sel_br_val">플래시 밝기 값: %pb_bright_value%%</string>
<string name="patch_avb2">AVB 2.0 검증</string>
<string name="pb_patch_avb2">AVB 2.0 패치됨</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/pt_PT.xml
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,6 @@
<string name="pb_dev_reboot">A reinicialização é obrigatória após a troca de codinomes</string>
<string name="pb_dev_name">Trocador de nome de código do dispositivo PBRP</string>
<string name="codename_changer">Codename Changer</string>
<string name="pb_wipe_fbe_cache">FBE Cache</string>
<string name="fbe_done">- FBE Cache Wipe Complete!</string>
<string name="sel_br_val">Valor de brilho da lanterna: %pb_bright_value%%</string>
<string name="unmount_sys_install">Desmonte o sistema antes de instalar um ZIP</string>
<string name="unmount_system">Desmontando sistema ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/ru.xml
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,6 @@
<string name="pb_dev_reboot">Перезагрузка обязательна после переключения кодовых имен</string>
<string name="pb_dev_name">Смена имени</string>
<string name="codename_changer">Смена имени</string>
<string name="pb_wipe_fbe_cache">Кэш FBE</string>
<string name="fbe_done">- Очистка кэша FBE завершена!</string>
<string name="sel_br_val">Значение яркости фонарика:%pb_bright_value%%</string>
<string name="pb_ota_instruction">Пожалуйста, посмотрите инструкцию для включений обновлений по OTA на</string>
<string name="battery_pct">Батарея: %tw_battery%</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/sk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,6 @@
<string name="pb_dev_reboot">Po prepnutí Codenames je povinný reštart</string>
<string name="pb_dev_name">Menič kódov zariadení PBRP</string>
<string name="codename_changer">Menič kódov</string>
<string name="pb_wipe_fbe_cache">FBE Cache</string>
<string name="fbe_done">- Vymazanie vyrovnávacej pamäte FBE bolo dokončené!</string>
<string name="sel_br_val">Hodnota jasu baterky: %pb_bright_value%%</string>
<string name="unmount_sys_install">Pred inštaláciou ZIP odpojte systém</string>
<string name="unmount_system">Odpojenie systému ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/sl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,6 @@
<string name="pb_dev_reboot">Po zamenjavi kodnih imen je obvezen ponovni zagon</string>
<string name="pb_dev_name">Izmenjevalnik kodnega imena naprave PBRP</string>
<string name="codename_changer">Changer Changer</string>
<string name="pb_wipe_fbe_cache">FBE predpomnilnik</string>
<string name="fbe_done">- FBE predpomnilnik obrišite popolno!</string>
<string name="sel_br_val">Vrednost svetlosti svetilke: %pb_bright_value%%</string>
<string name="unmount_sys_install">Pred namestitvijo ZIP-ja izklopite sistem</string>
<string name="unmount_system">Odstranjevanje sistema ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/tr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,6 @@
<string name="pb_dev_reboot">Kod adlarını değiştirdikten sonra Yeniden Başlatma zorunludur</string>
<string name="pb_dev_name">PBRP Cihazı Kod Adı Değiştirici</string>
<string name="codename_changer">Kod Adı Değiştirici</string>
<string name="pb_wipe_fbe_cache">FBE Önbelleği</string>
<string name="fbe_done">- FBE Önbellek Temizleme Tamamlandı!</string>
<string name="sel_br_val">El Feneri Parlaklık Değeri: %pb_bright_value%%</string>
<string name="unmount_sys_install">Bir ZIP kurmadan önce Sistemin Bağlantısını Kes</string>
<string name="unmount_system">Sistemin Sökülmesi ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/uk.xml
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,6 @@
<string name="pb_dev_reboot">Після переключення кодових імен обов'язкове перезавантаження</string>
<string name="pb_dev_name">Зміна кодової назви пристрою PBRP</string>
<string name="codename_changer">Changer Changer</string>
<string name="pb_wipe_fbe_cache">Кеш FBE</string>
<string name="fbe_done">- Завантажити кеш-пам'ять FBE!</string>
<string name="sel_br_val">Значення яскравості ліхтарика: %pb_bright_value%%</string>
<string name="unmount_sys_install">Відключіть систему перед встановленням ZIP</string>
<string name="unmount_system">Демонтаж системи ...</string>
Expand Down
2 changes: 0 additions & 2 deletions gui/theme/common/languages/zh_TW.xml
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,6 @@
<string name="pb_dev_reboot">切換代號後必須重新啟動</string>
<string name="pb_dev_name">PBRP設備代號更改</string>
<string name="codename_changer">代號換</string>
<string name="pb_wipe_fbe_cache">FBE快取</string>
<string name="fbe_done">-FBE緩存擦除完成!</string>
<string name="sel_br_val">手電筒亮度值:%pb_bright_value %%</string>
<string name="unmount_sys_install">安裝ZIP之前先卸載系統</string>
<string name="unmount_system">卸載系統...</string>
Expand Down
27 changes: 0 additions & 27 deletions partitionmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TWPartition*>::iterator iter;
int ret = false;
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion partitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9ddb6f4

Please sign in to comment.