As you all know with the 1.7 Version of the chromecast app google enabled screen mirroring on selected devices. Since a Nexus 5 is a selected device i decided to try to make my Sony Xperia Z2 a Nexus 5
I changed the following original Sony build.prop settings from:
ro.build.product=D6503 ro.product.brand=Sony ro.product.name=D6503 ro.product.device=D6503
ro.build.product=hammerhead ro.product.brand=google ro.product.name=hammerhead ro.product.device=hammerhead
Tested and working...it's great !
I guess you can easily adapt this to any other phone, so just a quick hack.