A 31-year-old accused of going on a violent rampage across Perth, which included ramming several cars, has been charged with 20 offences.

The Mandurah man was a passenger in another man's car in Greenfields south of Perth early on Friday morning when he allegedly pulled out a knife and threatened him.

After an hour, the driver managed to get out of the car in Serpentine and tried to flag down a passing car being driven by a 40-year-old woman, who did not stop.

However, the Mandurah man drove away in the car and allegedly chased the woman down, before ramming her car a number of times, which caused it to roll.

The woman and a child who was also in the car escaped serious injuries.

The man chased down a second car, forcing the female driver to take refuge at a service station.

Police said he then stole her car and drove about 20 kilometres to Byford where he crashed through a fence and damaged a car and a house.

He is then accused of breaking into a house and stealing property before damaging two other homes and breaking into another house, where he assaulted the occupant before fleeing into the loft of the house.

Police arrived at the scene and both the man and one of the officers trying to apprehend him fell through the loft into the room below.

He has been charged with 20 offences, including two of assaulting police.

He is due to appear in court on Saturday.