Mobile Enhancer

From iPhone Development Wiki
Mobile Enhancer
Cydia Package
Developer RiP Dev
Package ID com.ripdev.men
Latest Version 3.0.3


Mobile Enhancer is the oldest (since 1.x) runtime patching mechanism on the iPhoneOS. It is the ARM port of Application Enhancer by Unsanity. Since Mobile Enhancer is a closed-source framework, and the developer has never released any example code on how to use this package, MobileSubstrate has soon surpassed it to be the de facto hooking framework.

Hooking

Mobile Enhancer does not provide any hooking APIs.

Loading

Extensions for Mobile Enhancer are packages as bundles with path extension .men. They can be located in /var/MobileEnhancer/ or /Library/MobileEnhancer/.

The bundle must define an external C function,

int MENModuleMain(CFBundleRef extension_bundle, CFBundleRef main_bundle, int argc, char* argv[]);

which does the hooking. If this function returns 0, extension_bundle will be retained.

Mobile Enhancer supports filtering by the bundle's Info.plist. The Info.plist should have a key called MENMatchInfo which is a dictionary that can contain these values:

  • CFBundleIdentifier (string or array): Loads the extension only when the running application matches the specified bundle ID.

PseudoSubstrate

PseudoSubstrate was a wrapper on top of Mobile Enhancer that can load MobileSubstrate extensions. This package seems no longer available.