partitionmanager: allow skipping additional fstab processing
* Set 'TW_SKIP_ADDITIONAL_FSTAB := true' to skip additional fstab
processing
* Set 'keymaster_ver' prop in device tree if you want to use a
specific keymaster version regardless of what may be found in
ramdisk manifest
(if version can't be determined by checking device manifest)
* Set above prop and add 'TW_FORCE_KEYMASTER_VER := true' if you want
to enforce keymaster_ver set in device tree and skip checking on
device
In current state, if additional fstab cannot be found, then
keymaster_ver never gets set. This breaks devices using twrp-common as
the correct service will never start for decryption, resulting in a hang
at the TWRP splash.
Separating fstab processing allows keymaster to be found on device and
keymaster_ver to be set regardless of fstab availability.
If keymaster_ver cannot be determined by checking vendor on device, use
default keymaster version set in device tree, or if not present, set
from TWRP ramdisk based on binaries found, unless values are forced as
mentioned above.
Change-Id: Ic498b82a2ff2a5461493ce4ad304f1a6679291df
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index a66f3e0..203638a 100644
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -121,8 +121,7 @@
static string Check_For_TwrpFolder(); // Gets user defined path on storage where backups should be stored
static bool Check_Xml_Format(const std::string filename); // Return whether a xml is in plain xml or ABX format
static bool Find_Fstab(string &fstab);
- static bool Get_Service_From(TWPartition *Partition, std::string Service, std::string &Ret);
- static std::string Get_Version_From_Service(std::string name);
+ static bool Get_Service_From_Manifest(std::string basepath, std::string service, std::string &ret);
static bool abx_to_xml(const std::string path, std::string &result); // could we convert abx to xml (if so, return the full path to the converted file)
private: