Skip to content

Commit

Permalink
Fix signature of startBootstrapServices on R+
Browse files Browse the repository at this point in the history
  • Loading branch information
canyie committed Aug 12, 2021
1 parent 1ce02e0 commit 09a49a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/top/canyie/dreamland/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ public static void onSystemServerStart() {
final String processName = AppConstants.ANDROID; // it's actually system_server, but other functions return this as well

Dreamland.prepareModulesFor(dms, packageName, processName, modules, true);
Class<?>[] paramTypes = Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
? new Class<?>[] { cl.loadClass("com.android.server.utils.TimingsTraceAndSlog") }
: new Class<?>[0];
Pine.hook(cl.loadClass("com.android.server.SystemServer")
.getDeclaredMethod("startBootstrapServices"),
.getDeclaredMethod("startBootstrapServices", paramTypes),
new MethodHook() {
@Override public void beforeCall(Pine.CallFrame callFrame) {
PineXposed.onPackageLoad(packageName, processName, null, true, cl);
Expand Down

0 comments on commit 09a49a0

Please sign in to comment.