Have you checked if autoblocker in settings is set to max? If so try to turn off autoblocker and see if it works
Also you can try to turn developer options on your phone : Settings > about phone > software information > tap on build number 7 times and developer settings should appear at the bottom of your settings.
After that find section default usb configuration and select one of the following.
