Restart device before flashing for better stability. r=me