Device Recovery With Functional Diagnostics