Open karimjouini opened 9 years ago
Please calm down. Why would this be "URGENT"? The XTypedArray replacement has been active for more than a year.
Do you have a small test I could use for reproducing this issue?
Sorry about the URGENT, I am new to XPosed, I actually heard about it because my apps crash on ROMs that contain XPosed :)
About the test: this lib: https://github.com/Cheesebaron/SlidingMenuSharp crashes when XPosed is installed
You could also download our app: Expensya (email me I'll give you a test account)
How to detect if Xposed is installed (to help the user understand)? Simply check for package "de.robv.android.xposed.installer"
Thanks, but can that be done programmatically ? (so I can, on my app startup, tell to the user: "Oops we can't run with XPosed active")
You can use this to check if Xposed is installed I've used it before works like a charm
try {
getActivity().createPackageContext("de.robv.android.xposed.installer", Context.CONTEXT_IGNORE_SECURITY);
//Xposed is installed show your message here "Oops we can't run with Xposed active"
} catch (NameNotFoundException ignore){
//Xposed isn't installed so continue to run your app
}
Use try catch with this code getPackageManager().getPackageInfo(Xposed_PKG, 0);
And why is TypedArray replaced?
For resource replacement. Otherwise, I would have to hook all of its methods, and as they are called very often, that would be much overhead.
@karimjouini: As you asked about a workaround: At the Xposed Installer (which is used to manage the modules) there's an option "Disabled resource hooks" which might be a solution for affected users at the moment.
Seems to be due to this: https://github.com/rovo89/XposedBridge/blob/master/src/android/content/res/XResources.java#L993
Basically, calling obtainStyledAttributes should return a TypedArray, this gets replaces by XTypedArray by XPosed, and Xamarin fails to call its methods
see stack trace:
https://forums.xamarin.com/discussion/comment/130409#Comment_130409
Can you help us understand:
Thanks, Karim