Drop it. My phone wouldn't auto-rotate anymore a few weeks ago, I reflashed stock, calibrated the gyroscope, and a couple more "fixes" that didn't work. Then I read somewhere to drop it on its back from about 5-6" on a hard wood floor. Bingo, its auto-rotating.
Drop it, don't throw it.