What process/library on Android is responsible for dispatching touch events to applications? I was so focused on the hooking that I completely forgot that Android source is available.
Update/Clarification: I want to have my code intercept all touch events for ALL applications in the system, do custom processing on them and forward to original receiver.
Update 2: Assume a rooted device and application for private/internal use only, NOT for mass distribution
Original, badly formulated question: Android equivalent of iOS MobileSubstrate-style hooking?
This is not possible on stock android (even if your device is rooted). If you wish to do this you'll have to build your own version of the OS that allows for it.