[Sony Cross-Device General] STRYDER~007:
Guide To Create Superuser MOD

Superuser MOD disables the signature verification for all apps. After using this MOD you can install apps with different signature!:D

Requirements:-

Services.jar from your device.It's located in system/framework/

Apktool or some similar software.

Decompiling-Recompiling Knowledge.

Notepad++ for Editing XMLs.

Working brain and patience!!:D

STEP 1- Decompile services.jar using apktool.

STEP 2- Go to \smali\com\android\server\pm\

STEP 3- Find the file named PackageManagerService.smali and open it using Notepad++

STEP 4- Now Find this method:-

.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;

.prologue
const/4 v6, 0x1

const/4 v8, -0x3

const/4 v7, 0x0

.line 2955
if-nez p0, :cond_1

.line 2956
if-nez p1, :cond_0

.line 2988
:goto_0
return v6

.line 2956
:cond_0
const/4 v6, -0x1

goto :goto_0

.line 2961
:cond_1
if-nez p1, :cond_2

.line 2962
const/4 v6, -0x2

goto :goto_0

.line 2965
:cond_2
array-length v9, p0

array-length v10, p1

if-eq v9, v10, :cond_3

move v6, v8

.line 2966
goto :goto_0

.line 2970
:cond_3
array-length v9, p0

if-ne v9, v6, :cond_5

.line 2971
aget-object v6, p0, v7

aget-object v9, p1, v7

invoke-virtual {v6, v9}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z

move-result v6

if-eqz v6, :cond_4

move v6, v7

goto :goto_0

:cond_4
move v6, v8

goto :goto_0

.line 2976
:cond_5
new-instance v3, Ljava/util/HashSet;

invoke-direct {v3}, Ljava/util/HashSet;-><init>()V

.line 2977
.local v3, "set1":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0

.local v0, "arr$":[Landroid/content/pm/Signature;
array-length v2, v0

.local v2, "len$":I
const/4 v1, 0x0

.local v1, "i$":I
:goto_1
if-ge v1, v2, :cond_6

aget-object v5, v0, v1

.line 2978
.local v5, "sig":Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

.line 2977
add-int/lit8 v1, v1, 0x1

goto :goto_1

.line 2980
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_6
new-instance v4, Ljava/util/HashSet;

invoke-direct {v4}, Ljava/util/HashSet;-><init>()V

.line 2981
.local v4, "set2":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1

array-length v2, v0

const/4 v1, 0x0

:goto_2
if-ge v1, v2, :cond_7

aget-object v5, v0, v1

.line 2982
.restart local v5 # "sig":Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

.line 2981
add-int/lit8 v1, v1, 0x1

goto :goto_2

.line 2985
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_7
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z

move-result v6

if-eqz v6, :cond_8

move v6, v7

.line 2986
goto :goto_0

:cond_8
move v6, v8

.line 2988
goto :goto_0
.end method

STEP 5- Shrink it to:-

.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;

.prologue
const/4 v7, 0x0

.line 2934
return v7
.end method

STEP 6- Now Find the lines given below:-

invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I

move-result v4

if-nez v4, :cond_c

.line 5572
new-instance v4, Lcom/android/server/pm/PackageManagerException;

const/16 v5, -0x13

const-string v11, "Cannot install platform packages to user storage!"

invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V

throw v4

.line 5578
.end local v89 # "s1":[Landroid/content/pm/Signature;
:cond_c

STEP 7- Change it to the Red line:-

invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I

move-result v4

[B][COLOR="Red"]if-eqz[/COLOR][/B] v4, :cond_c

.line 5572
new-instance v4, Lcom/android/server/pm/PackageManagerException;

const/16 v5, -0x13

const-string v11, "Cannot install platform packages to user storage!"

invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V

throw v4

.line 5578
.end local v89 # "s1":[Landroid/content/pm/Signature;
:cond_c

STEP 8- Save and recompile your services.jar..Set the permissions to rw-r--r-- and push it to system/framework/

STEP 9- Done! Reboot your device.:D

DON'T FORGET TO HIT THANKS BUTTON!!:good::good::D