From 73da42cb6eb9f036140444758c35766c353ee65d Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 3 Sep 2014 11:30:33 -0500 Subject: Ensure that MTP is enabled by default Change-Id: Ibd644509935cde1e52b3d368060fdcb6e16f4a99 --- twrp.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'twrp.cpp') diff --git a/twrp.cpp b/twrp.cpp index 5f58e41aa..469e08081 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -270,6 +270,13 @@ int main(int argc, char **argv) { } // Read the settings file +#ifdef TW_HAS_MTP + // We unmount partitions sometimes during early boot which may override + // the default of MTP being enabled by auto toggling MTP off. This + // will force it back to enabled then get overridden by the settings + // file, assuming that an entry for tw_mtp_enabled is set. + DataManager::SetValue("tw_mtp_enabled", 1); +#endif DataManager::ReadSettingsFile(); // Fixup the RTC clock on devices which require it -- cgit v1.2.3