That sounds like a great way to get murdered (http://www.neighborhoodscout.com/ca/oakland/crime/). What are some of the places that are better or should be avoided?
There are plenty of relatively safe neighborhoods in Oakland: the Central District (where I live), Jack London Square, Lake Merritt, Claremont/Rockridge, Temescal, Piedmont, etc. East Oakland is where the crime is generally centered. Generally, the closer to the hills or the lake you are, the nicer it is.
Best advice I can give if you have any doubt is to ask a local police officer.
Crime of that sort in Oakland generally involves only those who consider it an "occupational hazard".
It's extremely amusing how much people worry about being killed by thugs in places they've never been, when they're far more likely to be killed by a dumbass texting on 580.