How do I turn off USB charging mode on Android?
To do that, you need to enable Developer Mode. Go to Settings, and use the search field to locate the “Disable USB audio routing” option. Then, simply toggle off the option. Alternatively, you can also go to Settings, and select System, and then tap About Phone.
To change USB preferences
Drag down the status bar, and then tap Android System next to (USB icon). Tap Tap for more options, and then select an option.
go to settings>about phone>click multiple times on build number to activate developer mode. Go to settings>system>developer options to change usb preferences and again try step 1. This worked for me.
Depending on the quality of the USB plug/cable and your personal "plugging skills" it could happen that the device will recognize connection to the powerlines first or only. The device then thinks it it connected to a USB port and will limit the charging current.
Enable or Disable Usb Ports Through Device Manager
Right-click on the “Start” button on the taskbar and select “Device Manager”. Expand USB Controllers. Right-click on all entries, one after another, and click “Disable Device”. Click “Yes” when you see a confirmation dialog.
How to know if the USB device is charging while it's connected to the portable speaker via USB cable. The portable speaker does not have an indicator that can tell if a connected USB device is charging. To see if the smartphone is charging, check the display or charging indicator of the USB device.
To Turn On or Off Notification of USB Issues in Windows 10,
Open the Settings app. Go to Devices > USB. In the right pane, turn off (uncheck) Notify me if there are any issues connecting to USB devices. This is enabled by default.
Swipe your finger down from the top of the screen, and you should see a notification about the current USB connection. At this point, it'll probably tell you your phone is connected only for charging. After you connect your phone to your computer, a notification will let you prepare it for transferring files.
To place the device into the correct USB mode, swipe down from the Notification bar, then select the Android System drop down menu > Charging notification > Transfer files or Transfer images.
Head to Settings > Connected devices > USB preferences. On the list of options, make sure the Charge connected device toggle is enabled. You will not be able to change options in this menu unless your device is connected to a USB cable at the time.
Is it possible to turn off USB port?
Open Device Manager. Expand the Universal Serial Bus Controllers list. Right-click the USB port and select Disable device.
Unlock your phone. With a USB cable, connect your phone to your computer. On your phone, tap the "Charging this device via USB" notification. Under "Use USB for," select File Transfer.

Troubleshoot your cable, charger, outlet & case
Check that your charger and cable work. Try them with another device. Check that the cable is securely connected to the charger and to your phone. Check that there's nothing in the port of your phone, like dust or lint.