File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
src/main/java/dev/materii/rushii/xspoofsignatures Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ android {
99 defaultConfig {
1010 applicationId = " dev.materii.rushii.xspoofsignatures"
1111 minSdk = 16
12+ targetSdk = 35
1213 versionCode = 1
1314 versionName = " 1.0.0"
1415 }
Original file line number Diff line number Diff line change @@ -117,22 +117,16 @@ protected void afterHookedMethod(MethodHookParam param) {
117117 };
118118
119119 String targetClass ;
120- switch (Build .VERSION .SDK_INT ) {
121- case Build .VERSION_CODES .UPSIDE_DOWN_CAKE :
122- case Build .VERSION_CODES .TIRAMISU :
123- targetClass = "com.android.server.pm.ComputerEngine" ;
124- break ;
125- case Build .VERSION_CODES .S_V2 :
126- case Build .VERSION_CODES .S :
127- targetClass = "com.android.server.pm.PackageManagerService$ComputerEngine" ;
128- break ;
129- default :
130- targetClass = "com.android.server.pm.PackageManagerService" ;
131- break ;
120+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
121+ targetClass = "com.android.server.pm.ComputerEngine" ;
122+ } else if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .S ) {
123+ targetClass = "com.android.server.pm.PackageManagerService$ComputerEngine" ;
124+ } else {
125+ targetClass = "com.android.server.pm.PackageManagerService" ;
132126 }
133127
134128 final Class <?> hookClass = XposedHelpers .findClass (targetClass , lpparam .classLoader );
135129 XposedBridge .hookAllMethods (hookClass , "generatePackageInfo" , hook );
136- Log .d (TAG , String .format ("Hooking all %s#generatePackageInfo(...)" , targetClass ));
130+ Log .d (TAG , String .format ("Hooking %s#generatePackageInfo(...)" , targetClass ));
137131 }
138132}
You can’t perform that action at this time.
0 commit comments