From eb32b1ff00878e7b01453450fcd04ecb9fcbba52 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Mon, 18 May 2015 10:23:03 -0500 Subject: Mount system as read-only by default Mounting system as rw can prevent future OTA updates. The purpose of this patch set is to prevent TWRP from mounting sytem as rw on the first boot. Device maintainers should update their twrp.fstab files on these devices to include an additional line: /system_image emmc /dev/block/../system This line will allow TWRP to create a raw system image backup to ensure that the user can return to an original state for future OTA updates. Change-Id: I8929d85bc3a5b96cc564bc7f734b58d5612ec833 --- partitions.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'partitions.hpp') diff --git a/partitions.hpp b/partitions.hpp index f74fac9a1..1489a8ec2 100644 --- a/partitions.hpp +++ b/partitions.hpp @@ -70,6 +70,8 @@ public: bool Update_Size(bool Display_Error); // Updates size information void Recreate_Media_Folder(); // Recreates the /data/media folder bool Flash_Image(string Filename); // Flashes an image to the partition + void Change_Mount_Read_Only(bool new_value); // Changes Mount_Read_Only to new_value + int Check_Lifetime_Writes(); public: string Current_File_System; // Current file system @@ -167,6 +169,7 @@ private: bool Ignore_Blkid; // Ignore blkid results due to superblocks lying to us on certain devices / partitions bool Retain_Layout_Version; // Retains the .layout_version file during a wipe (needed on devices like Sony Xperia T where /data and /data/media are separate partitions) bool Can_Flash_Img; // Indicates if this partition can have images flashed to it via the GUI + bool Mount_Read_Only; // Only mount this partition as read-only friend class TWPartitionManager; friend class DataManager; -- cgit v1.2.3