- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
385 lines
9.7 KiB
Smali
385 lines
9.7 KiB
Smali
.class public final Landroidx/core/content/PackageManagerCompat;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/core/content/PackageManagerCompat$Api30Impl;,
|
|
Landroidx/core/content/PackageManagerCompat$UnusedAppRestrictionsStatus;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final ACTION_PERMISSION_REVOCATION_SETTINGS:Ljava/lang/String; = "android.intent.action.AUTO_REVOKE_PERMISSIONS"
|
|
.annotation build Landroid/annotation/SuppressLint;
|
|
value = {
|
|
"ActionValue"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final LOG_TAG:Ljava/lang/String; = "PackageManagerCompat"
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 56
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static areUnusedAppRestrictionsAvailable(Landroid/content/pm/PackageManager;)Z
|
|
.locals 5
|
|
.param p0 # Landroid/content/pm/PackageManager;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/16 v3, 0x1e
|
|
|
|
if-lt v0, v3, :cond_0
|
|
|
|
move v4, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v4, v1
|
|
|
|
:goto_0
|
|
if-ge v0, v3, :cond_1
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move v0, v1
|
|
|
|
.line 203
|
|
:goto_1
|
|
invoke-static {p0}, Landroidx/core/content/PackageManagerCompat;->getPermissionRevocationVerifierApp(Landroid/content/pm/PackageManager;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
move p0, v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move p0, v1
|
|
|
|
:goto_2
|
|
if-nez v4, :cond_3
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
:cond_3
|
|
move v1, v2
|
|
|
|
:cond_4
|
|
return v1
|
|
.end method
|
|
|
|
.method public static getPermissionRevocationVerifierApp(Landroid/content/pm/PackageManager;)Ljava/lang/String;
|
|
.locals 4
|
|
.param p0 # Landroid/content/pm/PackageManager;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
.line 219
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.AUTO_REVOKE_PERMISSIONS"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "package"
|
|
|
|
const-string v2, "com.example"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 221
|
|
invoke-static {v1, v2, v3}, Landroid/net/Uri;->fromParts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 224
|
|
invoke-virtual {p0, v0, v1}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
.line 229
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/content/pm/ResolveInfo;
|
|
|
|
.line 230
|
|
iget-object v1, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
|
|
|
|
iget-object v1, v1, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;
|
|
|
|
const-string v2, "android.permission.PACKAGE_VERIFICATION_AGENT"
|
|
|
|
.line 231
|
|
invoke-virtual {p0, v2, v1}, Landroid/content/pm/PackageManager;->checkPermission(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-eqz v3, :cond_1
|
|
|
|
return-object v3
|
|
|
|
:cond_1
|
|
move-object v3, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-object v3
|
|
.end method
|
|
|
|
.method public static getUnusedAppRestrictionsStatus(Landroid/content/Context;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
.locals 7
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Context;",
|
|
")",
|
|
"Lcom/google/common/util/concurrent/ListenableFuture;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 135
|
|
invoke-static {}, Landroidx/concurrent/futures/ResolvableFuture;->create()Landroidx/concurrent/futures/ResolvableFuture;
|
|
|
|
move-result-object v0
|
|
|
|
.line 138
|
|
invoke-static {p0}, Landroidx/core/os/UserManagerCompat;->isUserUnlocked(Landroid/content/Context;)Z
|
|
|
|
move-result v1
|
|
|
|
const-string v2, "PackageManagerCompat"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 139
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
invoke-virtual {v0, v3}, Landroidx/concurrent/futures/ResolvableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
const-string p0, "User is in locked direct boot mode"
|
|
|
|
.line 140
|
|
invoke-static {v2, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
return-object v0
|
|
|
|
.line 144
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Landroidx/core/content/PackageManagerCompat;->areUnusedAppRestrictionsAvailable(Landroid/content/pm/PackageManager;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
.line 145
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroidx/concurrent/futures/ResolvableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
return-object v0
|
|
|
|
.line 149
|
|
:cond_1
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v1
|
|
|
|
iget v1, v1, Landroid/content/pm/ApplicationInfo;->targetSdkVersion:I
|
|
|
|
const/16 v4, 0x1e
|
|
|
|
if-ge v1, v4, :cond_2
|
|
|
|
.line 152
|
|
invoke-virtual {v0, v3}, Landroidx/concurrent/futures/ResolvableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
const-string p0, "Target SDK version below API 30"
|
|
|
|
.line 153
|
|
invoke-static {v2, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
return-object v0
|
|
|
|
:cond_2
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/4 v3, 0x2
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/16 v6, 0x1f
|
|
|
|
if-lt v2, v6, :cond_5
|
|
|
|
.line 159
|
|
invoke-static {p0}, Landroidx/core/content/PackageManagerCompat$Api30Impl;->areUnusedAppRestrictionsEnabled(Landroid/content/Context;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
if-lt v1, v6, :cond_3
|
|
|
|
const/4 v5, 0x5
|
|
|
|
.line 162
|
|
:cond_3
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroidx/concurrent/futures/ResolvableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 164
|
|
:cond_4
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroidx/concurrent/futures/ResolvableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
:cond_5
|
|
if-ne v2, v4, :cond_7
|
|
|
|
.line 171
|
|
invoke-static {p0}, Landroidx/core/content/PackageManagerCompat$Api30Impl;->areUnusedAppRestrictionsEnabled(Landroid/content/Context;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_6
|
|
|
|
move v3, v5
|
|
|
|
:cond_6
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
.line 170
|
|
invoke-virtual {v0, p0}, Landroidx/concurrent/futures/ResolvableFuture;->set(Ljava/lang/Object;)Z
|
|
|
|
return-object v0
|
|
|
|
.line 177
|
|
:cond_7
|
|
new-instance v1, Landroidx/core/content/UnusedAppRestrictionsBackportServiceConnection;
|
|
|
|
invoke-direct {v1, p0}, Landroidx/core/content/UnusedAppRestrictionsBackportServiceConnection;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 183
|
|
new-instance p0, Landroidx/core/content/PackageManagerCompat$$ExternalSyntheticLambda0;
|
|
|
|
invoke-direct {p0, v1}, Landroidx/core/content/PackageManagerCompat$$ExternalSyntheticLambda0;-><init>(Landroidx/core/content/UnusedAppRestrictionsBackportServiceConnection;)V
|
|
|
|
.line 184
|
|
invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor()Ljava/util/concurrent/ExecutorService;
|
|
|
|
move-result-object v2
|
|
|
|
.line 182
|
|
invoke-virtual {v0, p0, v2}, Landroidx/concurrent/futures/AbstractResolvableFuture;->addListener(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
|
|
|
|
.line 187
|
|
invoke-virtual {v1, v0}, Landroidx/core/content/UnusedAppRestrictionsBackportServiceConnection;->connectAndFetchResult(Landroidx/concurrent/futures/ResolvableFuture;)V
|
|
|
|
return-object v0
|
|
.end method
|