By Naftuli Kay

2014-05-29 23:18:27 8 Comments

Is there a way to disable all USB functionality except for charging? I don't really use MTP or PTP and would like to disable it if possible.


@T.Todua 2016-05-05 17:08:03


  • then DEVELOPER OPTIONS will be added in main settings (in bottom). Enter there and choose USB SETTINGS> CHARGING|MTP.


@Aaron Gillion 2016-02-01 06:40:50

The most device-compatible way to disable everything is to run this command at startup or set this in your build.prop:

setprop persist.sys.usb.config none

which is equivalent to charge-only on all Android devices.

That also disables adb. If you use adb regularly, then:

setprop persist.sys.usb.config adb

will allow adb when developer options are turned on/checked. If you don't use ADB often, I would not recommend it, because setting adb causes my S5 to still recognize in device manager, even when it is locked.

To restore original functionality,

setprop persist.sys.usb.config mtp,ptp,adb

allows all USB protocols.

Hope this helps anyone Googling for an answer.

@Firelord 2016-02-01 13:09:51

Have you verified that these commands would work without root access?

@Aaron Gillion 2016-03-21 00:19:19

People who have custom recovery can apply a changed build.prop without root. Those who have locked bootloaders & no recovery will need root permissions.

@Izzy 2016-05-18 00:59:13

On Android 5.1.1 (CyanogenOS 12 on a Wileyfox Swift), using setprop persist.sys.usb.config adb lets adb devices show ???????????? no permissions. Played with all combinations – no way to get "charge only + adb". Must be "x,adb" (with x=mtp or ptp) to work at all. To restore, in terminal I needed root. The notification menu just grayed out when I tried re-enabling MTP from there.

@ransh 2017-02-16 13:55:12

even if it's not in startup it works, and it even persists between reboots. (becuase of the thanks

@eldarerathis 2014-05-30 00:33:27

Go to Settings → Storage and tap on the overflow menu in the top right (on a device with a physical menu key, you may need to press that instead). This should bring up a menu item labeled "USB Computer Connection":

enter image description here

Tap on that, and it will give you a list with possible connection modes. Uncheck everything that you don't intend to use. On my N5/CM11 there are only two options on this page: MTP and PTP. Unchecking both causes the phone to simply charge when plugged into a PC. I have seen others that have an explicit "Charge Only" option, but I believe that is nonstandard.

@andybjackson 2014-06-06 12:46:14

Note also that PTP must be ticked for tethering to be offered, either via USB or Bluetooth.

@eldarerathis 2014-06-06 14:33:43

@andybjackson That has not been my experience at all. I never use PTP, but I certainly use USB tethering from time to time. Also seems odd that tethering over Bluetooth (a wireless protocol) would somehow depend on PTP.

@Izzy 2015-11-11 23:37:02

If I untick both, ADB stops working as well (LG P880 running CM11/Android 4.4). If one of them is ticked, I always get two popups on my PC when connecting the cable (asking to mount the MTP storage). Drives me crazy. Whish there were an explicit "charge only" as it was with "older versions".

@eldarerathis 2015-11-12 04:15:10

@Izzy They actually ended up adding "charge only" to AOSP in 6.0, and made it the default:

@Izzy 2015-11-12 09:07:04

I'd be happy with that default actually (if it works, see: “adb devices” gives “no permission” when on charge-only) – but I agree the user should be able to chose what fits him/her best.

@Cerin 2016-10-23 13:17:36

Clicking that just say "Usb is now disconnected". Clicking it again says the same thing.

@sffc 2017-01-06 05:51:32

On a Samsung Galaxy S5, this option is located at Settings → System → Developer options → Debugging → Networking → USB configuration. Change it from "MTP (Media Transfer Protocol)" to "Charging".

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] Changing to PTP MTP from charging mode?

10 Answered Questions

[SOLVED] Disable USB charging

1 Answered Questions

Is there a way to remove all other USB options except charging?

1 Answered Questions

How do I enforce charging only on USB and disallow data?

1 Answered Questions

[SOLVED] No USB storage mode for Asus MeMo Pad 7 to do Android development

  • 2014-04-16 20:37:32
  • Nestor
  • 3310 View
  • 0 Score
  • 1 Answer
  • Tags:   usb

1 Answered Questions

1 Answered Questions

Sponsored Content