fbe formatting: add warning for fbe devices and remove unused string
Change-Id: Id7af18a4c39932d8685e3265bfa158494ffd10f0
(cherry picked from commit 2d54867daaeb374159355f06c8a295b32ad06bec)
diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml
index 32005b0..ac603e6 100755
--- a/gui/theme/common/languages/en.xml
+++ b/gui/theme/common/languages/en.xml
@@ -751,6 +751,7 @@
<string name="flash_ab_both_slots">Flash to both slots</string>
<string name="ozip_decrypt_decryption">Starting Ozip Decryption...</string>
<string name="ozip_decrypt_finish">Ozip Decryption Finished!</string>
+ <string name="data_media_fbe_msg">TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media</string>
<string name="restore_system_context">Unable to get default context for {1} -- Android may not boot.</string>
<string name="change_twrp_folder_btn">Change TWRP folder</string>
<string name="change_twrp_folder_on_process">Changing TWRP folder</string>
diff --git a/gui/theme/common/languages/id.xml b/gui/theme/common/languages/id.xml
index ef14d38..5ace582 100755
--- a/gui/theme/common/languages/id.xml
+++ b/gui/theme/common/languages/id.xml
@@ -743,7 +743,6 @@
<string name="flash_ab_both_slots">Flash ke kedua slot</string>
<string name="ozip_decrypt_decryption">Mulai mendekripsi Ozip ...</string>
<string name="ozip_decrypt_finish">Mendeskripsi Ozip selesai!</string>
- <string name="fbe_wipe_msg">PERINGATAN: {1} dihapus. Perangkat FBE harus di-boot ke Android dan bukan Recovery untuk mengatur kebijakan FBE awal setelah penghapusan.</string>
<string name="fastboot_button">Fastboot</string>
<string name="enable_adb">Aktifkan ADB</string>
<string name="enable_fastboot">Aktifkan Fastboot</string>
diff --git a/gui/theme/common/languages/nl.xml b/gui/theme/common/languages/nl.xml
index 551b0dc..37e712a 100644
--- a/gui/theme/common/languages/nl.xml
+++ b/gui/theme/common/languages/nl.xml
@@ -737,7 +737,6 @@
<string name="flash_ab_both_slots">Beide slots flashen</string>
<string name="ozip_decrypt_decryption">Ozip-ontsleutelen...</string>
<string name="ozip_decrypt_finish">Ozip-ontsleutelen gereed!</string>
- <string name="fbe_wipe_msg">WAARSCHUWING: {1} gewist. FBE-apparaat dient opgestart te worden in Android, niet Recovery, om initieel FBE-beleid in werking te zetten na het wissen.</string>
<string name="fastboot_button">Fastboot</string>
<string name="enable_adb">ADB inschakelen</string>
<string name="enable_fastboot">Fastboot inschakelen</string>
diff --git a/gui/theme/common/languages/ru.xml b/gui/theme/common/languages/ru.xml
index 6387857..37e6c0e 100644
--- a/gui/theme/common/languages/ru.xml
+++ b/gui/theme/common/languages/ru.xml
@@ -744,7 +744,6 @@
<string name="flash_ab_both_slots">Прошить в оба слота</string>
<string name="ozip_decrypt_decryption">Начало расшифровки Ozip...</string>
<string name="ozip_decrypt_finish">Расшифровка Ozip завершена!</string>
- <string name="fbe_wipe_msg">ВНИМАНИЕ: {1} очищен. Устройство необходимо перезагрузить в ОС (не в рекавери) для установки начальной политики FBE после очистки.</string>
<string name="fastboot_button">Fastboot</string>
<string name="enable_adb">Включить ADB</string>
<string name="enable_fastboot">Включить Fastboot</string>
diff --git a/partition.cpp b/partition.cpp
index 2af1bf3..5bccd40 100755
--- a/partition.cpp
+++ b/partition.cpp
@@ -2068,6 +2068,10 @@
#ifndef TW_OEM_BUILD
gui_msg("format_data_msg=You may need to reboot recovery to be able to use /data again.");
#endif
+ if (Is_FBE) {
+ gui_msg(Msg(msg::kWarning, "data_media_fbe_msg=TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media."));
+ }
+
ret = true;
if (!Key_Directory.empty())
ret = PartitionManager.Wipe_By_Path(Key_Directory);