Jamie Hyneman — co-host of Discovery’s “Mythbusters” — has been quietly working for the government when the cameras stop rolling.

He’s been working on a lightweight armor shield to protect military vehicles from roadside bombs and the first fully realistic, robotic dummy for training military medics.

“Because he is so popular, he has people calling him all the time saying, ‘I love your show, but I am in mortal danger here. Can you do something to help us?’ ” says Edmond Dougherty of Pennsylvania-based Ablaze Development, his partner on several recent projects.

“It’s Army people and Navy people — the guys with the boots on the ground.”

In fact, if the opportunity to mass-produce the products he has developed for the government came along, Hyneman told The Post, he’d no longer have time to make his long-running TV show.

“I don’t want to just do this stuff purely for my own personal education,” he says.

“The reality is, in order to get something like this out into the market, I would have to devote myself to it [completely]. I can’t just do it in my spare time.”

In 2009, Dougherty and Hyneman received their fourth grant from the Office of Navy Research, $70,000 for development of a lightweight armor shield to protect military vehicles — especially the vulnerable Humvee — from the homemade explosive devices that have become the enemy weapons of choice in Iraq and Afghanistan.

Last fall, a Navy spokesman says, the government decided not to fund a Phase 2 for the device. But Hyneman hasn’t given up.

“We are putting it out there, and somebody may take it and run with it,” he says. “You never know.

“The government is probably more comfortable commissioning . . . armor to put on vehicles from the Acme Armor Company rather than somebody from ‘Mythbusters.’ ”

Hyneman, who grew up on a farm in Indiana, worked as a diver, boat captain and animal wrangler before getting into the special-effects business, where he learned the fine art of explosives.

He opened up the San Francisco-based M5 Industries — where “Mythbusters” is filmed — 16 years ago.

“Ninety percent of this is just for my personal satisfaction of solving a puzzle,” he says. “Saving lives is the other 10 percent.

“My primary motivation — even being on the show — is probably selfish. It is an exercise that I find intriguing.”

Hyneman’s curiosity led him first to develop a fully realistic, robotic medical dummy.

“The military has found that the new medics in the field tend to freeze if they are exposed to something horrific, like somebody who just had their legs blown off,” he says. “They need to battle-harden them.”

The avatars — now being used to prepare medics for unexpected situations — have flesh-like rubber skin and hair. They even give off a bad smell.

“If they are blown off at the knee, there is an open artery that spits blood out,” Hyneman says. “If they run out of blood [while treating the wound], you have just failed your training.”