[Galaxy S6 General] edzamber:
Disable Signature Check and Fi

x app installation with broken/mismatched signatures

*Decompil Services.jar

Go into smali\com\android\server\pm\PackageManagerService.smali

Search for :

.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I

Replace the entire .method with this one:

.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7

const/4 v0, 0x0

return v0
.end method

Recompil Services.jar

Done

*Decompil core-libart.jar (core-oj.jar for Android N)

Go to java/security/MessageDigest.smali

Search for :

.method public static isEqual([B[B)Z

At the begining of the method change const/4 v1, 0x0 into const/4 v1, 0x1

const/4 v1, [COLOR=red]0x0[/COLOR] # change into const/4 v1,[COLOR=blue] 0x1[/COLOR]
array-length v2, p0

Go to java/security/MessageDigest.smali/Signature.smali

Search for :

.method public final verify([B)Z

At the very end of the method Change move-result v0 into const/4 v0, 0x1

invoke-virtual {p0, p1}, Ljava/security/SignatureSpi;->engineVerify([B)Z

[COLOR=red]move-result v0[/COLOR] # change into [COLOR=blue]const/4 v0, 0x1[/COLOR]

return v0

Search for :

.method public final verify([BII)Z

At the very end of the method Change move-result v0 to into const/4 v0, 0x1

invoke-virtual {p0, p1, p2, p3}, Ljava/security/SignatureSpi;->engineVerify([BII)Z

[COLOR=red]move-result v0[/COLOR] # change into [COLOR=blue]const/4 v0, 0x1[/COLOR]

return v0

Recompile core-libart.jar

Done

Now you can install any application with different and with broken/mismatched signatures :)

Thanks to @one_love_420 and @CNexus

This Mod goes with this one :

Installing app older versions over newer

*Decompil Services.jar

Go into smali\com\android\server\pm\PackageManagerService$InstallParams.smali

Search for :

.method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;)I

Now just change if-nez to if-eqz (like in blue in this code)

.method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;)I
.locals 9
.param p1 # Landroid/content/pm/PackageInfoLite;

const/4 v6, 0x2

const/4 v5, 0x1

iget-object v3, p1, Landroid/content/pm/PackageInfoLite;->packageName:Ljava/lang/String;

iget v1, p1, Landroid/content/pm/PackageInfoLite;->installLocation:I

iget v7, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->installFlags:I

and-int/lit8 v7, v7, 0x8

if-eqz v7, :cond_1

move v2, v5

:goto_0
sget-object v7, Lcom/android/server/pm/PackageManagerService;->mPackages:Landroid/util/ArrayMap;

monitor-enter v7

:try_start_0
sget-object v8, Lcom/android/server/pm/PackageManagerService;->mPackages:Landroid/util/ArrayMap;

invoke-virtual {v8, v3}, Landroid/util/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

move-result-object v4

check-cast v4, Landroid/content/pm/PackageParser$Package;

if-eqz v4, :cond_6

iget v8, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->installFlags:I

and-int/lit8 v8, v8, 0x2

if-eqz v8, :cond_9

iget v8, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->installFlags:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0

and-int/lit16 v8, v8, 0x80

if-[COLOR=blue]eqz[/COLOR] v8, :cond_0

:try_start_1
# invokes: Lcom/android/server/pm/PackageManagerService;->checkDowngrade(Landroid/content/pm/PackageParser$Package;Landroid/content/pm/PackageInfoLite;)V
invoke-static {v4, p1}, Lcom/android/server/pm/PackageManagerService;->access$4200(Landroid/content/pm/PackageParser$Package;Landroid/content/pm/PackageInfoLite;)V
:try_end_1
.catch Lcom/android/server/pm/PackageManagerException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0

Recompil Services.jar

Done

Now you can install any old app version on top of a newer without unistall before :)

Thanks to @tdunham