I understand for the security of my phone and data the physical solution is best; there is no way data can be transferred though the cigarette lighter, but this requires carrying additional hardware when traveling.
Is there a way to disallow data transfer over USB within Android? My primary concern is with unrooted Android 7.0 Nougat, but I am actually interested in prior Android versions as well.
I am aware of the "Use USB to" menu that shows up under notifications with the following options:
- Charge this device: Just charge this device
- Supply power: Supply power to the other connected device
- Transfer files: Transfer files to another device
- Transfer photos (PTP): Transfer photos or files if MTP is not supported (PTP)
- Use device as MIDI: use this device as MIDI
I am able to use USB debugging while "Charge this device" is selected, which is definitely sending data over USB and is in conflict with the description. Does this mean only explicitly allowed devices can send data over USB in "Charge this device" mode? Or are there other exceptions as well?
How do I enforce charging only for USB connections like a rental car and disallow data transfer?