From d18a821e009a4e31208541d4c96cd54bd7f313ba Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Mon, 14 Dec 2015 10:17:00 -0600 Subject: Use ioctl to get block device size AMLogic based device uses paths like /dev/block/recovery and the stock init binary either deletes or does not create mmcblk0p12 which breaks TWRP because TWRP cannot match up the path / name. The ioctl method is probably more reliable anyway and certainly should be faster. Change-Id: I73f981dcec637cdf5b189bdefa00ea15b924b500 --- partitions.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'partitions.hpp') diff --git a/partitions.hpp b/partitions.hpp index ed2687090..60dc2e4de 100644 --- a/partitions.hpp +++ b/partitions.hpp @@ -99,6 +99,7 @@ private: void Setup_Image(bool Display_Error); // Sets defaults for an image partition void Setup_AndSec(void); // Sets up .android_secure settings void Find_Real_Block_Device(string& Block_Device, bool Display_Error); // Checks the block device given and follows symlinks until it gets to the real block device + unsigned long long IOCTL_Get_Block_Size(); // Finds the partition size using ioctl bool Find_Partition_Size(); // Finds the partition size from /proc/partitions unsigned long long Get_Size_Via_du(string Path, bool Display_Error); // Uses du to get sizes bool Wipe_EXT23(string File_System); // Formats as ext3 or ext2 -- cgit v1.2.3