Officers stormed the store on East 14th Street at Hesperian Boulevard in San Leandro just after 4 a.m.
The SWAT team used a "flash bang" grenade before going in.
Officers said they didn't find anyone inside but they did find a handgun.
They think the man may have slipped out a back door.
Three other men are in custody, including one who police said they shot as he tried to get away.
Officers said it all started just after 10 p.m. Thursday night, when the four young men tried to rob the store.