Backport USB gadget, and other fixes