From 6d154c4fe25d1ae0b5dafaae5eff7c0102f3362e Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 3 Sep 2014 14:19:43 -0500 Subject: Allow toggle of MTP debug Via command line in TWRP: twrp set tw_mtp_debug 1 This will enable debugging for MTP. You will need to disable and re-enable MTP in order to see the debug logging. Change-Id: Ia7bb0c584e10a4322b65ecf80a67ed7ee836b38e --- partitionmanager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 59451e3e7..a8b61c3fc 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -2171,7 +2171,10 @@ bool TWPartitionManager::Enable_MTP(void) { TWFunc::write_file("/sys/class/android_usb/android0/idProduct", productstr); property_set("sys.usb.config", "mtp,adb"); std::vector::iterator iter; - twrpMtp *mtp = new twrpMtp(); + /* To enable MTP debug, use the twrp command line feature to + * twrp set tw_mtp_debug 1 + */ + twrpMtp *mtp = new twrpMtp(DataManager::GetIntValue("tw_mtp_debug")); for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Is_Storage && (*iter)->Is_Present && (*iter)->Mount(false)) { printf("twrp mtpid: %d\n", (*iter)->mtpid); -- cgit v1.2.3