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
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 59451e3..a8b61c3 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -2171,7 +2171,10 @@
TWFunc::write_file("/sys/class/android_usb/android0/idProduct", productstr);
property_set("sys.usb.config", "mtp,adb");
std::vector<TWPartition*>::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);