@Override
                        public Object invoke(Object proxy, Method method, Object[] args)
                                throws Throwable {
                            method.setAccessible(true);
                            if ("resolveService".equals(method.getName())) {
                                try {
                                    return handleCheckService(original, method, args);
                                } catch (Throwable e) {
                                    XLog.e("handleCheckService error", e);
                                }
                            }
                            return method.invoke(original, args);
                        }
We provide this hook to interrupt Android Services startup.
AMS calls ActiveServices to bind or start a Service, PackageManagerInternal#resolveService
will be called while ActiveServices retrieveServiceLocked.
<p>
So, here we proxy PackageManagerInternal and return null if the Service should not be start.
android/android_framework/patch-magisk/patch-framework/src/main/java/github/tornaco/thanox/android/server/patch/framework/hooks/am/AMSPackageInternalHooks.java