iusmac/recovery_rova

Survive dirty flashing if /data is FBE

Closed this issue · 2 comments

Problem:
If the user dirty flash the fileencryption flag in /vendor/etc/fstab.qcom will vanish, but /data will still be FBE encrypted.

Requires manual enabling at the moment:

$ FBEToggler 1

How to detect if /data is FBE from ORFX sources:

partitionmanager.cpp:4353
 // FBE only
 if (TWFunc::Path_Exists("/data/unencrypted/key/version") || DataManager::GetIntValue(TW_IS_FBE) == 1)
	return true;

Can be triggered on post zip install:

// orangefox.cpp:954
TWFunc::RunFoxScript("/sbin/afterromflash.sh");