Prepare Your Nokia X2 for Battle with Nokia X2 Tools

Unveiled in June this year, the Nokia X2 is the Finnish companys second crack at an … more

Increase the Speaker Volume of Your Samsung Gear 2 with Tool and Tutorial

I think its pretty safe to say that any sound coming out of a … more

Unlock Hidden Camera Settings on Your Moto G

At one point in time or another, weve all gotten very fiddly with the camera settings on our … more

XDA Partners with LG for Developer Challenge

Many Android enthusiasts know the name LG. LG is the maker of some Google Nexus devices and some … more
Post Reply

[GUIDE]Disable signature verification -Kang helper!

20th April 2014, 08:44 PM   |  #1  
xXx~~~SHLOK~~~xXx's Avatar
OP Senior Member
Delhi
Thanks Meter: 395
 
518 posts
Join Date:Joined: Jul 2012
Whats signature verification?
The system always checks for different signatures for system apps and if they dont match the app doesnt get installed.
So if you try to make changes to Android Manifest and sign it it will not work untill you sign the whole rom with the same signature.
It's pretty annoying! If you are a kanger this will help you too, you will be easily able to replace system apps from other roms without any problems
Unless they dont require something (lib's , png's from framework).
I think every rom maker should do it in their rom,so its a bit more easy to modify


I wont guide you how to decompile,recompile or flash the file,You can find a good tutorial on xda for that.



How to Do it.

1. Pull out services.jar from system/framework (use any root explorer)
2. Decompile it - I prefer vts(virtous ten studio)
3. Then open \smali\com\android\server\pm\PackageManagerService .smali ( my recomdation use notepad++ )

Now find the method

.method static compareSignatures

It would look something like this

Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
    .locals 7
    .parameter "s1"
    .parameter "s2"

    .prologue
    .line 2160
    if-nez p0, :cond_8

    .line 2161
    if-nez p1, :cond_6

    const/4 v6, 0x1

    .line 2180
    :goto_5
    return v6

    .line 2161
    :cond_6
    const/4 v6, -0x1

    goto :goto_5

    .line 2165
    :cond_8
    if-nez p1, :cond_c

    .line 2166
    const/4 v6, -0x2

    goto :goto_5

    .line 2168
    :cond_c
    new-instance v3, Ljava/util/HashSet;

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

    .line 2169
    .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_14
    if-ge v1, v2, :cond_1e

    aget-object v5, v0, v1

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

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

    goto :goto_14

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

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

    .line 2173
    .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_26
    if-ge v1, v2, :cond_30

    aget-object v5, v0, v1

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

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

    goto :goto_26

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

    move-result v6

    if-eqz v6, :cond_38

    .line 2178
    const/4 v6, 0x0

    goto :goto_5

    .line 2180
    :cond_38
    const/4 v6, -0x3

    goto :goto_5
.end method
Replace the whole method by this

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

    const/4 v0, 0x0

    return v0
.end method
Now Just recompile your services.jar and use a flashable zip to flash it to your system.
I have attached a sample zip for flashing(you will have to add your services.jar into this) ,in case you dont have a flashable zip.



If that doesnt work for you,you can try d3cka's Method here.
http://forum.xda-developers.com/show....php?t=2342262

I am not a pro this just worked for me if you have problems ask.


And If you find this helpful Just press the thanks button. and let me know if i forgot something...
Attached Files
File Type: zip Flashablezip.zip - [Click for QR Code] (122.3 KB, 51 views)
Last edited by xXx~~~SHLOK~~~xXx; 20th April 2014 at 08:48 PM.
The Following 4 Users Say Thank You to xXx~~~SHLOK~~~xXx For This Useful Post: [ View ]
21st April 2014, 02:27 AM   |  #2  
Pocket Fan's Avatar
Member
Thanks Meter: 5
 
45 posts
Join Date:Joined: Mar 2014
Great guide!
The Following User Says Thank You to Pocket Fan For This Useful Post: [ View ]
21st April 2014, 07:33 AM   |  #3  
xXx~~~SHLOK~~~xXx's Avatar
OP Senior Member
Delhi
Thanks Meter: 395
 
518 posts
Join Date:Joined: Jul 2012
Quote:
Originally Posted by Pocket Fan

Great guide!

Its my first one. Did you try it?
The Following User Says Thank You to xXx~~~SHLOK~~~xXx For This Useful Post: [ View ]
22nd April 2014, 03:04 AM   |  #4  
Pocket Fan's Avatar
Member
Thanks Meter: 5
 
45 posts
Join Date:Joined: Mar 2014
Yes, I really will to try it.
But I don't know how to deodex the system.
22nd April 2014, 05:14 PM   |  #5  
rush25's Avatar
Recognized Themer
Flag Mumbai
Thanks Meter: 5,004
 
3,210 posts
Join Date:Joined: Nov 2011
Donate to Me
very helpful
22nd April 2014, 08:33 PM   |  #6  
xXx~~~SHLOK~~~xXx's Avatar
OP Senior Member
Delhi
Thanks Meter: 395
 
518 posts
Join Date:Joined: Jul 2012
Quote:
Originally Posted by Pocket Fan

Yes, I really will to try it.
But I don't know how to deodex the system.

Try this, i deodexed my stock rom with this.



http://forum.xda-developers.com/show....php?t=2213235

And I think it would work in odexed roms also.


Quote:
Originally Posted by rush25

very helpful

Thanks


Sent from my GT-I9500 using Tapatalk
23rd April 2014, 08:57 AM   |  #7  
Pocket Fan's Avatar
Member
Thanks Meter: 5
 
45 posts
Join Date:Joined: Mar 2014
Thank you very much.
I wiil try it.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Themes by ThreadRank