summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index de4549342..975d5576e 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1904,6 +1904,7 @@ bool TWPartitionManager::Enable_MTP(void) {
TWFunc::write_file("/sys/class/android_usb/android0/idVendor", vendorstr);
TWFunc::write_file("/sys/class/android_usb/android0/idProduct", productstr);
property_set("sys.usb.config", "mtp,adb");
+ usleep(2000); // Short sleep to prevent an occasional kernel panic on some devices
std::vector<TWPartition*>::iterator iter;
/* To enable MTP debug, use the twrp command line feature to
* twrp set tw_mtp_debug 1