How do I enable MTP mode on an Android phone, solely using ADB on the command line? The screen cannot be used and I need to access files. I have USB debugging enabled, though.
adb shell svc usb setFunction mtp
does not work.
How do I enable MTP mode on an Android phone, solely using ADB on the command line? The screen cannot be used and I need to access files. I have USB debugging enabled, though.
adb shell svc usb setFunction mtp
does not work.
you lacked the "s" in "setFunctions".
"adb shell svc usb setFunctions mtp" worked for me in Android 9 (lineage OS).
On android 9.0:
adb shell svc usb setFunctions mtp true
The final parameter "true" on the end is optional but false by default as stated in the adb output:
Sets the functions which, if the device was charging, become current onscreen unlock. If function is blank, turn off this feature.