Chris Woakes was 137 not out, his maiden Test century, after Sam Curran was last man out for a brisk 40 that included a six off Mohammed Shami.
England added a further 39 runs in 36 minutes after resuming on their overnight 357 for six before captain Joe Root declared in a match where the whole of the first day and much of the second was lost to rain.
England lead this five-match series 1-0 after a 31-run win in the first Test at Edgbaston last week.