ElderDrivers / EdXposed

Elder driver Xposed Framework.
https://edxp.meowcat.org/
GNU General Public License v3.0
5.4k stars 624 forks source link

Hooking base Java class in SystemUI #742

Open Mikanoshi opened 3 years ago

Mikanoshi commented 3 years ago

EdXposed 0.4.6.4 I need to hook java.lang.Math.min(int.class,int.class) method, but only inside SystemUI, so hook is in handleLoadPackage(). Hooking does not return any errors, but hook's code is not being executed. Using hookAllMethods() results in all methods being hooked (returns a Set of 4 for int/long/float/double params). Hook for a method with floats is working, but not for ints.

Mikanoshi commented 3 years ago

It crashes on this line in SystemUI, so something is happening with Math.min(int,int), but it's not good :)

return list.subList(0, Math.min(list.size(), i));
Mikanoshi commented 3 years ago

Debug log log_crash.txt