Thomas Muller also netted his first since being recalled to the national side for the tournament.
Latvia reported a positive result for the coronavirus among the team hours before kick-off.
Germany will face tougher opposition in their opening game against world champions France in Munich on June 15, with Portugal and Hungary completing a tough in Group F.
But Germany coach Joachim Low can’t have asked for more from his side as they produced a complete performance before leaving for their tournament base in Herzogenaurach in Bavaria on Tuesday.
Captain Manuel Neuer became the first Germany goalkeeper to reach 100 appearances, applauded before the game by some 1,000 spectators permitted amid coronavirus restrictions.
“We did a lot of things right today,” said Low, who will leave his post after the tournament following 15 years in charge.
“We had discussed things in the past days and what needs to be improved. In the first half we had a lot of pace and speed, good pressing.”
Additional reporting by AP.