[Sprint Samsung Galaxy S III] starbucks2010:
Hello,

I'm on 5.1.1 and the I cannot find the method explained in step 2 . This is what I have in my method:

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

.locals 9

.param p1, "pkgLite" # Landroid/content/pm/PackageInfoLite;

.prologue

const/4 v6, 0x2

const/4 v5, 0x1

.line 13620

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

.line 13621

.local v3, "packageName":Ljava/lang/String;

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

.line 13622

.local v1, "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

.line 13624

.local v2, "onSd":Z

:goto_0

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

monitor-enter v7

.line 13625

: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;

.line 13626

.local v4, "pkg":Landroid/content/pm/PackageParser$Package;

if-eqz v4, :cond_6

.line 13627

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

and-int/lit8 v8, v8, 0x2

if-eqz v8, :cond_9

.line 13629

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-nez v8, :cond_0

.line 13631

: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$3100(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

.line 13638

:cond_0

:try_start_2

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

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

and-int/lit8 v8, v8, 0x1

if-eqz v8, :cond_3

.line 13639

if-eqz v2, :cond_2

.line 13640

const-string v5, "PackageManager"

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

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

.line 13641

const/4 v5, -0x3

monitor-exit v7

.line 13674

:goto_1

return v5

.line 13622

.end local v2 # "onSd":Z

.end local v4 # "pkg":Landroid/content/pm/PackageParser$Package;

:cond_1

const/4 v2, 0x0

goto :goto_0

.line 13632

.restart local v2 # "onSd":Z

.restart local v4 # "pkg":Landroid/content/pm/PackageParser$Package;

:catch_0

move-exception v0

.line 13633

.local v0, "e":Lcom/android/server/pm/PackageManagerException;

const-string v5, "PackageManager"

new-instance v6, Ljava/lang/StringBuilder;

invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

const-string v8, "Downgrade detected: "

invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v6

invoke-virtual {v0}, Lcom/android/server/pm/PackageManagerException;->getMessage()Ljava/lang/String;

move-result-object v8

invoke-virtual {v6, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v6

invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v6

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

.line 13634

const/4 v5, -0x7

monitor-exit v7

goto :goto_1

.line 13668

.end local v0 # "e":Lcom/android/server/pm/PackageManagerException;

.end local v4 # "pkg":Landroid/content/pm/PackageParser$Package;

:catchall_0

move-exception v5

monitor-exit v7

:try_end_2

.catchall {:try_start_2 .. :try_end_2} :catchall_0

throw v5

.line 13643

.restart local v4 # "pkg":Landroid/content/pm/PackageParser$Package;

:cond_2

:try_start_3

monitor-exit v7

goto :goto_1

.line 13645

:cond_3

if-eqz v2, :cond_4

.line 13647

monitor-exit v7

move v5, v6

goto :goto_1

.line 13650

:cond_4

if-ne v1, v5, :cond_5

.line 13652

monitor-exit v7

goto :goto_1

.line 13653

:cond_5

if-ne v1, v6, :cond_7

.line 13668

:cond_6

monitor-exit v7

.line 13671

if-eqz v2, :cond_a

move v5, v6

.line 13672

goto :goto_1

.line 13657

:cond_7

# invokes: Lcom/android/server/pm/PackageManagerService;->isExternal(Landroid/content/pm/PackageParser$Package;)Z

invoke-static {v4}, Lcom/android/server/pm/PackageManagerService;->access$1100(Landroid/content/pm/PackageParser$Package;)Z

move-result v8

if-eqz v8, :cond_8

.line 13658

monitor-exit v7

move v5, v6

goto :goto_1

.line 13660

:cond_8

monitor-exit v7

goto :goto_1

.line 13665

:cond_9

const/4 v5, -0x4

monitor-exit v7

:try_end_3

.catchall {:try_start_3 .. :try_end_3} :catchall_0

goto :goto_1

.line 13674

:cond_a

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

goto :goto_1

.end method

Can you help me please to adapt it?

Thank you in advance.