Enable MTP using ADB

Shlok Jhawar picture Shlok Jhawar · Mar 2, 2019 · Viewed 10.4k times · Source

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.

Answer

Ender picture Ender · May 20, 2019

you lacked the "s" in "setFunctions".

 "adb shell svc usb setFunctions mtp" worked for me in Android 9 (lineage OS).