summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-09-03 18:30:33 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-09-03 18:30:33 +0200
commit73da42cb6eb9f036140444758c35766c353ee65d (patch)
treedc859d03a2e9c59327202a62f00b1fabb33b4d1d /twrp.cpp
parentOnly use SELinux tools from toolbox if not in busybox (diff)
downloadandroid_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.tar
android_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.tar.gz
android_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.tar.bz2
android_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.tar.lz
android_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.tar.xz
android_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.tar.zst
android_bootable_recovery-73da42cb6eb9f036140444758c35766c353ee65d.zip
Diffstat (limited to 'twrp.cpp')
-rw-r--r--twrp.cpp7
1 files changed, 7 insertions, 0 deletions
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