For iPhones, enterprise management will allow you to set things like /etc/hosts. I do this with my phone.
I don't know what Androids do.
I don't know what Androids do.
You need to learn a little about what you're doing if you want to go this route, and there is some setup. But basically, you're taking on the role of a corporate IT department, pre-configuring and possibly locking down the phone.
I set up a profile in Configurator a few years ago and am a little afraid of touching it - that application makes iTunes look thoughtfully designed and stable.