The homeless man who randomly attacked a 6-year-old Queens boy, leaving the child in critical condition, was a “ticking time bomb” with a violent past, according to police sources and court records — and even his own family says he should have been off the streets.

Laurence “Larry” Gendreau, 35, was charged with assault Friday for grabbing and picking up the boy outside the child’s grandfather’s home in Kew Gardens on Thursday evening, slamming the 6-year-old face-first onto the ground and leaving him with horrific injuries, authorities said.

The suspect remained Friday at Jamaica Hospital Medical Center under psychiatric evaluation — a familiar situation for the vagrant, who has been in and out of mental health facilities for months.

He also is no stranger to crime, sources and records show.

An hour before attacking the boy, Gendreau robbed an 80-year-old woman less than a mile away on the Union Turnpike, stealing her iPad, according to law enforcement sources.

At the time of his bust for attacking the little boy, there was an open warrant out for his arrest — for skipping a court appearance after he assaulted a woman in a Manhattan Popeye’s restaurant in January, sources and court records show.

A few years earlier, Gendreau also had threatened to “snap” the neck of a mental health worker, according to police records.

In the Jan. 8 incident at the Popeye’s on Lexington Avenue near East 26th Street, he went berserk and hit an elderly woman in the leg with a chair, leading cops to charge him with felony assault, sources and records show.

But the Manhattan DA’s office downgraded the charges to misdemeanor assault — and as per bail-reform measures supported by Mayor Bill de Blasio, Gendreau was released without bail, despite being a known as an emotionally disturbed person with violent tendencies.

The DA’s office did not immediately respond to a request for comment from The Post on Friday as to why it reduced the charge at the time.

Meanwhile, Thursday’s vicious attack occurred less than a week after cops say another vagrant randomly murdered four other homeless men in Chinatown — and as Mayor Bill de Blasio on Friday ordered a “30-day review” of the city’s mental-health intervention programs.

The badly injured 6-year-old, identified by family as Avraham Yirmyahu Chaya Toiva, was in critical but stable condition at the Cohen Children’s Medical Center with a collapsed lung and bleeding on the brain, grandfather Rabbi Naftali Portnoy told The Post.

“Just keep the family in prayers,” the grieving grandpa said.

The boy’s father wrote on Facebook that his son had shown signs on progress by Friday afternoon, writing that neurologists believe the boy will not have lasting brain injuries.

Gendreau’s brother said his sibling had been diagnosed with schizophrenia and bipolar in his 20s and living on the streets for the past year because of his condition.

In the few years before that, “He was diagnosed, he was on meds, they [social services] had him set up with an apartment, he had everything going for him,” the sibling said.

Then Gendreau destroyed the apartment.

“He pretty much burns his bridges,” his sibling said.

“I know there’s a lot of homeless people, but for him, he should be institutionalized because he’s not on his meds. The more he goes on and off his meds, the more damage he does to his brain.”

Gendreau’s family said he had been “in and out” of Jamaica Hospital for mental issues.

According to police records, Gendreau gave police nine different addresses in the past year, one of them the Creedmoor Psychiatric Center in Queens Village.

The woman Gendreau is accused of attacking in Popeye’s said she was disturbed after learning he had assaulted the young boy. She recalled that before he attacked her, Gendreau had been sitting alone, talking to himself.

“He lunged like he was going to hit me, then he picked up a chair and threw it at me,” said the woman, who only wanted to be known by her first name, Joan.

“Of course he should have been in prison [after that]. It’s disgusting, these maniacs walking down the street. Not only are they homeless, they’re sick,” Joan said.

Bail reforms due to take effect Jan. 1 2020, will allow people arrested on low-level misdemeanors or nonviolent felonies to be released without bail, but prosecutors are already adhering to them, believing they have no choice. And the situation is dangerous, critics say.

“These people will be committing other crimes within hours of getting released, and the only ones that are going to suffer are the victims,” a law enforcement source told The Post on Friday.

Joan added of the court system, “They don’t look. They don’t care.”

“[Gendreau] was supposed to come back [to court] after his arraignment, but he never showed up, and now a little boy, he almost died,” she said.

Additional reporting by Larry Celona, Gabrielle Fonrouge, Julia Marsh and Lorena Mongelli