While s_ha_dum's answer is not only not wrong, but exactly the answer you'd expect to get, I'd highly advise against using it, whether you are on 3.4+ or not.
User agent sniffing sucks. Whether done manually or via a core function. Period.
For one, new UA strings pop up like wildfire. For another, a good number of browsers pretend to be something else anyway.
For another: What is a mobile device?
Old phones only?
All smart phones?
Does that include tablets?
You see, it is impossible to identify a mobile device and categorize it into either being one or not. The only reliable way of serving conditional content is via screen- or viewport-width, respectively. Pixel-density is another factor to consider, but ought not to apply to your issue.
To stray from negativity and provide something somewhat useful: Hence, I'd suggest hiding admin menu items via css mediaqueries and/or js.