How do I build the Android SDK with hidden and internal APIs available?

I want to rebuild the Android SDK (or rather only the android.jar) to include hidden and internal APIs. I could not find any documentation or discussion doing on how to go about this. I have an Ub...