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, oddly.
you lacked the "s" in "setFunctions".
"adb shell svc usb setFunctions mtp" worked for me in Android 9 (lineage OS).