In Android you should be able to override resources by creating a resource with the same name in your project, for example, the layout used in Discover Device Activity (where you choose device & logout) is "activity_discover_device.xml".
However layout file is manipulated from code, logout button is being set to "visible" depending on "setupOnly" flag (perhaps setupOnly fits your needs). Simple workaround for that is to wrap logout button in another viewgroup and hide it:
//replace current logout view with this
Keep in mind that customizing flow this way is not recommended, if possible any other customizations should be done as shown here.