rewrite device registry