Closed gnastnosaj closed 9 years ago
XposedHelpers.findAndHookMethod("android.os.ServiceManager", (ClassLoader) null, "getService", new Object[]{String.class, new XC_MethodHook() { protected void beforeHookedMethod(MethodHookParam param) throws Throwable { String EmmMangerServiceName = "EmmMangerService"; String serviceName = (String) param.args[0]; if (serviceName.equals(EmmMangerServiceName)) { if(binder == null) { AndroidAppHelper.currentApplication().bindService(new Intent("EmmMangerService"), new ServiceConnection() { public void onServiceDisconnected(ComponentName name) { } public void onServiceConnected(ComponentName name, IBinder service) { binder = service; param.setResult(binder); } }, 1); } } } }});