Getting object from field from hook of a static method

Search This thread

hamzahrmalik

Senior Member
May 31, 2013
1,658
2,020
I'm hooking a static method within class A
Class A contains a Context, mContext

i need to get the mContext
cannot use Xposedhelpers.getObjectField because i can't get param.thisObject so have nothing to pass to it
And i cant use

Class<?> clazz = XposedHelpers.findClass(LockPatternUtils, lpparam.classLoader);
Field f = clazz.getDeclaredField("mContext");
f.setAccessible(true);
c = (Context) f.get(what to pass here);

because i cant use the
field.get()
method, because i dont know what to pass
help is appreciated, thanks
 
Last edited:

GermainZ

Inactive Recognized Developer / Retired Forum Mod
Aug 3, 2012
6,170
8,805
You can't access non static fields from a static method. You'll have to find an alternative way.
 
  • Like
Reactions: hamzahrmalik

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    You can't access non static fields from a static method. You'll have to find an alternative way.