Updating gradle related items to get this working with Android Studio Beta
Changing the router scan flag to a more conservative one
Merged upstream changes