When I've been in Oakland I've parked on the street near the Bart. I would scout out the area before heading into the parking lot. Word to the wise, the area isn't the greatest but I took my chances. I didn't have a problem but that was for a day game.
As for San Francisco, you can find parking on the street as well. You have to look around and read the signs. That area isn't really bad.