I followed the guide here:

http://developer.android.com/training/connect-devices-wirelessly/nsd.html

The example works fine and on the network the device appear with the "serviceName" I set, for example "Nexus5".

With Bonjour Browser app infact I can see the name is set to "Nexus5", but the hostname of it is "Android.local" and not "Nexus5.local" as I expected.

I tried changing the device hostname in build.prop (net.hostname=Nexus5) and reboot but still I can only ping "Android.local".

What I'm missing? How to change the hostname announced via bonjour?

Basically I want make a little app that announce my device on the network allowing me to set the hostname I want.