Fix b2g machines

A collection of fixes addressing Bugs 1047306 1011577 1007774 1046057 1046056 1050179 1047324