That may be the issue why I can't see my captured videos from my phone when connected to my pc. How do I access PTP and MTP modes? Can't see any options in settings.
You can do that via adb or a terminal app (in the latter case, ommit the leading
adb shell from the examples):
- read settings:
adb shell getprop sys.usb.config
- find valid settings:
adb shell grep usb.config= /init*rc
- change settings:
setpropwith the appropriate values (e.g.
adb shell setprop sys.usb.config "mtp,adb"or
adb shell setprop sys.usb.config "ptp,adb")
EDIT: If the above doesn't yield the expected results, it might need root powers. So if your device is rooted, you could try to run
adb root prior to above commands. If your device does not accept this ("not available in production builds"), instead run:
PC> adb shell Android $ su Android #
Now at the root prompt (
#), run above commands without the
adb shell prefix (e.g. simply
setprop sys.usb.config "mtp,adb").
1Thanks for this. When I connect my device to OSX it doesn't show the USB connection type toggle, and Android File Transfer doesn't seem to work with MTP mode. This let me switch it to PTP. Aug 2, 2016 at 19:31
1Also, for completeness, you'll have to run
adb rootfirst to have the permission to change the setting. May 29, 2017 at 23:29
@Ullallulloo are you sure about that? I cannot remember ever having done that. And the only times I tried, I got an error about
adb rootbeing not available "in production builds".– Izzy ♦May 30, 2017 at 6:34
@Izzy It silently fails on both my phones without that.
adb rootonly solves it on the rooted one though. The unrooted phone doesn't seem to allow me to change it over adb. May 30, 2017 at 7:10
Thanks, @Ullallulloo – adjusted my answer accordingly. Thinking about it, as I usually placed the settings directly into the proper scripts on the device, I might have executed
setpropwhile already being root – at least after the first tries to figure this out years ago ;)– Izzy ♦May 30, 2017 at 8:49
adb shell am start com.android.settings/.UsbSettingsin Command Prompt.