Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ab7622b authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Spoof signingInfo for microG

Spoof PackageInfo signingInfo + signatures so that G suite
apps does not complain anymore.
parent 1d5fa839
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3379,6 +3379,14 @@ public class PackageManagerService extends IPackageManager.Stub
                if (isSystemApp(packageInfo.applicationInfo)) {
                    generateFakeSignature(p).ifPresent(fakeSignature -> {
                        packageInfo.signatures = new Signature[]{fakeSignature};
                        packageInfo.signingInfo = new SigningInfo(
                                new SigningDetails(
                                        new Signature[] {fakeSignature},
                                        SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3,
                                        null,
                                        null
                                )
                        );
                    });
                }