From 82fba906809fd8b2b40ebe7d0724f03f1a69e9c9 Mon Sep 17 00:00:00 2001 From: kirillsvk Date: Fri, 3 Dec 2021 22:49:50 +0700 Subject: [PATCH 01/21] Russian language: fix spaces Change-Id: I2e8a52421c4120cbdbc08de78a402c81fc3d73fd (cherry picked from commit 8d6dbd86c9bc0396b6300dd19d1a7f4d96761bfb) --- gui/theme/common/languages/ru.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/theme/common/languages/ru.xml b/gui/theme/common/languages/ru.xml index 50e33676..c61844e2 100644 --- a/gui/theme/common/languages/ru.xml +++ b/gui/theme/common/languages/ru.xml @@ -507,8 +507,8 @@ Установка завершена Ошибка распаковки образа. Ошибка перепаковки образа. - файлы рамдиска были изменены, неудалось создать рамдиск для установки, используйте fastboot boot twrp и попробуйте эту функцию снова или воспользуйтесь Установка рекавери в ramdisk. - неудалось создать рамдиск для установки. + файлы рамдиска были изменены, не удалось создать рамдиск для установки, используйте fastboot boot twrp и попробуйте эту функцию снова или воспользуйтесь Установка рекавери в ramdisk. + не удалось создать рамдиск для установки. Распаковка {1}... Перепаковка {1}... Выбор образа From cdc031971795bfe79d6e552b4dc38d9dc88bedc8 Mon Sep 17 00:00:00 2001 From: sekaiacg Date: Sat, 4 Dec 2021 20:01:46 +0800 Subject: [PATCH 02/21] twrpinstall: Remove unnecessary CloseArchive() calls The destructor MemoryPackage::~MemoryPackage() will automatically call CloseArchive(), so there is no need to repeat the operation to prevent Recovery from crashing. Change-Id: Ife5d5818bc603f8709e998b856a1e97bc365fc87 --- twrpinstall/installcommand.cpp | 2 -- twrpinstall/twinstall.cpp | 6 ------ 2 files changed, 8 deletions(-) diff --git a/twrpinstall/installcommand.cpp b/twrpinstall/installcommand.cpp index 2d2bc61e..98360141 100755 --- a/twrpinstall/installcommand.cpp +++ b/twrpinstall/installcommand.cpp @@ -66,7 +66,6 @@ bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data) { size); if (ret != 0) { printf("Failed to read metadata in update package.\n"); - CloseArchive(zip); return false; } return true; @@ -213,7 +212,6 @@ abupdate_binary_command(const char* path, int retry_count __unused, binary_entry.uncompressed_length); if (extract_ret != 0) { printf("Can't extract %s\n", AB_OTA_PAYLOAD_PROPERTIES); - CloseArchive(Zip); return false; } diff --git a/twrpinstall/twinstall.cpp b/twrpinstall/twinstall.cpp index 849b3ada..93164e19 100755 --- a/twrpinstall/twinstall.cpp +++ b/twrpinstall/twinstall.cpp @@ -71,13 +71,11 @@ enum zip_type { static int Install_Theme(const char* path, ZipArchiveHandle Zip) { #ifdef TW_OEM_BUILD // We don't do custom themes in OEM builds - CloseArchive(Zip); return INSTALL_CORRUPT; #else std::string binary_name("ui.xml"); ZipEntry binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { - CloseArchive(Zip); return INSTALL_CORRUPT; } if (!PartitionManager.Mount_Settings_Storage(true)) @@ -129,7 +127,6 @@ static int Prepare_Update_Binary(ZipArchiveHandle Zip) { } int32_t err = ExtractEntryToFile(Zip, &binary_entry, fd); if (err != 0) { - CloseArchive(Zip); LOGERR("Could not extract '%s'\n", UPDATE_BINARY_NAME); return INSTALL_ERROR; } @@ -148,7 +145,6 @@ static int Prepare_Update_Binary(ZipArchiveHandle Zip) { return INSTALL_ERROR; } if (ExtractEntryToFile(Zip, &file_contexts_entry, fd)) { - CloseArchive(Zip); LOGERR("Could not extract '%s'\n", output_filename.c_str()); return INSTALL_ERROR; } @@ -319,7 +315,6 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { // Additionally verify the compatibility of the package. if (!verify_package_compatibility(Zip)) { gui_err("zip_compatible_err=Zip Treble compatibility error!"); - CloseArchive(Zip); ret_val = INSTALL_CORRUPT; } else { ret_val = Prepare_Update_Binary(Zip); @@ -363,7 +358,6 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { LOGINFO("TWRP theme zip\n"); ret_val = Install_Theme(path, Zip); } else { - CloseArchive(Zip); ret_val = INSTALL_CORRUPT; } } From 70b83292d623b48d83cf49a59ebddf21e16ab768 Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Mon, 22 Nov 2021 22:46:43 +0800 Subject: [PATCH 03/21] libblkid: add erofs filesystem support Enhanced Read-Only File System (EROFS) has been included in Linux kernel, many Linux distributions, buildroot and Android AOSP for a while. Plus, nowadays, it's known that EROFS has been commercially used by several Android vendors for their system partitions. This patch adds support for detecting EROFS filesystem to libblkid. Since util-linux/util-linux@cd129b7 introduced blkid_probe_set_block_size function to report filesystem block size, TWRP is using blkid 2.25.0, which means blkid_probe_set_block_size wasn't supported and required, so remove the blkszbits judgement and blkid_probe_set_block_size for fixing building. Test: Add erofs mount point to twrp.flags, build and boot OP4A7A:/ # logcat | grep erofs I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (6)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43. I (6)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52. I (6)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45. I (6)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42. I (0)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38. I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (3)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52. I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (3)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43. I (2)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52. I (2)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45. I (2)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42. I (2)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38. I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. OP4A7A:/ # cat /tmp/recovery.log | grep erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Now TWRP can recognize the EROFS filesystem perfectly after setting fs in twrp.flags Signed-off-by: Gao Xiang [@pomelohan: Adapt for TWRP's libblkid version and add erofs.c to build] Co-authored-by: GarfieldHan <2652609017@qq.com> Signed-off-by: GarfieldHan <2652609017@qq.com> Change-Id: I00263757b5b6ed881165e65795ef849d86763165 --- libblkid/Android.mk | 1 + libblkid/src/superblocks/erofs.c | 71 ++++++++++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 3 +- libblkid/src/superblocks/superblocks.h | 1 + 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 libblkid/src/superblocks/erofs.c diff --git a/libblkid/Android.mk b/libblkid/Android.mk index 6bdbe355..bc797a21 100755 --- a/libblkid/Android.mk +++ b/libblkid/Android.mk @@ -146,6 +146,7 @@ LOCAL_SRC_FILES = src/cache.c \ src/superblocks/drbdproxy_datalog.c \ src/superblocks/exfat.c \ src/superblocks/ext.c \ + src/superblocks/erofs.c \ src/superblocks/f2fs.c \ src/superblocks/gfs.c \ src/superblocks/hfs.c \ diff --git a/libblkid/src/superblocks/erofs.c b/libblkid/src/superblocks/erofs.c new file mode 100644 index 00000000..0bf15913 --- /dev/null +++ b/libblkid/src/superblocks/erofs.c @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2020 Gao Xiang + * + * This file may be redistributed under the terms of the + * GNU Lesser General Public License + */ +#include +#include + +#include "superblocks.h" + +#define EROFS_SUPER_OFFSET 1024 +#define EROFS_SB_KBOFF (EROFS_SUPER_OFFSET >> 10) + +#define EROFS_SUPER_MAGIC_V1 "\xe2\xe1\xf5\xe0" +#define EROFS_MAGIC_OFF 0 + +/* All in little-endian */ +struct erofs_super_block { + uint32_t magic; + uint32_t checksum; + uint32_t feature_compat; + uint8_t blkszbits; + uint8_t reserved; + + uint16_t root_nid; + uint64_t inos; + + uint64_t build_time; + uint32_t build_time_nsec; + uint32_t blocks; + uint32_t meta_blkaddr; + uint32_t xattr_blkaddr; + uint8_t uuid[16]; + uint8_t volume_name[16]; + uint32_t feature_incompat; + uint8_t reserved2[44]; +}; + +static int probe_erofs(blkid_probe pr, const struct blkid_idmag *mag) +{ + struct erofs_super_block *sb; + + sb = blkid_probe_get_sb(pr, mag, struct erofs_super_block); + if (!sb) + return errno ? -errno : BLKID_PROBE_NONE; + + if (sb->volume_name[0]) + blkid_probe_set_label(pr, (unsigned char *)sb->volume_name, + sizeof(sb->volume_name)); + + blkid_probe_set_uuid(pr, sb->uuid); + + return BLKID_PROBE_OK; +} + +const struct blkid_idinfo erofs_idinfo = +{ + .name = "erofs", + .usage = BLKID_USAGE_FILESYSTEM, + .probefunc = probe_erofs, + .magics = + { + { + .magic = EROFS_SUPER_MAGIC_V1, + .len = 4, + .kboff = EROFS_SB_KBOFF, + .sboff = EROFS_MAGIC_OFF, + }, { NULL } + } +}; diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c index 80bd6e59..9d0d2cb1 100644 --- a/libblkid/src/superblocks/superblocks.c +++ b/libblkid/src/superblocks/superblocks.c @@ -155,7 +155,8 @@ static const struct blkid_idinfo *idinfos[] = &befs_idinfo, &nilfs2_idinfo, &exfat_idinfo, - &f2fs_idinfo + &f2fs_idinfo, + &erofs_idinfo }; /* diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h index 3bbfb9c1..808ae6a6 100644 --- a/libblkid/src/superblocks/superblocks.h +++ b/libblkid/src/superblocks/superblocks.h @@ -74,6 +74,7 @@ extern const struct blkid_idinfo nilfs2_idinfo; extern const struct blkid_idinfo exfat_idinfo; extern const struct blkid_idinfo f2fs_idinfo; extern const struct blkid_idinfo bcache_idinfo; +extern const struct blkid_idinfo erofs_idinfo; /* * superblock functions From 36cb2ad28ed99f18538921e5152627abbde08298 Mon Sep 17 00:00:00 2001 From: bigbiff Date: Thu, 9 Dec 2021 19:24:45 -0500 Subject: [PATCH 04/21] /sdcard: do not bind mount twice Change-Id: I1757eb8732a01a728392c3499ac3300c81522806 --- partition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partition.cpp b/partition.cpp index cc8fb07d..71af8490 100755 --- a/partition.cpp +++ b/partition.cpp @@ -1605,7 +1605,7 @@ bool TWPartition::Mount(bool Display_Error) { if (Removable) Update_Size(Display_Error); - if (!Symlink_Mount_Point.empty()) { + if (!Symlink_Mount_Point.empty() && Symlink_Mount_Point != "/sdcard") { if (!Bind_Mount(false)) return false; } From b3f6a264222b6b6e87d32da6c6feb65f0e635d06 Mon Sep 17 00:00:00 2001 From: GarfieldHan <2652609017@qq.com> Date: Mon, 29 Nov 2021 00:04:53 +0800 Subject: [PATCH 05/21] twrpinstall: Switch to ZipEntry64 The libziparchive TWRP using was outdated, not supported a zip size more than 4 GiB. With the development of technologies, Obviously it was not enough for ROM packages, like Xiaomi's MIUI for Vitrual A/B devices (for example Redmi K40 [alioth]) is more than 4 GiB and TWRP couldn't handle it properly. Since we have updated libziparchive to latest version, we could switch ZipEntry to ZipEntry64 so that TWRP can support a ROM package if its size more than 4 GiB. Co-authored-by: sekaiacg Signed-off-by: GarfieldHan <2652609017@qq.com> Change-Id: Iee811554bb08e02bf2bd8e9057511f36caefdc9d --- twrpinstall/ZipUtil.cpp | 2 +- twrpinstall/install.cpp | 14 +++++++------- twrpinstall/installcommand.cpp | 10 +++++----- twrpinstall/twinstall.cpp | 12 ++++++------ twrpinstall/verifier.cpp | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/twrpinstall/ZipUtil.cpp b/twrpinstall/ZipUtil.cpp index f8134bc4..f073a229 100755 --- a/twrpinstall/ZipUtil.cpp +++ b/twrpinstall/ZipUtil.cpp @@ -63,7 +63,7 @@ bool ExtractPackageRecursive(ZipArchiveHandle zip, const std::string& zip_path, } std::unique_ptr guard(cookie, EndIteration); - ZipEntry entry; + ZipEntry64 entry; ZipString name; int extractCount = 0; while (Next(cookie, &entry, &name) == 0) { diff --git a/twrpinstall/install.cpp b/twrpinstall/install.cpp index 5295405f..d270d26d 100755 --- a/twrpinstall/install.cpp +++ b/twrpinstall/install.cpp @@ -72,7 +72,7 @@ bool ReadMetadataFromPackage(ZipArchiveHandle zip, std::map guard(cookie, EndIteration); // std::vector compatibility_info; -// ZipEntry info_entry; +// ZipEntry64 info_entry; // ZipString info_name; // while (Next(cookie, &info_entry, &info_name) == 0) { // std::string content(info_entry.uncompressed_length, '\0'); diff --git a/twrpinstall/installcommand.cpp b/twrpinstall/installcommand.cpp index 98360141..ad7a7727 100755 --- a/twrpinstall/installcommand.cpp +++ b/twrpinstall/installcommand.cpp @@ -55,7 +55,7 @@ static int parse_build_number(std::string str) { bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data) { std::string binary_name(METADATA_PATH); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(zip, binary_name, &binary_entry) == 0) { long size = binary_entry.uncompressed_length; if (size <= 0) @@ -201,7 +201,7 @@ abupdate_binary_command(const char* path, int retry_count __unused, // the RAW payload offset in the zip file. // if (!Zip->EntryExists(AB_OTA_PAYLOAD_PROPERTIES)) { std::string binary_name(AB_OTA_PAYLOAD_PROPERTIES); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { printf("Can't find %s\n", AB_OTA_PAYLOAD_PROPERTIES); return INSTALL_CORRUPT; @@ -216,7 +216,7 @@ abupdate_binary_command(const char* path, int retry_count __unused, } std::string ab_ota_payload(AB_OTA_PAYLOAD); - ZipEntry ab_ota_payload_entry; + ZipEntry64 ab_ota_payload_entry; if (FindEntry(Zip, ab_ota_payload, &ab_ota_payload_entry) != 0) { printf("Can't find %s\n", AB_OTA_PAYLOAD); return INSTALL_CORRUPT; @@ -277,7 +277,7 @@ bool verify_package_compatibility(ZipArchiveHandle zw) { static constexpr const char* COMPATIBILITY_ZIP_ENTRY = "compatibility.zip"; std::string compatibility_entry_name(COMPATIBILITY_ZIP_ENTRY); - ZipEntry compatibility_entry; + ZipEntry64 compatibility_entry; if (FindEntry(zw, compatibility_entry_name, &compatibility_entry) != 0) { printf("Package doesn't contain %s entry\n", COMPATIBILITY_ZIP_ENTRY); return true; @@ -311,7 +311,7 @@ bool verify_package_compatibility(ZipArchiveHandle zw) { std::unique_ptr guard(cookie, EndIteration); std::vector compatibility_info; - ZipEntry info_entry; + ZipEntry64 info_entry; std::string info_name; while (Next(cookie, &info_entry, &info_name) == 0) { std::string content(info_entry.uncompressed_length, '\0'); diff --git a/twrpinstall/twinstall.cpp b/twrpinstall/twinstall.cpp index 93164e19..e1f84150 100755 --- a/twrpinstall/twinstall.cpp +++ b/twrpinstall/twinstall.cpp @@ -74,7 +74,7 @@ static int Install_Theme(const char* path, ZipArchiveHandle Zip) { return INSTALL_CORRUPT; #else std::string binary_name("ui.xml"); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { return INSTALL_CORRUPT; } @@ -106,7 +106,7 @@ static int Prepare_Update_Binary(ZipArchiveHandle Zip) { std::vector::iterator arch; std::string base_name = UPDATE_BINARY_NAME; base_name += "-"; - ZipEntry binary_entry; + ZipEntry64 binary_entry; std::string update_binary_string(UPDATE_BINARY_NAME); if (FindEntry(Zip, update_binary_string, &binary_entry) != 0) { for (arch = split.begin(); arch != split.end(); arch++) { @@ -133,7 +133,7 @@ static int Prepare_Update_Binary(ZipArchiveHandle Zip) { // If exists, extract file_contexts from the zip file std::string file_contexts("file_contexts"); - ZipEntry file_contexts_entry; + ZipEntry64 file_contexts_entry; if (FindEntry(Zip, file_contexts, &file_contexts_entry) != 0) { LOGINFO("Zip does not contain SELinux file_contexts file in its root.\n"); } else { @@ -309,7 +309,7 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { time(&start); std::string update_binary_name(UPDATE_BINARY_NAME); - ZipEntry update_binary_entry; + ZipEntry64 update_binary_entry; if (FindEntry(Zip, update_binary_name, &update_binary_entry) == 0) { LOGINFO("Update binary zip\n"); // Additionally verify the compatibility of the package. @@ -323,7 +323,7 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { } } else { std::string ab_binary_name(AB_OTA); - ZipEntry ab_binary_entry; + ZipEntry64 ab_binary_entry; if (FindEntry(Zip, ab_binary_name, &ab_binary_entry) == 0) { LOGINFO("AB zip\n"); gui_msg(Msg(msg::kHighlight, "flash_ab_inactive=Flashing A/B zip to inactive slot: {1}")(PartitionManager.Get_Active_Slot_Display()=="A"?"B":"A")); @@ -353,7 +353,7 @@ int TWinstall_zip(const char* path, int* wipe_cache, bool check_for_digest) { } } else { std::string binary_name("ui.xml"); - ZipEntry binary_entry; + ZipEntry64 binary_entry; if (FindEntry(Zip, binary_name, &binary_entry) != 0) { LOGINFO("TWRP theme zip\n"); ret_val = Install_Theme(path, Zip); diff --git a/twrpinstall/verifier.cpp b/twrpinstall/verifier.cpp index 1fa8279a..02ec987d 100755 --- a/twrpinstall/verifier.cpp +++ b/twrpinstall/verifier.cpp @@ -328,7 +328,7 @@ static std::vector IterateZipEntriesAndSearchForKeys(const ZipArchi std::vector result; std::string_view name; - ZipEntry entry; + ZipEntry64 entry; while ((iter_status = Next(cookie, &entry, &name)) == 0) { std::vector pem_content(entry.uncompressed_length); if (int32_t extract_status = From cd1f4cac6fddd1472adaa6db1a8be5aa99d8df54 Mon Sep 17 00:00:00 2001 From: luoqiangwei1 Date: Thu, 16 Sep 2021 18:25:23 +0800 Subject: [PATCH 06/21] Fix the fuse error that cannot handle the OTA package larger than 4 GiB 1. That read data will be blocked when adb sideload OTA package 2. An error(Out of bound read) occurs when installing OTA package by fuse Test: as follows - adb sideload OTA package - install OTA package by install_with_fuse parameter Change-Id: Ie53510d157f6ea4c92606b289fcb745d441918c8 Signed-off-by: luoqiangwei1 Signed-off-by: GarfieldHan <2652609017@qq.com> --- fuse_sideload/fuse_sideload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuse_sideload/fuse_sideload.cpp b/fuse_sideload/fuse_sideload.cpp index 3d948030..07cbe96f 100644 --- a/fuse_sideload/fuse_sideload.cpp +++ b/fuse_sideload/fuse_sideload.cpp @@ -225,7 +225,7 @@ static int handle_release(void* /* data */, fuse_data* /* fd */, const fuse_in_h // Fetch a block from the host into fd->curr_block and fd->block_data. // Returns 0 on successful fetch, negative otherwise. -static int fetch_block(fuse_data* fd, uint32_t block) { +static int fetch_block(fuse_data* fd, uint64_t block) { if (block == fd->curr_block) { return 0; } From a202b5aa32c10ccb64603d75157817ab13144751 Mon Sep 17 00:00:00 2001 From: sekaiacg Date: Sat, 11 Dec 2021 09:28:55 +0800 Subject: [PATCH 07/21] recovery: Fix the crash caused by StartIteration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the new version of libziparchive, the default values ​​of the optional_prefix and optional_suffix parameters of the StartIteration function are changed to empty strings, and nullptr is no longer detected. Change-Id: I66ee58a9515586700b10a3d5aa5b780a6207b33c --- install/ZipUtil.cpp | 2 +- twrpinstall/ZipUtil.cpp | 2 +- twrpinstall/installcommand.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/ZipUtil.cpp b/install/ZipUtil.cpp index 75acad9d..690942ac 100755 --- a/install/ZipUtil.cpp +++ b/install/ZipUtil.cpp @@ -56,7 +56,7 @@ bool ExtractPackageRecursive(ZipArchiveHandle zip, const std::string& zip_path, } const std::string zip_prefix(prefix_path.c_str()); - int ret = StartIteration(zip, &cookie, zip_prefix, nullptr); + int ret = StartIteration(zip, &cookie, zip_prefix); if (ret != 0) { LOG(ERROR) << "failed to start iterating zip entries."; diff --git a/twrpinstall/ZipUtil.cpp b/twrpinstall/ZipUtil.cpp index f073a229..321e7a4f 100755 --- a/twrpinstall/ZipUtil.cpp +++ b/twrpinstall/ZipUtil.cpp @@ -56,7 +56,7 @@ bool ExtractPackageRecursive(ZipArchiveHandle zip, const std::string& zip_path, } const ZipString zip_prefix(prefix_path.c_str()); - int ret = StartIteration(zip, &cookie, &zip_prefix, nullptr); + int ret = StartIteration(zip, &cookie, &zip_prefix); if (ret != 0) { LOG(ERROR) << "failed to start iterating zip entries."; return false; diff --git a/twrpinstall/installcommand.cpp b/twrpinstall/installcommand.cpp index ad7a7727..d577b383 100755 --- a/twrpinstall/installcommand.cpp +++ b/twrpinstall/installcommand.cpp @@ -302,7 +302,7 @@ bool verify_package_compatibility(ZipArchiveHandle zw) { // Iterate all the entries inside COMPATIBILITY_ZIP_ENTRY and read the contents. void* cookie; - ret = StartIteration(zip_handle, &cookie, nullptr, nullptr); + ret = StartIteration(zip_handle, &cookie); if (ret != 0) { printf("Failed to start iterating zip entries: %s\n", ErrorCodeString(ret)); CloseArchive(zip_handle); From 37920d9d6ea3f29f9e8d910fa0b41260159cb6f7 Mon Sep 17 00:00:00 2001 From: Magendanz Date: Sun, 12 Dec 2021 14:53:41 -0800 Subject: [PATCH 08/21] Replacing format string with one appropriate for 32-bit or 64-bit size. Change-Id: I280f38ce000a5231795953b251ba2123545903ae --- kernel_module_loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel_module_loader.cpp b/kernel_module_loader.cpp index 7baf1f21..1f30d0df 100644 --- a/kernel_module_loader.cpp +++ b/kernel_module_loader.cpp @@ -91,7 +91,7 @@ std::vector KernelModuleLoader::Skip_Loaded_Kernel_Modules() { std::string kernel_module_file = "/proc/modules"; if (TWFunc::read_file(kernel_module_file, loaded_modules) < 0) LOGINFO("failed to get loaded kernel modules\n"); - LOGINFO("number of modules loaded by init: %lu\n", loaded_modules.size()); + LOGINFO("number of modules loaded by init: %zu\n", loaded_modules.size()); if (loaded_modules.size() == 0) return kernel_modules; for (auto&& module_line:loaded_modules) { From 4076a67cd3b101999a2a852979f95c44425d36d0 Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Fri, 10 Dec 2021 15:31:48 -0500 Subject: [PATCH 09/21] postrecoveryboot: rename script to reflect recovery mode Change-Id: Ifb9d64a2bec118592523682749093bf894ec2cbe --- twrp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twrp.cpp b/twrp.cpp index 5cb2209b..aa09e2cd 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -201,7 +201,7 @@ static void process_recovery_mode(twrpAdbBuFifo* adb_bu_fifo, bool skip_decrypti // Check for and run startup script if script exists TWFunc::check_and_run_script("/system/bin/runatboot.sh", "boot"); - TWFunc::check_and_run_script("/system/bin/postrecoveryboot.sh", "boot"); + TWFunc::check_and_run_script("/system/bin/postrecoveryboot.sh", "recovery"); #ifdef TW_INCLUDE_INJECTTWRP // Back up TWRP Ramdisk if needed: From b20dfaa26d35aa1be55ca96674975203b4a4e355 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Thu, 16 Dec 2021 16:56:26 +0800 Subject: [PATCH 10/21] partitionmanager: Use boot HIDL to switch active slots Change-Id: I7009380d7736f71e63d5558b6a447961cc1075c7 --- partitionmanager.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/partitionmanager.cpp b/partitionmanager.cpp index e0bd0054..8d1b6c43 100755 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -110,8 +110,9 @@ extern "C" { #endif #ifdef AB_OTA_UPDATER -#include -#include +#include +using android::hardware::boot::V1_0::CommandResult; +using android::hardware::boot::V1_0::IBootControl; #endif using android::fs_mgr::DestroyLogicalPartition; @@ -3128,19 +3129,17 @@ void TWPartitionManager::Set_Active_Slot(const string& Slot) { LOGINFO("Setting active slot %s\n", Slot.c_str()); #ifdef AB_OTA_UPDATER if (!Active_Slot_Display.empty()) { - const hw_module_t *hw_module; - boot_control_module_t *module; - int ret; - ret = hw_get_module("bootctrl", &hw_module); - if (ret != 0) { + android::sp module = IBootControl::getService(); + if (module == nullptr) { LOGERR("Error getting bootctrl module.\n"); } else { - module = (boot_control_module_t*) hw_module; - module->init(module); - int slot_number = 0; + uint32_t slot_number = 0; if (Slot == "B") slot_number = 1; - if (module->setActiveBootSlot(module, slot_number)) + CommandResult result; + auto ret = module->setActiveBootSlot(slot_number, [&result] + (const CommandResult &cb_result) { result = cb_result; }); + if (!ret.isOk() || !result.success) gui_msg(Msg(msg::kError, "unable_set_boot_slot=Error changing bootloader boot slot to {1}")(Slot)); } DataManager::SetValue("tw_active_slot", Slot); // Doing this outside of this if block may result in a seg fault because the DataManager may not be ready yet From a42c10d156b5df13201690afed8d2d6303f43ddb Mon Sep 17 00:00:00 2001 From: Adithya R Date: Sat, 18 Dec 2021 23:55:04 +0530 Subject: [PATCH 11/21] sepolicy: twrp: Mark ueventd as permissive * required to load fw from non-hlos Change-Id: I4ee82c7cd405d91d3a4e70c75591631c236bd94d --- sepolicy/twrp.te | 1 + 1 file changed, 1 insertion(+) diff --git a/sepolicy/twrp.te b/sepolicy/twrp.te index 5ed1e886..d51cd62c 100755 --- a/sepolicy/twrp.te +++ b/sepolicy/twrp.te @@ -5,6 +5,7 @@ recovery_only(` permissive adbd; permissive fastbootd; permissive postinstall; + permissive ueventd; allow kernel unlabeled:file rw_file_perms; allow kernel tmpfs:file { read }; allow kernel recovery:fd { use }; From 7007c999f905cfe30cd961fbebed95c230fe5498 Mon Sep 17 00:00:00 2001 From: nebrassy Date: Mon, 20 Dec 2021 20:09:40 +0100 Subject: [PATCH 12/21] correct condition for change TWRP folder Change-Id: I3549d3be3bf2d4557055b9ca48a84f88db44eca7 --- gui/theme/common/landscape.xml | 2 +- gui/theme/common/portrait.xml | 2 +- gui/theme/common/watch.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 5b252b60..16546941 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -3746,7 +3746,7 @@ - + changeTwrpFolder diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index d3dba414..9abea7aa 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -3863,7 +3863,7 @@ - + changeTwrpFolder diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml index fd656191..0b0080a4 100755 --- a/gui/theme/common/watch.xml +++ b/gui/theme/common/watch.xml @@ -4354,7 +4354,7 @@ - + changeTwrpFolder From 740d852518edd73bbd8accd3f857756ed5f0f1ca Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Wed, 29 Dec 2021 10:56:48 -0500 Subject: [PATCH 13/21] vold_decrypt: only include patch_level functions with libresetprop The functions use the Property_Override function from libresetprop, so don't include if libresetprop isn't included in build Change-Id: I5eb210f17fea908ec35cb223e4a55066419f55dc --- crypto/vold_decrypt/vold_decrypt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/vold_decrypt/vold_decrypt.cpp b/crypto/vold_decrypt/vold_decrypt.cpp index 4a76405d..2a0e1fbd 100755 --- a/crypto/vold_decrypt/vold_decrypt.cpp +++ b/crypto/vold_decrypt/vold_decrypt.cpp @@ -780,6 +780,7 @@ void Set_Needed_Properties(void) { property_set("vendor.sys.listeners.registered", "false"); } +#ifdef TW_INCLUDE_LIBRESETPROP // Patch_Level_Overrides void Update_Patch_Level(void) { // On Oreo and above, keymaster requires Android version & patch level to match installed system string sdkverstr = TWFunc::System_Property_Get("ro.build.version.sdk"); @@ -901,6 +902,7 @@ void Revert_Patch_Level(void) { return; } } +#endif // Patch_Level_Overrides static unsigned int get_blkdev_size(int fd) { unsigned long nr_sec; From a84acc7fa5b7b9d2f3ad3168839d52ef56fce2c4 Mon Sep 17 00:00:00 2001 From: bigbiff Date: Thu, 23 Dec 2021 19:58:22 -0500 Subject: [PATCH 14/21] fscrypt v1: support legacy ioctl Crosshatch uses a legacy ioctl for setting and getting fscrypt policies. If the device is legacy, we will use the legacy ioctl. Change-Id: I5c2e068f166b89fe9f7839a6d6a9533e49fc5b07 --- crypto/fscrypt/fscrypt_policy.cpp | 46 +++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/crypto/fscrypt/fscrypt_policy.cpp b/crypto/fscrypt/fscrypt_policy.cpp index 9ca3ed4f..c4986e57 100755 --- a/crypto/fscrypt/fscrypt_policy.cpp +++ b/crypto/fscrypt/fscrypt_policy.cpp @@ -33,6 +33,7 @@ #include #include #include +#include "KeyUtil.h" #include "fscrypt_policy.h" @@ -144,14 +145,22 @@ extern "C" bool fscrypt_policy_set_struct(const char *directory, const struct fs #endif int fd = open(directory, O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); if (fd == -1) { - printf("failed to open %s\n", directory); + printf("failed to open %s\n", directory); PLOG(ERROR) << "Failed to open directory " << directory; return false; } - if (ioctl(fd, FS_IOC_SET_ENCRYPTION_POLICY, fep)) { - PLOG(ERROR) << "Failed to set encryption policy for " << directory; - close(fd); - return false; + if (isFsKeyringSupported()) { + if (ioctl(fd, FS_IOC_SET_ENCRYPTION_POLICY, fep)) { + PLOG(ERROR) << "Failed to set encryption policy for " << directory; + close(fd); + return false; + } + } else { + if (ioctl(fd, FS_IOC_SET_ENCRYPTION_POLICY, fep)) { + PLOG(ERROR) << "Failed to set encryption policy for " << directory; + close(fd); + return false; + } } close(fd); return true; @@ -172,19 +181,28 @@ extern "C" bool fscrypt_policy_get_struct(const char *directory, struct fscrypt_ #else memset(fep, 0, sizeof(fscrypt_policy_v2)); #endif - struct fscrypt_get_policy_ex_arg ex_policy = {0}; - ex_policy.policy_size = sizeof(ex_policy.policy); - if (ioctl(fd, FS_IOC_GET_ENCRYPTION_POLICY_EX, &ex_policy) != 0) { - PLOG(ERROR) << "Failed to get encryption policy for " << directory; - close(fd); - return false; - } + + if (isFsKeyringSupported()) { + ex_policy.policy_size = sizeof(ex_policy.policy); + if (ioctl(fd, FS_IOC_GET_ENCRYPTION_POLICY_EX, &ex_policy) != 0) { + PLOG(ERROR) << "Failed to get encryption policy for " << directory; + close(fd); + return false; + } #ifdef USE_FSCRYPT_POLICY_V1 - memcpy(fep, &ex_policy.policy.v1, sizeof(ex_policy.policy.v1)); + memcpy(fep, &ex_policy.policy.v1, sizeof(ex_policy.policy.v1)); #else - memcpy(fep, &ex_policy.policy.v2, sizeof(ex_policy.policy.v2)); + memcpy(fep, &ex_policy.policy.v2, sizeof(ex_policy.policy.v2)); #endif + } else { + if (ioctl(fd, FS_IOC_GET_ENCRYPTION_POLICY, &ex_policy.policy.v1) != 0) { + PLOG(ERROR) << "Failed to get encryption policy for " << directory; + close(fd); + return false; + } + memcpy(fep, &ex_policy.policy.v1, sizeof(ex_policy.policy.v1)); + } close(fd); return true; } From 922b121f31ae20f6835bc9730a99bc48e000102e Mon Sep 17 00:00:00 2001 From: bigbiff Date: Sat, 25 Dec 2021 15:43:34 -0500 Subject: [PATCH 15/21] libresetprop: use the latest header Change-Id: I24656393cc84b1a978338fa587c535797d81c2a9 --- twrp-functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twrp-functions.cpp b/twrp-functions.cpp index b1e9b26b..06619170 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -63,7 +63,7 @@ extern "C" { } #ifdef TW_INCLUDE_LIBRESETPROP - #include + #include #endif struct selabel_handle *selinux_handle; From a185252c8e6d624587bc3d17f005cc122bda6cf7 Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Fri, 31 Dec 2021 21:35:52 -0500 Subject: [PATCH 16/21] System_Property_Get: Allow specifying multiple prop file paths Some OEMs include prop files in custom locations. Add these to a list and parse when setting properties. Use the flag TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS followed by a semi-colon-separated list of paths (relative to /system) where the additional prop files can be found. The standard build.prop file does not need to be specified and will always be parsed. Example: TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS := etc/buildinfo/oem_build.prop;etc/prop.default Change-Id: Ie0e25c7d2575d928310ff1b4fc1aef44a83784ca --- Android.mk | 4 ++++ twrp-functions.cpp | 14 ++++++++------ twrp-functions.hpp | 2 +- twrp.cpp | 25 +++++++++++++++++-------- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/Android.mk b/Android.mk index c5b1f2cd..167ad4ff 100755 --- a/Android.mk +++ b/Android.mk @@ -166,6 +166,10 @@ ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true) endif endif +ifneq ($(TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS),) + LOCAL_CFLAGS += -DTW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS='"$(TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS)"' +endif + ifeq ($(TW_USES_VENDOR_LIBS),true) LOCAL_CFLAGS += -DUSE_VENDOR_LIBS=1 endif diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 06619170..a53ccc02 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -855,20 +855,22 @@ string TWFunc::Get_Current_Date() { } string TWFunc::System_Property_Get(string Prop_Name) { - return System_Property_Get(Prop_Name, PartitionManager, PartitionManager.Get_Android_Root_Path()); + return System_Property_Get(Prop_Name, PartitionManager, PartitionManager.Get_Android_Root_Path(), ""); } -string TWFunc::System_Property_Get(string Prop_Name, TWPartitionManager &PartitionManager, string Mount_Point) { +string TWFunc::System_Property_Get(string Prop_Name, TWPartitionManager &PartitionManager, string Mount_Point, string prop_file_name) { bool mount_state = PartitionManager.Is_Mounted_By_Path(Mount_Point); std::vector buildprop; string propvalue; if (!PartitionManager.Mount_By_Path(Mount_Point, true)) return propvalue; - string prop_file = Mount_Point + "/build.prop"; - if (!TWFunc::Path_Exists(prop_file)) - prop_file = Mount_Point + "/system/build.prop"; // for devices with system as a root file system (e.g. Pixel) + string prop_file = Mount_Point + "/system/" + prop_file_name; + if (!TWFunc::Path_Exists(prop_file)) { + LOGINFO("Unable to locate file: %s\n", prop_file.c_str()); + return propvalue; + } if (TWFunc::read_file(prop_file, buildprop) != 0) { - LOGINFO("Unable to open build.prop for getting '%s'.\n", Prop_Name.c_str()); + LOGINFO("Unable to open %s for getting '%s'.\n", prop_file_name.c_str(), Prop_Name.c_str()); DataManager::SetValue(TW_BACKUP_NAME, Get_Current_Date()); if (!mount_state) PartitionManager.UnMount_By_Path(Mount_Point, false); diff --git a/twrp-functions.hpp b/twrp-functions.hpp index 89311a2b..01afb7aa 100755 --- a/twrp-functions.hpp +++ b/twrp-functions.hpp @@ -96,7 +96,7 @@ public: static bool write_to_file(const string& fn, const std::vector lines); // write vector of strings line by line with newlines static bool Try_Decrypting_Backup(string Restore_Path, string Password); // true for success, false for failed to decrypt static string System_Property_Get(string Prop_Name); // Returns value of Prop_Name from reading /system/build.prop - static string System_Property_Get(string Prop_Name, TWPartitionManager &PartitionManager, string Mount_Point); // Returns value of Prop_Name from reading /system/build.prop + static string System_Property_Get(string Prop_Name, TWPartitionManager &PartitionManager, string Mount_Point, string prop_file_name); // Returns value of Prop_Name from reading provided prop file static string Get_Current_Date(void); // Returns the current date in ccyy-m-dd--hh-nn-ss format static void Auto_Generate_Backup_Name(); // Populates TW_BACKUP_NAME with a backup name based on current date and ro.build.display.id from /system/build.prop static void Fixup_Time_On_Boot(const string& time_paths = ""); // Fixes time on devices which need it (time_paths is a space separated list of paths to check for ats_* files) diff --git a/twrp.cpp b/twrp.cpp index aa09e2cd..4a7a3373 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -174,6 +174,11 @@ static void process_recovery_mode(twrpAdbBuFifo* adb_bu_fifo, bool skip_decrypti } else { stringstream override_props(EXPAND(TW_OVERRIDE_SYSTEM_PROPS)); string current_prop; + std::vector build_prop_list = {"build.prop"}; +#ifdef TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS + std::vector additional_build_prop_list = TWFunc::Split_String(TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS, ";"); + build_prop_list.insert(build_prop_list.end(), additional_build_prop_list.begin(), additional_build_prop_list.end()); +#endif while (getline(override_props, current_prop, ';')) { string other_prop; if (current_prop.find("=") != string::npos) { @@ -184,15 +189,19 @@ static void process_recovery_mode(twrpAdbBuFifo* adb_bu_fifo, bool skip_decrypti } other_prop = android::base::Trim(other_prop); current_prop = android::base::Trim(current_prop); - string sys_val = TWFunc::System_Property_Get(other_prop, PartitionManager, PartitionManager.Get_Android_Root_Path().c_str()); - if (!sys_val.empty()) { - LOGINFO("Overriding %s with value: \"%s\" from system property %s\n", current_prop.c_str(), sys_val.c_str(), other_prop.c_str()); - int error = TWFunc::Property_Override(current_prop, sys_val); - if (error) { - LOGERR("Failed overriding property %s, error_code: %d\n", current_prop.c_str(), error); + + for (auto&& prop_file:build_prop_list) { + string sys_val = TWFunc::System_Property_Get(other_prop, PartitionManager, PartitionManager.Get_Android_Root_Path().c_str(), prop_file); + if (!sys_val.empty()) { + LOGINFO("Overriding %s with value: \"%s\" from system property %s from %s\n", current_prop.c_str(), sys_val.c_str(), other_prop.c_str(), prop_file.c_str()); + int error = TWFunc::Property_Override(current_prop, sys_val); + if (error) { + LOGERR("Failed overriding property %s, error_code: %d\n", current_prop.c_str(), error); + } + break; + } else { + LOGINFO("Not overriding %s with empty value from system property %s from %s\n", current_prop.c_str(), other_prop.c_str(), prop_file.c_str()); } - } else { - LOGINFO("Not overriding %s with empty value from system property %s\n", current_prop.c_str(), other_prop.c_str()); } } PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), false); From 546ebc391d621b4cabd4e521d47a38cf3140b43b Mon Sep 17 00:00:00 2001 From: theincognito-inc Date: Sat, 25 Dec 2021 18:40:38 +0530 Subject: [PATCH 17/21] Change TWRP nano TERM env variable from pcansi to bg1.25 pcansi TERM has always had some display and/or scrolling (up, down, left or right) issues in nano on TWRP's embedded Terminal. Most frequently seen is misaligned/displaced text on long lines and files, either initially or once scrolled through. bg1.25 seems to be the most compatible TERM for all devices currently. Change-Id: If00a8352ca3576085f69c12dffb5b21637c7b21c --- etc/init/nano.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/init/nano.rc b/etc/init/nano.rc index f57f6564..daf82156 100644 --- a/etc/init/nano.rc +++ b/etc/init/nano.rc @@ -1,3 +1,3 @@ on fs export TERMINFO /system/etc/terminfo - export TERM pcansi + export TERM bg1.25 From 086358633e68a4ddbd3a4068499cf681dd7ab34d Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Wed, 5 Jan 2022 18:58:19 -0500 Subject: [PATCH 18/21] System_Property_Get: Set default path for build.prop Change-Id: I5f4fa7150c025033eca29bf4fe3fe3f908f18e5e --- twrp-functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twrp-functions.cpp b/twrp-functions.cpp index a53ccc02..350d840f 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -855,7 +855,7 @@ string TWFunc::Get_Current_Date() { } string TWFunc::System_Property_Get(string Prop_Name) { - return System_Property_Get(Prop_Name, PartitionManager, PartitionManager.Get_Android_Root_Path(), ""); + return System_Property_Get(Prop_Name, PartitionManager, PartitionManager.Get_Android_Root_Path(), "build.prop"); } string TWFunc::System_Property_Get(string Prop_Name, TWPartitionManager &PartitionManager, string Mount_Point, string prop_file_name) { From cf77cb357c3171df2f1461ee600c7f548d32bca7 Mon Sep 17 00:00:00 2001 From: sekaiacg Date: Mon, 6 Dec 2021 12:27:46 +0800 Subject: [PATCH 19/21] keymaster restore: Do not enter the keymaster_restore page repeatedly Change-Id: I0c7ca541d52d923067537adb561ca5a61bde7f08 --- gui/theme/common/landscape.xml | 2 +- gui/theme/common/portrait.xml | 2 +- gui/theme/common/watch.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 16546941..4b09ede9 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -2233,7 +2233,7 @@ - tw_multiuser_warning_destination=restore + tw_multiuser_warning_destination=restore_force multiuser_warning diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index 9abea7aa..db8ea38d 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -2395,7 +2395,7 @@ - tw_multiuser_warning_destination=restore + tw_multiuser_warning_destination=restore_force multiuser_warning diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml index 0b0080a4..335a31d7 100755 --- a/gui/theme/common/watch.xml +++ b/gui/theme/common/watch.xml @@ -2746,7 +2746,7 @@ - tw_multiuser_warning_destination=restore + tw_multiuser_warning_destination=restore_force multiuser_warning From 2e5abc3eccb9045119ae94a559142bc5691f1476 Mon Sep 17 00:00:00 2001 From: Captain Throwback Date: Mon, 10 Jan 2022 12:55:05 -0500 Subject: [PATCH 20/21] gui: fix restore_keymaster page in landscape and watch themes Change-Id: If182e7fc7c50b063542c9a4a058a599f05c8e685 --- gui/theme/common/landscape.xml | 33 ++++++++++++++++++++++----------- gui/theme/common/watch.xml | 10 +++++----- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 4b09ede9..9fb85707 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -2199,7 +2199,7 @@ - restore_pin + restore_keymaster @@ -2267,12 +2267,6 @@ select_storage - - - - restore_pin - - @@ -6108,24 +6102,24 @@ edi - +