Does Accelerometer Sensor work on my Samsung Galaxy S2?
Having an SGS2 myself, I just checked *#0*# and all 3 axis values change. So you definitely seem to have a problem here, either in software or hardware, and since you've already tried to search for solutions online and could not find anything which works, perhaps it's best to contact Samsung directly for help.