=O
Now i'd definitely like to see the source ^^. Well source or not I eagerly await your next offering.
There are several ways to do this (I dug through this code for several hours), and I'm reciting this off the top of my head, so forgive me if I misspeak:
Method 1 (easy but hackish):
Call Surface.setRotation(...)
That lets you rotate the screen (you to run this from a console Java app with root).
However, that doesn't rotate the touch screen input. The only way to do that is to fake out the keyboard "lid" state being open here:
\mydroid\frameworks\base\core\jni\server\com_android_server_KeyInputQueue.cpp
Method 2 (less hackish):
Alternatively, you can probably further modify the aforementioned file to fake out lid state change events to do rotations.
Method 3 (least hackish):
Change the default requested orientation to ORIENTATION_SENSOR. This should work in theory, but it was causing my emulator to crash like crazy due to some dex file and OpenGL issue. Not sure why. It would probably work just fine on the phone, but I didn't want to mess with it.
Method 4 (not a hack at all, but doesn't work automatically with future apps and it is tedious):
Modify the Activity classes for all the apps and set their Orientation to ORIENTATION_SENSOR.