The Dons took an early lead through Ash Taylor and Rooney’s treble then ended any hopes of Livingston claiming a surprise win over the Premiership side.
Aberdeen started strongly with David Goodwillie shooting wide before Rooney’s effort was saved by Livi goalkeeper Darren Jamieson.
The Dons’ pressure paid off in the eighth minute when they opened the scoring through Taylor’s towering header at the back post from Willo Flood’s cross.
Home goalkeeper Scott Brown was called into action with a save from Keaghan Jacobs’ shot as the visitors pressed for a quick equaliser.
The hosts then enjoyed a dominant spell with Rooney stinging the palms of Jamieson before firing over from the rebound.
Jamieson denied Rooney again and also tipped Nicky Low’s effort around the post for a corner.
Brown was forced to make a fine low save to deny Gary Glen at the other end and he was also tested by Michael McKenna after a driving run before Shay Logan blazed over for the Dons shortly before the interval.
Jamieson continued to take centre stage for Livingston after the restart with another excellent save to foil Flood.
Livi substitute Myles Hippolyte almost made an immediate impact after entering the fray when he fired inches wide of the post with his first touch in the 57th minute.
However, any hopes of a comeback from the Championship side were scuppered four minutes later when Rooney lashed in a left-foot shot from just inside the area after being set up by Goodwillie’s neat back heel.
It was not all straightforward for Aberdeen though, with Ryan Jack having to be stretchered off after falling to the ground in pain. Barry Robson took his place in central midfield, while Cammy Smith came on for Goodwillie.
The Dons continued to carry a threat, however, and Rooney netted again in the 74th minute when he found space at the back post and beat Jamieson with a clinical finish, which nestled into the bottom corner.
The striker was not finished and made sure he went home with the match ball by tapping home from close range in the 87th minute after impressive wing work from Jonny Hayes.