Shlok Jhawar
Shlok Jhawar

Reputation: 287

Enable MTP using ADB

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.

Upvotes: 4

Views: 27904

Answers (2)

Adam Higgins
Adam Higgins

Reputation: 754

On my galaxy S8 (android 9.0 i think), i used:

adb shell svc usb setFunction mtp true

once my phone had been connected to the computer and USB debugging enabled

I think the final parameter "true" on the end is optional but is false by default. I'm not exactly sure what difference it makes all I know is that without the "true" it didn't work.

Upvotes: 7

Ender
Ender

Reputation: 161

you lacked the "s" in "setFunctions".

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

Upvotes: 16

Related Questions