Tags: shuixi2013/Xposed
Tags
Fix invokeOriginalMethod() In most cases, invokeOriginalMethodNative() is called from handleHookedMethod() with the already resolved original method. However, it's also allowed to call it via invokeOriginalMethod(). In that case, it's possible that the method is actually the hooked one. Make sure to resolve it to the original one if the second parameter is zero. The ART variant will be changed to set it to 1 before calling handleHookedMethod().
Handle different variants of AndroidRuntime::start() In Android 5.1.1_r19, Google introduced an additonal parameter for this method. We need to detect which one the ROM uses and call it. This assumes that the mangled name is consistent across all ROMs and that the object instance is implicitely handled as first parameter to the method. On Android 5.0, we assume that this change is not merged. If required, the dynamic way could simply be enabled for this version as well. Fixes rovo89#71.
Don't use writeByteArray() in xposed_service.cpp This works around an AOSP bug. Byte arrays first store the array size and then the bytes. However, Parcel::writeByteArray() uses size_t for the size, whereas all other parts related to Parcels read/write int32_t values. This leads to conflicts on 64-bit ROMs, as size_t uses 4 bytes instead of 4 bytes here. In Xposed, this results in invalid file reads, most notably in XSharedPreferences. This fixes rovo89/XposedBridge#58. Thanks to @rsteckler for reporting this issue and testing the fix!
PreviousNext