SANTA CLARA -- Aldon Smith wrapped up what he described as an upbeat minicamp Thursday. What comes next for the 49ers' linebacker won't be as enjoyable.

Smith will be sentenced July 25 in Santa Clara County Superior Court after pleading no contest last month to weapons and drunken driving charges.

"I don't know what's going to happen," Smith said at his locker. "I'm going to enjoy my month. I'll work out and stay here."

Smith also plans to spend time with his 1-year-old son and even asked reporters on places to take a toddler.

Smith endorsed coach Jim Harbaugh's advice to the team on staying safe before reconvening July 23 at training camp.

"Beware with whom you associate," Harbaugh said in relaying his end-of-minicamp speech. "It's very important to know your surroundings.

"Friend or foe? There always seem to be a foe. Get in football position. See around corners, under doors and anticipate. But mainly surround yourselves around good people."

Smith is just one of at least five 49ers players who've been involved in police investigations over the past year. And Smith didn't feel as if Harbaugh's advice was pointed strictly at him.

"He was talking to everybody because anybody can be in a situation," Smith said.

Smith appeared to be enjoying every minute of the minicamp's hourlong final practice, whether he was pass-rushing against Joe Staley, lining up on special-teams drills or congratulating Bruce Miller on a benign carry.

"It was a good camp," Smith said. "We all look good, even the new guys."

Harbaugh praised Smith, among several others. "Aldon was dominant today. He had a lot more reps yesterday and we weren't able to block him."

But will Smith be back on that practice field for the 49ers' first session July 24, on the eve of his court sentencing?

"That's to be determined," Harbaugh said.

For more on the 49ers, see Cam Inman's Hot Read blog at blogs.mercurynews.com/49ers. Follow him on Twitter at twitter.com/CamInman.