I had noted before that my accelerometer had broken on my Android g1 phone, so that one axis was out by about 40 degrees. Despite lots of "helpful" suggestions from my friends on how to fix it (you know who you are), nothing worked. This did.
Connect to the phone with adb (from the Android SDK), in the following way.
"As people alive today, we must consider future generations: a clean environment is a human right like any other. It is therefore part of our responsibility toward others to ensure that the world we pass on is as healthy, if not healthier, than we found it."