summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitionmanager.cpp')
-rwxr-xr-xpartitionmanager.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index b8a95ff26..32a568898 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -55,9 +55,15 @@
#include "adbbu/libtwadbbu.hpp"
#ifdef TW_HAS_MTP
-#include "mtp/mtp_MtpServer.hpp"
-#include "mtp/twrpMtp.hpp"
-#include "mtp/MtpMessage.hpp"
+#ifdef TW_HAS_LEGACY_MTP
+#include "mtp/legacy/mtp_MtpServer.hpp"
+#include "mtp/legacy/twrpMtp.hpp"
+#include "mtp/legacy/MtpMessage.hpp"
+#else
+#include "mtp/ffs/mtp_MtpServer.hpp"
+#include "mtp/ffs/twrpMtp.hpp"
+#include "mtp/ffs/MtpMessage.hpp"
+#endif
#endif
extern "C" {
@@ -2315,6 +2321,7 @@ void TWPartitionManager::Add_All_MTP_Storage(void) {
bool TWPartitionManager::Disable_MTP(void) {
char old_value[PROPERTY_VALUE_MAX];
+ property_set("sys.usb.ffs.mtp.ready", "0");
property_get("sys.usb.config", old_value, "");
if (strcmp(old_value, "adb") != 0) {
char vendor[PROPERTY_VALUE_MAX];