Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.android.server.pm.PackageManagerService"
public class HookAPM_6 implements IXposedHookLoadPackage {
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
Class<?> packageManagerService = XposedHelpers.findClass("com.android.server.pm.PackageManagerService",
lpparam.classLoader);
XposedHelpers.findAndHookMethod(packageManagerService, "installPackageLI",
"com.android.server.pm.PackageManagerService.InstallArgs",
"com.android.server.pm.PackageManagerService.PackageInstalledInfo",
new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
super.beforeHookedMethod(param);
}
});
please~
When I use the above code to hook the system service (packagemanagerservice), it will report an error. The specific error is: "caused by: java.lang.classnotfoundexception: com.android.server.pm. PackageManagerService"
what's wrong please? and How should I write it?
The device is running Android 6.0.1.