Security: how to prevent USB mounting of mobile device I am running Android KitKat 4.4.2 on a Samsung Galaxy SIII Neo. As a security measure I would like to prevent my phone being automatically mounted whenever I attach a USB cable from my mobile device to a PC. This way if someone steals my device they will not be able to read or copy files stored on my mobile device. However I am not sure how to turn this feature on or off.

I have read this post but I actually have USB debugging enabled under Settings | General | Developer Options. But the answer found there does not seem to apply to my device.
Try this from adb shell on your PC or from a root terminal on your device:

content update --uri content://settings/secure --bind name:s:mount_ums_autostart --bind value:i:0


Per the Android source code:

/**
 * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
 * @hide
 */
public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";