A woman reported seeing a person in her backyard in the 5400 block of Kathy Way and heard the sound of someone forcing entry into her home, according to police.
Police established a perimeter around the house while a team of officers entered the home to assist the victim, who had locked herself in an upstairs bedroom.
As officers entered the house through the rear door, the suspect attempted to flee the house through the front door, police said.
The suspect feigned surrender when confronted by officers and then attempted to run away. Police apprehended the man, who was carrying property belonging to the victim, nearby on Norma Way, according to police.
The suspect was identified as Brian Hayes of Castro Valley.
Police said Hayes had been knocking on doors in the neighborhood a few days earlier, asking for someone by the name of "Richard."
Police believe that Hayes used the "door checking" technique, which involves the suspect checking the knob and gaining entry to unlocked homes and vehicles.
Police said this technique has become a trend that has been used in many residential and automobile burglaries throughout the city. Authorities are reminding residents to lock all doors and windows and to remove shrubbery that blocks the view of doors and windows.