问题
What is, if any, Android equivalent of MobileSubstrate-style hooking? I need to understand if it's feasible and doable in reasonable time to hook into digitizer event flow to intercept and do custom processing on gestures/touches.
Clarification: This must be done for ALL applications. Currently I have a tweak that is filtered to UIKit, so it loads everywhere. Is there an equivalent?
回答1:
Saurik has announced CydiaSubstrate for Android devices supported on versions 2.3 through 4.2, including Kindle Fire, CyanogenMod, and Intel. You need to root your device first in order for it to work. You can read more on CydiaSubstrate For Android and download it from CydiaSubstrate or GooglePlay Store.
回答2:
To complete the question/answer sequence : there appears be none. Objective-C's dynamic introspection capabilities are the result of smalltalk-like messaging. Java/C don't have that. .Net, on the other hand, comes close with reflection. case closed.
来源:https://stackoverflow.com/questions/11620873/android-equivalent-of-ios-mobilesubstrate-style-hooking