summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'twrp.cpp')
-rw-r--r--twrp.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 88df452e7..f0e572cb0 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -315,6 +315,7 @@ int main(int argc, char **argv) {
property_get("mtp.crash_check", mtp_crash_check, "0");
if (strcmp(mtp_crash_check, "0") == 0) {
property_set("mtp.crash_check", "1");
+ property_set("sys.usb.config", "adb"); // At first boot, should be adb-only
if (DataManager::GetIntValue("tw_mtp_enabled") == 1 && ((DataManager::GetIntValue(TW_IS_ENCRYPTED) != 0 && DataManager::GetIntValue(TW_IS_DECRYPTED) != 0) || DataManager::GetIntValue(TW_IS_ENCRYPTED) == 0)) {
LOGINFO("Enabling MTP during startup\n");
if (!PartitionManager.Enable_MTP())
@@ -330,8 +331,6 @@ int main(int argc, char **argv) {
DataManager::SetValue("tw_mtp_enabled", 0);
PartitionManager.Disable_MTP();
}
-#else
- PartitionManager.Disable_MTP();
#endif
#ifndef TW_OEM_BUILD