The fans at the Morumbi were chanting the name of striker Luis Fabiano, Brazil's starter in the 2010 World Cup, just before Fred broke through the Serbian defense to get the winner.
Striker Hulk had a goal disallowed because of offside in the 75th.
Brazilians complained early on after a few rugged fouls by the Serbs, including one on Neymar just seconds into the match. The Barcelona striker, who scored a goal and set up two others against Panama, had a lackluster performance on Friday and was substituted near the end of the match.
"It was tough to create play, there wasn't a lot of space," Neymar said. "But we have to get used to that, we have to find ways to deal with that. I think for the opener we will be OK."
Brazil will likely begin the World Cup with the same team that won last year's Confederations Cup at home.
Fans packed the Morumbi even though it rained hard for most of the day and traffic remained chaotic across the city because of a strike by operators of subway and overland trains.