Thursday, April 14, 2016

[Q] Can't hook PhoneWindowManager.smali on Galaxy S6 running MM

I wrote a short module, to start my mods that would intercept and detect the keys being pressed.

I have done this many times before on other phones, S2, and S5. The S5 was on Lollipop, and the class PhoneWindowManager.smali was in a different spot than it is on MM.

However, I found the PhoneWindowManager.smali class in marshmallow source, added the class path to the module. Everything compiles, Xposed log says its loading my module, and everything looks great.

However, my "beforeHookedMethod" is never firing. I can tell because I put a simple XposedBridge.log() inside the method.

Is there something fishy I need to do with Marshmallow? Also, Xposed log says SE linux is enforcing, could this be the issue?

here is my code for the module:

Code:

if (loadPackageParam.packageName.equals("com.android.server.policy")) {
            Class<?> PhoneWindowMgr = XposedHelpers.findClass("com.android.server.policy.PhoneWindowManager", loadPackageParam.classLoader);
            XposedHelpers.findAndHookMethod(PhoneWindowMgr, "interceptKeyBeforeQueueing", KeyEvent.class, Integer.TYPE, new XC_MethodHook() {
                @Override
                protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                    XposedBridge.log("Intercept key. Keycode: " + ((KeyEvent)param.args[0]).getKeyCode());
                }
            });
        }


Nothing is logged when I press the buttons on my device..


from xda-developers http://ift.tt/1qV0FVt
via IFTTT

No comments:

Post a Comment