FORUMS

Top Forum Discussions

[MOD][HOW-TO] Fully disable app verification (FOR USER APPS)

9,082 posts
Thanks Meter: 13,896
 
By CNexus, Recognized Contributor on 28th April 2014, 02:21 AM
Post Reply Subscribe to Thread Email Thread
13th May 2014, 10:50 PM |#21  
CNexus's Avatar
OP Recognized Contributor
Flag ~/android
Thanks Meter: 13,896
 
Donate to Me
More
Well, that's the wrong method to be replacing to begin with.
 
 
4th October 2014, 05:35 AM |#22  
Sami Kabir's Avatar
Senior Member
Flag Manama
Thanks Meter: 1,284
 
Donate to Me
More
Quote:
Originally Posted by CNexus

Part 2: Allows installing older versions on top of newer versions

Note that this mod also lets you install unsigned versions over other current versions, as well as installing older versions on top of newer versions of an app

This is what .method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;I)I looks like in my PackageManagerService$InstallParams.smali:

Code:
.method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;I)I
    .locals 8

    const/4 v5, 0x2

    const/4 v4, 0x1

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

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

    and-int/lit8 v6, p2, 0x8

    if-eqz v6, :cond_0

    move v1, v4

    :goto_0
    iget-object v6, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->this$0:Lcom/android/server/pm/PackageManagerService;

    iget-object v6, v6, Lcom/android/server/pm/PackageManagerService;->mPackages:Ljava/util/HashMap;

    monitor-enter v6

    :try_start_0
    iget-object v7, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->this$0:Lcom/android/server/pm/PackageManagerService;

    iget-object v7, v7, Lcom/android/server/pm/PackageManagerService;->mPackages:Ljava/util/HashMap;

    invoke-virtual {v7, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

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

    if-eqz v3, :cond_5

    and-int/lit8 v7, p2, 0x2

    if-eqz v7, :cond_8

    iget-object v7, v3, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iget v7, v7, Landroid/content/pm/ApplicationInfo;->flags:I

    and-int/lit8 v7, v7, 0x1

    if-eqz v7, :cond_2

    if-eqz v1, :cond_1

    const-string v4, "PackageManager"

    const-string v5, "Cannot install update to system app on sdcard"

    invoke-static {v4, v5}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I

    const/4 v4, -0x3

    monitor-exit v6

    :goto_1
    return v4

    :cond_0
    const/4 v1, 0x0

    goto :goto_0

    :cond_1
    monitor-exit v6

    goto :goto_1

    :catchall_0
    move-exception v4

    monitor-exit v6
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v4

    :cond_2
    if-eqz v1, :cond_3

    :try_start_1
    monitor-exit v6

    move v4, v5

    goto :goto_1

    :cond_3
    if-ne v0, v4, :cond_4

    monitor-exit v6

    goto :goto_1

    :cond_4
    if-ne v0, v5, :cond_6

    :cond_5
    monitor-exit v6

    if-eqz v1, :cond_9

    move v4, v5

    goto :goto_1

    :cond_6
    #calls: Lcom/android/server/pm/PackageManagerService;->isExternal(Landroid/content/pm/PackageParser$Package;)Z
    invoke-static {v3}, Lcom/android/server/pm/PackageManagerService;->access$1900(Landroid/content/pm/PackageParser$Package;)Z

    move-result v7

    if-eqz v7, :cond_7

    monitor-exit v6

    move v4, v5

    goto :goto_1

    :cond_7
    monitor-exit v6

    goto :goto_1

    :cond_8
    const/4 v4, -0x4

    monitor-exit v6
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_1

    :cond_9
    iget v4, p1, Landroid/content/pm/PackageInfoLite;->recommendedInstallLocation:I

    goto :goto_1
.end method


I can't find the codes you mentioned...
Code:
if-nez v7, :cond_1

iget v7, p1, Landroid/content/pm/PackageInfoLite;->versionCode:I

iget v8, v3, Landroid/content/pm/PackageParser$Package;->mVersionCode:I

if-ge v7, v8, :cond_1

const-string v4, "PackageManager"

new-instance v5, Ljava/lang/StringBuilder;

invoke-direct {v5}, Ljava/lang/StringBuilder;->()V

const-string v7, "Can\'t install update of "
Last edited by Sami Kabir; 4th October 2014 at 05:38 AM.
20th January 2015, 09:26 AM |#23  
Senior Member
Flag Columbia
Thanks Meter: 1,102
 
Donate to Me
More
thanks for this
6th May 2015, 08:02 AM |#24  
talkingmonkeys's Avatar
Recognized Contributor / Themer
Thanks Meter: 4,252
 
Donate to Me
More
Just want to note that for lollipop instead of core.jar its core-libart.jar. Same edits in the same spots.
The Following User Says Thank You to talkingmonkeys For This Useful Post: [ View ]
15th May 2015, 10:03 AM |#25  
CNexus's Avatar
OP Recognized Contributor
Flag ~/android
Thanks Meter: 13,896
 
Donate to Me
More
Quote:
Originally Posted by talkingmonkeys

Just want to note that for lollipop instead of core.jar its core-libart.jar. Same edits in the same spots.

Just saw this, will update OP as soon as I get a chance!
The Following 2 Users Say Thank You to CNexus For This Useful Post: [ View ]
17th July 2015, 02:08 PM |#26  
AxAtAx's Avatar
Recognized Contributor
Flag ViSiON,Texas
Thanks Meter: 19,985
 
Donate to Me
More
Quote:
Originally Posted by CNexus

Just saw this, will update OP as soon as I get a chance!

Lol, I was just fixing to ask this question, looks like the answer is right here, Thanks @CNexus, good work, easy and quick!

btw, I didnt find the lollipop file info in the OP. just a reminder. or, I am blind, and did not see it.

Thank you sir for this!!!
The Following User Says Thank You to AxAtAx For This Useful Post: [ View ]
18th July 2015, 01:30 PM |#27  
Thebear j koss's Avatar
Senior Member
Flag NYC
Thanks Meter: 14,607
 
More
Quote:
Originally Posted by AxAtAx

Lol, I was just fixing to ask this question, looks like the answer is right here, Thanks @CNexus, good work, easy and quick!

btw, I didnt find the lollipop file info in the OP. just a reminder. or, I am blind, and did not see it.

Thank you sir for this!!!

Follow the same edits but in lib core jar instead. The jar file just has core added into the name.
The Following User Says Thank You to Thebear j koss For This Useful Post: [ View ]
29th July 2015, 07:23 PM |#28  
CNexus's Avatar
OP Recognized Contributor
Flag ~/android
Thanks Meter: 13,896
 
Donate to Me
More
OP updated with Lollipop info, better late than never!

Thanks @talkingmonkeys for pointing it out for me . Been out of the loop for too long
The Following 2 Users Say Thank You to CNexus For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
disable checking, disable signature, disable verification, remove signature checking, signature checking
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes