For Germany, the exchange of US licenses works on reciprocity. The US states that are in Anlage 11 of the FeV (driver licensing regulations) will generally allow you to swap a German license for a US one. California, however, does not have reciprocity with Germany. A driver with a CA license must take both the road and written tests.
It is possible to keep your US license when you apply for a German license under certain conditions and subject to the rules of the particular licensing office you go to in German.
More info here:
http://www.amcham.de/location-german...s-license.html
Rules on driving with foreign licenses in US states vary from state-to-state, but are generally limited in time.