A teenager has been charged with attempted murder over the bashing of a 48-year-old man metres from his doorstep.

The man was found unconscious with head and spinal injuries in Richmond in north west Sydney at 1.30am last Sunday.

Witnesses told police two males had robbed the man after punching him to the ground and repeatedly stomping on his head.

On Friday night, detectives arrested and charged a 16-year-old boy at his home in the nearby suburb of Bligh Park.

They were still looking for his alleged co-offender.

A police spokesman said it appeared the attack was "random" and that the teenager did not know his alleged victim.

He was refused bail to appear in Parramatta Childrens Court today.

AAP