BundleArchiveRevision.smali
.class public Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;
.super Ljava/lang/Object;
.source "BundleArchiveRevision.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$DexLoadException;,
Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$BundleArchiveRevisionClassLoader;
}
.end annotation
# static fields
.field private static final FILE_PROTOCOL:Ljava/lang/String; = "file:"
.field private static final log:Lorg/acdd/log/Logger;
# instance fields
.field private bundleCRC:J
.field private final bundleFile:Ljava/io/File;
.field private dexClassLoader:Ljava/lang/ClassLoader;
.field private dexFile:Ldalvik/system/DexFile;
.field private extraDexFile:Ldalvik/system/DexFile;
.field private isExtractedSecondaryDex:Z
.field private isSecondaryDexExists:Z
.field private final location:Ljava/lang/String;
.field private mLockInjectThisResource:Ljava/lang/Object;
.field private final revisionDir:Ljava/io/File;
.field private final revisionLocation:Ljava/lang/String;
.field private final revisionNum:J
.field private zipFile:Ljava/util/zip/ZipFile;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 127
invoke-static {}, Lorg/acdd/log/LoggerFactory;->getInstance()Lorg/acdd/log/Logger;
move-result-object v0
sput-object v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
.line 128
return-void
.end method
.method constructor <init>(Ljava/lang/String;JLjava/io/File;)V
.registers 7
.prologue
const/4 v0, 0x0
.line 248
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 85
iput-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isExtractedSecondaryDex:Z
.line 86
iput-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
.line 450
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->mLockInjectThisResource:Ljava/lang/Object;
.line 249
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "bundle.apk"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionLocation:Ljava/lang/String;
.line 251
iput-object p1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
.line 252
iput-wide p2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionNum:J
.line 253
iput-object p4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
.line 254
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_3d
.line 255
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
.line 258
:cond_3d
new-instance v0, Ljava/io/File;
const-string v1, "bundle.apk"
invoke-direct {v0, p4, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 259
invoke-virtual {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->computeBundleCrc()V
.line 260
return-void
.end method
.method constructor <init>(Ljava/lang/String;JLjava/io/File;Ljava/io/InputStream;)V
.registers 14
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
const/4 v0, 0x0
.line 131
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 85
iput-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isExtractedSecondaryDex:Z
.line 86
iput-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
.line 450
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->mLockInjectThisResource:Ljava/lang/Object;
.line 132
iput-wide p2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionNum:J
.line 133
iput-object p4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
.line 134
iput-object p1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
.line 135
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_22
.line 136
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
.line 138
:cond_22
const-string v0, "file:"
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionLocation:Ljava/lang/String;
.line 139
new-instance v0, Ljava/io/File;
const-string v1, "bundle.apk"
invoke-direct {v0, p4, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 141
invoke-static {}, Lorg/acdd/bundleInfo/BundleInfoList;->getInstance()Lorg/acdd/bundleInfo/BundleInfoList;
move-result-object v0
.line 143
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
.line 144
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v4}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
.line 146
:try_start_40
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_89
invoke-virtual {p5}, Ljava/io/InputStream;->available()I
move-result v1
int-to-long v4, v1
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->length()J
move-result-wide v6
cmp-long v1, v4, v6
if-nez v1, :cond_89
.line 147
sget-object v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "[PluginInstall] copy by other process:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-interface {v1, v2}, Lorg/acdd/log/Logger;->warn(Ljava/lang/String;)V
:try_end_75
.catchall {:try_start_40 .. :try_end_75} :catchall_117
.line 164
:goto_75
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
.line 167
sget-boolean v1, Lorg/acdd/android/compat/AppBuildConfig;->DEBUG:Z
if-eqz v1, :cond_85
.line 168
invoke-virtual {v0}, Lorg/acdd/bundleInfo/BundleInfoList;->dumpBundleInfos()V
.line 171
:cond_85
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->afterBundleSettled()V
.line 172
return-void
.line 150
:cond_89
:try_start_89
sget-object v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "[PluginInstall] copy by this process:"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v5}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-interface {v1, v4}, Lorg/acdd/log/Logger;->warn(Ljava/lang/String;)V
.line 151
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-static {p5, v1}, Lorg/acdd/util/ApkUtils;->copyInputStreamToFile(Ljava/io/InputStream;Ljava/io/File;)J
.line 152
invoke-direct {p0, p1, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->installSo(Ljava/lang/String;Lorg/acdd/bundleInfo/BundleInfoList;)V
.line 153
sget-object v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "[PluginInstall][PluginTime] copy Plugin["
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, "] cost:"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
sub-long v2, v6, v2
invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "ms"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-interface {v1, v2}, Lorg/acdd/log/Logger;->warn(Ljava/lang/String;)V
:try_end_df
.catch Ljava/io/IOException; {:try_start_89 .. :try_end_df} :catch_e0
.catchall {:try_start_89 .. :try_end_df} :catchall_117
goto :goto_75
.line 154
:catch_e0
move-exception v0
.line 156
:try_start_e1
invoke-static {p4}, Lorg/acdd/util/ACDDUtils;->deletePluginDirectory(Ljava/io/File;)V
.line 157
invoke-static {}, Lorg/acdd/framework/ACDD;->getInstance()Lorg/acdd/framework/ACDD;
move-result-object v1
const-string v2, "4056"
new-instance v3, Ljava/lang/RuntimeException;
iget-object v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v4
invoke-direct {v3, v4, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
invoke-virtual {v1, v2, v3}, Lorg/acdd/framework/ACDD;->reportCrash(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 158
sget-object v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "[PluginInstall] copy File error:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-interface {v1, v2, v0}, Lorg/acdd/log/Logger;->error(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 159
throw v0
:try_end_117
.catchall {:try_start_e1 .. :try_end_117} :catchall_117
.line 164
:catchall_117
move-exception v0
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
throw v0
.end method
.method static synthetic access$000(Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;)V
.registers 1
.prologue
.line 72
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->updateMetadata()V
return-void
.end method
.method private afterBundleSettled()V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 236
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
.line 238
:try_start_9
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-static {v0}, Lorg/acdd/util/ACDDUtils;->assertZipFileLegal(Ljava/io/File;)V
:try_end_e
.catchall {:try_start_9 .. :try_end_e} :catchall_22
.line 240
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
.line 243
const/4 v0, 0x1
invoke-direct {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->tryExtractExtraDex(I)V
.line 244
invoke-virtual {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->computeBundleCrc()V
.line 245
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->updateMetadata()V
.line 246
return-void
.line 240
:catchall_22
move-exception v0
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
throw v0
.end method
.method private afterLoadedDex()V
.registers 3
.prologue
.line 680
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexClassLoader:Ljava/lang/ClassLoader;
if-eqz v0, :cond_1a
.line 681
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lorg/acdd/framework/BundleManager;->addLoadedDexPath(Ljava/lang/String;)V
.line 682
sget-object v0, Lorg/acdd/runtime/RuntimeVariables;->delegateResources:Landroid/content/res/Resources;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
invoke-static {v0, v1}, Lorg/acdd/runtime/DelegateResources;->isAlreadyInjectThisResource(Landroid/content/res/Resources;Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_1a
.line 683
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->injectThisResource()V
.line 686
:cond_1a
return-void
.end method
.method private assembleSecondaryDex(Ljava/util/zip/ZipFile;Ljava/util/zip/ZipEntry;)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
const/4 v3, 0x1
.line 838
sget-object v0, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
if-eqz v0, :cond_d
sget-object v0, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
invoke-virtual {v0}, Lorg/acdd/hack/Hack$HackedClass;->getmClass()Ljava/lang/Class;
move-result-object v0
if-nez v0, :cond_43
.line 840
:cond_d
const/4 v2, 0x0
.line 842
:try_start_e
new-instance v0, Ljava/io/File;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v3, "bundle2.apk"
invoke-direct {v0, v1, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 843
new-instance v1, Ljava/util/zip/ZipOutputStream;
new-instance v3, Ljava/io/FileOutputStream;
invoke-direct {v3, v0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
invoke-direct {v1, v3}, Ljava/util/zip/ZipOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_21
.catchall {:try_start_e .. :try_end_21} :catchall_3b
.line 845
:try_start_21
new-instance v0, Ljava/util/zip/ZipEntry;
const-string v2, "classes.dex"
invoke-direct {v0, v2}, Ljava/util/zip/ZipEntry;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, v0}, Ljava/util/zip/ZipOutputStream;->putNextEntry(Ljava/util/zip/ZipEntry;)V
.line 846
invoke-virtual {p1, p2}, Ljava/util/zip/ZipFile;->getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
move-result-object v0
invoke-static {v0, v1}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extractZipEntry(Ljava/io/InputStream;Ljava/io/OutputStream;)V
.line 848
const/4 v0, 0x1
iput-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
:try_end_35
.catchall {:try_start_21 .. :try_end_35} :catchall_5a
.line 851
if-eqz v1, :cond_3a
:try_start_37
invoke-virtual {v1}, Ljava/util/zip/ZipOutputStream;->close()V
:try_end_3a
.catch Ljava/io/IOException; {:try_start_37 .. :try_end_3a} :catch_56
.line 860
:cond_3a
:goto_3a
return-void
.line 850
:catchall_3b
move-exception v0
move-object v1, v2
.line 851
:goto_3d
if-eqz v1, :cond_42
:try_start_3f
invoke-virtual {v1}, Ljava/util/zip/ZipOutputStream;->close()V
:try_end_42
.catch Ljava/io/IOException; {:try_start_3f .. :try_end_42} :catch_58
.line 853
:cond_42
:goto_42
throw v0
.line 856
:cond_43
new-instance v0, Ljava/io/File;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v2, "bundle2.dex"
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 857
invoke-virtual {p1, p2}, Ljava/util/zip/ZipFile;->getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
move-result-object v1
invoke-static {v1, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extractZipEntry(Ljava/io/InputStream;Ljava/io/File;)V
.line 858
iput-boolean v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
goto :goto_3a
.line 852
:catch_56
move-exception v0
goto :goto_3a
:catch_58
move-exception v1
goto :goto_42
.line 850
:catchall_5a
move-exception v0
goto :goto_3d
.end method
.method private ensureZipFile()V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
.line 718
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->zipFile:Ljava/util/zip/ZipFile;
if-nez v0, :cond_e
.line 719
new-instance v0, Ljava/util/zip/ZipFile;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
const/4 v2, 0x1
invoke-direct {v0, v1, v2}, Ljava/util/zip/ZipFile;-><init>(Ljava/io/File;I)V
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->zipFile:Ljava/util/zip/ZipFile;
.line 721
:cond_e
return-void
.end method
.method private extractSecondaryDexIfNecessary()V
.registers 13
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
const/4 v0, 0x0
const/4 v2, 0x1
.line 765
iget-boolean v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isExtractedSecondaryDex:Z
if-eqz v1, :cond_7
.line 835
:cond_6
:goto_6
return-void
.line 766
:cond_7
iput-boolean v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isExtractedSecondaryDex:Z
.line 768
sget-object v3, Lorg/acdd/android/compat/AppBuildConfig;->PROCESSNAME:Ljava/lang/String;
.line 769
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v4
.line 770
const-string v1, "extractSecondaryDex"
.line 772
const/4 v2, 0x0
.line 775
:try_start_12
invoke-static {}, Landroid/support/multidex/b;->a()V
.line 777
new-instance v1, Ljava/io/File;
iget-object v6, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v7, "bundle2.dex"
invoke-direct {v1, v6, v7}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
:try_end_1e
.catch Ljava/lang/UnsupportedOperationException; {:try_start_12 .. :try_end_1e} :catch_11a
.catchall {:try_start_12 .. :try_end_1e} :catchall_12d
.line 778
:try_start_1e
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v6
invoke-virtual {v6, v1}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
.line 780
invoke-virtual {v1}, Ljava/io/File;->length()J
move-result-wide v6
.line 781
const-wide/16 v8, 0x0
cmp-long v8, v6, v8
if-lez v8, :cond_65
.line 782
const-string v8, "extractSecondaryDex"
new-instance v9, Ljava/lang/StringBuilder;
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "["
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
const-string v10, "] found length : "
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v8, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 783
const/4 v6, 0x1
iput-boolean v6, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
:try_end_54
.catch Ljava/lang/UnsupportedOperationException; {:try_start_1e .. :try_end_54} :catch_14a
.catchall {:try_start_1e .. :try_end_54} :catchall_143
.line 827
if-eqz v0, :cond_59
:try_start_56
invoke-virtual {v2}, Ljava/util/zip/ZipFile;->close()V
.line 828
:cond_59
if-eqz v1, :cond_6
.line 829
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_62
.catch Ljava/lang/Exception; {:try_start_56 .. :try_end_62} :catch_63
goto :goto_6
.line 831
:catch_63
move-exception v0
goto :goto_6
.line 787
:cond_65
:try_start_65
const-string v2, "extractSecondaryDex"
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "["
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, "] start"
invoke-virtual {v6, v7}, 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 {v2, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 811
new-instance v2, Ljava/util/zip/ZipFile;
iget-object v6, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-direct {v2, v6}, Ljava/util/zip/ZipFile;-><init>(Ljava/io/File;)V
:try_end_8a
.catch Ljava/lang/UnsupportedOperationException; {:try_start_65 .. :try_end_8a} :catch_14a
.catchall {:try_start_65 .. :try_end_8a} :catchall_143
.line 812
:try_start_8a
invoke-virtual {v2}, Ljava/util/zip/ZipFile;->entries()Ljava/util/Enumeration;
move-result-object v6
.line 813
:cond_8e
invoke-interface {v6}, Ljava/util/Enumeration;->hasMoreElements()Z
move-result v0
if-eqz v0, :cond_e3
.line 814
invoke-interface {v6}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/zip/ZipEntry;
.line 815
invoke-virtual {v0}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;
move-result-object v7
.line 817
const-string v8, "classes2.dex"
invoke-virtual {v8, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_8e
.line 818
invoke-direct {p0, v2, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->assembleSecondaryDex(Ljava/util/zip/ZipFile;Ljava/util/zip/ZipEntry;)V
.line 819
const-string v0, "extractSecondaryDex"
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "["
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, "] succeed elapsed time[ms] : "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v8
sub-long/2addr v8, v4
invoke-virtual {v6, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v0, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_d0
.catch Ljava/lang/UnsupportedOperationException; {:try_start_8a .. :try_end_d0} :catch_14f
.catchall {:try_start_8a .. :try_end_d0} :catchall_148
.line 827
if-eqz v2, :cond_d5
:try_start_d2
invoke-virtual {v2}, Ljava/util/zip/ZipFile;->close()V
.line 828
:cond_d5
if-eqz v1, :cond_6
.line 829
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_de
.catch Ljava/lang/Exception; {:try_start_d2 .. :try_end_de} :catch_e0
goto/16 :goto_6
.line 831
:catch_e0
move-exception v0
goto/16 :goto_6
.line 827
:cond_e3
if-eqz v2, :cond_e8
:try_start_e5
invoke-virtual {v2}, Ljava/util/zip/ZipFile;->close()V
.line 828
:cond_e8
if-eqz v1, :cond_f1
.line 829
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_f1
.catch Ljava/lang/Exception; {:try_start_e5 .. :try_end_f1} :catch_153
.line 834
:cond_f1
:goto_f1
const-string v0, "extractSecondaryDex"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "["
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "] done elapsed time[ms] : "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
sub-long/2addr v2, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_6
.line 823
:catch_11a
move-exception v1
move-object v1, v0
.line 827
:goto_11c
if-eqz v1, :cond_121
:try_start_11e
invoke-virtual {v1}, Ljava/util/zip/ZipFile;->close()V
.line 828
:cond_121
if-eqz v0, :cond_f1
.line 829
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
invoke-virtual {v1, v0}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_12a
.catch Ljava/lang/Exception; {:try_start_11e .. :try_end_12a} :catch_12b
goto :goto_f1
.line 831
:catch_12b
move-exception v0
goto :goto_f1
.line 826
:catchall_12d
move-exception v1
move-object v2, v0
move-object v11, v0
move-object v0, v1
move-object v1, v11
.line 827
:goto_132
if-eqz v2, :cond_137
:try_start_134
invoke-virtual {v2}, Ljava/util/zip/ZipFile;->close()V
.line 828
:cond_137
if-eqz v1, :cond_140
.line 829
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v2
invoke-virtual {v2, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_140
.catch Ljava/lang/Exception; {:try_start_134 .. :try_end_140} :catch_141
.line 832
:cond_140
:goto_140
throw v0
.line 831
:catch_141
move-exception v1
goto :goto_140
.line 826
:catchall_143
move-exception v2
move-object v11, v2
move-object v2, v0
move-object v0, v11
goto :goto_132
:catchall_148
move-exception v0
goto :goto_132
.line 823
:catch_14a
move-exception v2
move-object v11, v1
move-object v1, v0
move-object v0, v11
goto :goto_11c
:catch_14f
move-exception v0
move-object v0, v1
move-object v1, v2
goto :goto_11c
.line 831
:catch_153
move-exception v0
goto :goto_f1
.end method
.method private static extractZipEntry(Ljava/io/InputStream;Ljava/io/File;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
.line 563
new-instance v0, Ljava/io/BufferedOutputStream;
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
invoke-direct {v0, v1}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
.line 564
invoke-static {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extractZipEntry(Ljava/io/InputStream;Ljava/io/OutputStream;)V
.line 565
return-void
.end method
.method private static extractZipEntry(Ljava/io/InputStream;Ljava/io/OutputStream;)V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
.line 568
const/4 v2, 0x0
.line 570
:try_start_1
new-instance v1, Ljava/io/BufferedInputStream;
invoke-direct {v1, p0}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V
:try_end_6
.catchall {:try_start_1 .. :try_end_6} :catchall_25
.line 572
const/16 v0, 0x1000
:try_start_8
new-array v2, v0, [B
.line 573
invoke-virtual {v1, v2}, Ljava/io/BufferedInputStream;->read([B)I
move-result v0
:goto_e
const/4 v3, -0x1
if-eq v0, v3, :cond_1a
.line 575
const/4 v3, 0x0
invoke-virtual {p1, v2, v3, v0}, Ljava/io/OutputStream;->write([BII)V
.line 574
invoke-virtual {v1, v2}, Ljava/io/BufferedInputStream;->read([B)I
:try_end_18
.catchall {:try_start_8 .. :try_end_18} :catchall_3a
move-result v0
goto :goto_e
.line 579
:cond_1a
if-eqz v1, :cond_1f
:try_start_1c
invoke-virtual {v1}, Ljava/io/BufferedInputStream;->close()V
:try_end_1f
.catch Ljava/io/IOException; {:try_start_1c .. :try_end_1f} :catch_32
.line 583
:cond_1f
:goto_1f
if-eqz p1, :cond_24
:try_start_21
invoke-virtual {p1}, Ljava/io/OutputStream;->close()V
:try_end_24
.catch Ljava/io/IOException; {:try_start_21 .. :try_end_24} :catch_34
.line 587
:cond_24
:goto_24
return-void
.line 578
:catchall_25
move-exception v0
move-object v1, v2
.line 579
:goto_27
if-eqz v1, :cond_2c
:try_start_29
invoke-virtual {v1}, Ljava/io/BufferedInputStream;->close()V
:try_end_2c
.catch Ljava/io/IOException; {:try_start_29 .. :try_end_2c} :catch_36
.line 583
:cond_2c
:goto_2c
if-eqz p1, :cond_31
:try_start_2e
invoke-virtual {p1}, Ljava/io/OutputStream;->close()V
:try_end_31
.catch Ljava/io/IOException; {:try_start_2e .. :try_end_31} :catch_38
.line 585
:cond_31
:goto_31
throw v0
.line 580
:catch_32
move-exception v0
goto :goto_1f
.line 584
:catch_34
move-exception v0
goto :goto_24
.line 580
:catch_36
move-exception v1
goto :goto_2c
.line 584
:catch_38
move-exception v1
goto :goto_31
.line 578
:catchall_3a
move-exception v0
goto :goto_27
.end method
.method private injectThisResource()V
.registers 7
.prologue
.line 453
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->mLockInjectThisResource:Ljava/lang/Object;
monitor-enter v1
.line 454
:try_start_3
sget-object v0, Lorg/acdd/runtime/RuntimeVariables;->delegateResources:Landroid/content/res/Resources;
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
invoke-static {v0, v2}, Lorg/acdd/runtime/DelegateResources;->isAlreadyInjectThisResource(Landroid/content/res/Resources;Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_f
.line 455
monitor-exit v1
:try_end_e
.catchall {:try_start_3 .. :try_end_e} :catchall_64
.line 474
:goto_e
return-void
.line 458
:cond_f
:try_start_f
invoke-static {}, Lorg/acdd/runtime/DelegateResources;->getAssetHistoryPaths()Ljava/lang/String;
move-result-object v0
.line 459
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_67
.line 460
sget-object v0, Lorg/acdd/runtime/RuntimeVariables;->androidApplication:Landroid/app/Application;
sget-object v2, Lorg/acdd/runtime/RuntimeVariables;->delegateResources:Landroid/content/res/Resources;
const/4 v3, 0x0
const/4 v4, 0x1
.line 461
invoke-static {v0, v2, v3, v4}, Lorg/acdd/runtime/DelegateResources;->newDelegateResources(Landroid/app/Application;Landroid/content/res/Resources;Ljava/lang/String;Z)V
.line 466
:goto_28
sget-object v0, Lorg/acdd/runtime/RuntimeVariables;->delegateResources:Landroid/content/res/Resources;
.line 467
invoke-virtual {v0}, Landroid/content/res/Resources;->getAssets()Landroid/content/res/AssetManager;
move-result-object v0
invoke-static {v0}, Lorg/acdd/runtime/DelegateResources;->getOriginAssetsPath(Landroid/content/res/AssetManager;)Ljava/util/List;
move-result-object v0
.line 468
invoke-static {}, Lorg/acdd/framework/ACDD;->getInstance()Lorg/acdd/framework/ACDD;
move-result-object v2
const-string v3, "4052"
new-instance v4, Ljava/lang/RuntimeException;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v5, "\n"
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Lorg/acdd/util/ACDDUtils;->getCurStackTrace()Ljava/lang/String;
move-result-object v5
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v4, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v3, v4}, Lorg/acdd/framework/ACDD;->reportCrash(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 469
sget-object v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
const-string v2, "retry injectThisResource"
invoke-interface {v0, v2}, Lorg/acdd/log/Logger;->info(Ljava/lang/String;)V
:try_end_62
.catch Ljava/lang/Throwable; {:try_start_f .. :try_end_62} :catch_76
.catchall {:try_start_f .. :try_end_62} :catchall_64
.line 473
:goto_62
:try_start_62
monitor-exit v1
goto :goto_e
:catchall_64
move-exception v0
monitor-exit v1
:try_end_66
.catchall {:try_start_62 .. :try_end_66} :catchall_64
throw v0
.line 463
:cond_67
:try_start_67
sget-object v0, Lorg/acdd/runtime/RuntimeVariables;->androidApplication:Landroid/app/Application;
sget-object v2, Lorg/acdd/runtime/RuntimeVariables;->delegateResources:Landroid/content/res/Resources;
iget-object v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 464
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
const/4 v4, 0x1
invoke-static {v0, v2, v3, v4}, Lorg/acdd/runtime/DelegateResources;->newDelegateResources(Landroid/app/Application;Landroid/content/res/Resources;Ljava/lang/String;Z)V
:try_end_75
.catch Ljava/lang/Throwable; {:try_start_67 .. :try_end_75} :catch_76
.catchall {:try_start_67 .. :try_end_75} :catchall_64
goto :goto_28
.line 470
:catch_76
move-exception v0
.line 471
:try_start_77
sget-object v2, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
const-string v3, "retry injectThisResource error"
invoke-interface {v2, v3, v0}, Lorg/acdd/log/Logger;->error(Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_7e
.catchall {:try_start_77 .. :try_end_7e} :catchall_64
goto :goto_62
.end method
.method private installSo(Ljava/lang/String;Lorg/acdd/bundleInfo/BundleInfoList;)V
.registers 4
.prologue
.line 511
invoke-virtual {p2, p1}, Lorg/acdd/bundleInfo/BundleInfoList;->getHasSO(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_b
.line 512
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-direct {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->installSoLib(Ljava/io/File;)V
.line 514
:cond_b
return-void
.end method
.method private installSoLib(Ljava/io/File;)V
.registers 11
.prologue
.line 517
const/4 v2, 0x0
.line 519
:try_start_1
new-instance v1, Ljava/util/zip/ZipFile;
invoke-direct {v1, p1}, Ljava/util/zip/ZipFile;-><init>(Ljava/io/File;)V
:try_end_6
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_6} :catch_cd
.catchall {:try_start_1 .. :try_end_6} :catchall_ca
.line 520
:try_start_6
invoke-virtual {v1}, Ljava/util/zip/ZipFile;->entries()Ljava/util/Enumeration;
move-result-object v3
.line 521
:cond_a
:goto_a
invoke-interface {v3}, Ljava/util/Enumeration;->hasMoreElements()Z
move-result v0
if-eqz v0, :cond_be
.line 522
invoke-interface {v3}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/zip/ZipEntry;
.line 523
invoke-virtual {v0}, Ljava/util/zip/ZipEntry;->getName()Ljava/lang/String;
move-result-object v4
.line 524
const-string v2, "armeabi"
.line 525
sget-object v5, Landroid/os/Build;->CPU_ABI:Ljava/lang/String;
const-string/jumbo v6, "x86"
invoke-virtual {v5, v6}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v5
if-eqz v5, :cond_2a
.line 526
const-string/jumbo v2, "x86"
.line 528
:cond_2a
const-string v5, "%s%s"
const/4 v6, 0x2
new-array v6, v6, [Ljava/lang/Object;
const/4 v7, 0x0
const-string v8, "lib/"
aput-object v8, v6, v7
const/4 v7, 0x1
aput-object v2, v6, v7
invoke-static {v5, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_a
.line 529
const-string v2, "%s%s%s%s%s"
const/4 v5, 0x5
new-array v5, v5, [Ljava/lang/Object;
const/4 v6, 0x0
iget-object v7, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
aput-object v7, v5, v6
const/4 v6, 0x1
sget-object v7, Ljava/io/File;->separator:Ljava/lang/String;
aput-object v7, v5, v6
const/4 v6, 0x2
const-string v7, "lib"
aput-object v7, v5, v6
const/4 v6, 0x3
sget-object v7, Ljava/io/File;->separator:Ljava/lang/String;
aput-object v7, v5, v6
const/4 v6, 0x4
sget-object v7, Ljava/io/File;->separator:Ljava/lang/String;
.line 536
invoke-virtual {v4, v7}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
move-result v7
add-int/lit8 v7, v7, 0x1
.line 537
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v8
.line 535
invoke-virtual {v4, v7, v8}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v4
aput-object v4, v5, v6
.line 530
invoke-static {v2, v5}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
.line 538
invoke-virtual {v0}, Ljava/util/zip/ZipEntry;->isDirectory()Z
move-result v4
if-eqz v4, :cond_90
.line 539
new-instance v0, Ljava/io/File;
invoke-direct {v0, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 540
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v2
if-nez v2, :cond_a
.line 541
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
:try_end_85
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_85} :catch_86
.catchall {:try_start_6 .. :try_end_85} :catchall_b7
goto :goto_a
.line 552
:catch_86
move-exception v0
.line 553
:goto_87
:try_start_87
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
:try_end_8a
.catchall {:try_start_87 .. :try_end_8a} :catchall_b7
.line 556
if-eqz v1, :cond_8f
:try_start_8c
invoke-virtual {v1}, Ljava/util/zip/ZipFile;->close()V
:try_end_8f
.catch Ljava/lang/Exception; {:try_start_8c .. :try_end_8f} :catch_c6
.line 560
:cond_8f
:goto_8f
return-void
.line 544
:cond_90
:try_start_90
new-instance v4, Ljava/io/File;
const/4 v5, 0x0
const-string v6, "/"
invoke-virtual {v2, v6}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
move-result v6
invoke-virtual {v2, v5, v6}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v5
invoke-direct {v4, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 545
invoke-virtual {v4}, Ljava/io/File;->exists()Z
move-result v5
if-nez v5, :cond_a9
.line 546
invoke-virtual {v4}, Ljava/io/File;->mkdirs()Z
.line 548
:cond_a9
invoke-virtual {v1, v0}, Ljava/util/zip/ZipFile;->getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
move-result-object v0
new-instance v4, Ljava/io/File;
invoke-direct {v4, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-static {v0, v4}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extractZipEntry(Ljava/io/InputStream;Ljava/io/File;)V
:try_end_b5
.catch Ljava/lang/Exception; {:try_start_90 .. :try_end_b5} :catch_86
.catchall {:try_start_90 .. :try_end_b5} :catchall_b7
goto/16 :goto_a
.line 555
:catchall_b7
move-exception v0
.line 556
:goto_b8
if-eqz v1, :cond_bd
:try_start_ba
invoke-virtual {v1}, Ljava/util/zip/ZipFile;->close()V
:try_end_bd
.catch Ljava/lang/Exception; {:try_start_ba .. :try_end_bd} :catch_c8
.line 558
:cond_bd
:goto_bd
throw v0
.line 556
:cond_be
if-eqz v1, :cond_8f
:try_start_c0
invoke-virtual {v1}, Ljava/util/zip/ZipFile;->close()V
:try_end_c3
.catch Ljava/lang/Exception; {:try_start_c0 .. :try_end_c3} :catch_c4
goto :goto_8f
.line 557
:catch_c4
move-exception v0
goto :goto_8f
:catch_c6
move-exception v0
goto :goto_8f
:catch_c8
move-exception v1
goto :goto_bd
.line 555
:catchall_ca
move-exception v0
move-object v1, v2
goto :goto_b8
.line 552
:catch_cd
move-exception v0
move-object v1, v2
goto :goto_87
.end method
.method private isAlreadyInjectThisResource()Z
.registers 4
.prologue
const/4 v0, 0x0
.line 438
:try_start_1
sget-object v1, Lorg/acdd/runtime/RuntimeVariables;->delegateResources:Landroid/content/res/Resources;
.line 439
invoke-virtual {v1}, Landroid/content/res/Resources;->getAssets()Landroid/content/res/AssetManager;
move-result-object v1
invoke-static {v1}, Lorg/acdd/runtime/DelegateResources;->getOriginAssetsPath(Landroid/content/res/AssetManager;)Ljava/util/List;
move-result-object v1
.line 440
if-nez v1, :cond_e
.line 447
:cond_d
:goto_d
return v0
.line 443
:cond_e
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
:try_end_17
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_17} :catch_1c
move-result v1
if-eqz v1, :cond_d
.line 444
const/4 v0, 0x1
goto :goto_d
.line 446
:catch_1c
move-exception v1
goto :goto_d
.end method
.method private isSameDriver(Ljava/io/File;Ljava/io/File;)Z
.registers 7
.prologue
.line 711
.line 712
invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
const-string v1, "/"
const-string v2, "/"
invoke-static {v0, v1, v2}, Lorg/acdd/util/StringUtils;->substringBetween(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 714
invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
const-string v2, "/"
const-string v3, "/"
.line 713
invoke-static {v1, v2, v3}, Lorg/acdd/util/StringUtils;->substringBetween(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 712
invoke-static {v0, v1}, Lorg/acdd/util/StringUtils;->equals(Ljava/lang/String;Ljava/lang/String;)Z
move-result v0
.line 711
return v0
.end method
.method private declared-synchronized loadDexes()V
.registers 3
.prologue
.line 416
monitor-enter p0
.line 417
:try_start_1
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lorg/acdd/util/BundleLock;->WriteLock(Ljava/lang/String;)V
.line 418
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
if-nez v0, :cond_2f
.line 419
const/4 v0, 0x3
invoke-direct {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->tryLoadDefaultDex(I)Z
move-result v0
.line 420
if-eqz v0, :cond_1e
.line 421
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lorg/acdd/framework/BundleManager;->addLoadedDexPath(Ljava/lang/String;)V
.line 423
:cond_1e
if-eqz v0, :cond_23
.line 424
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->injectThisResource()V
.line 426
:cond_23
const/4 v0, 0x3
invoke-direct {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->tryExtractExtraDex(I)V
.line 427
iget-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
if-eqz v0, :cond_2f
.line 428
const/4 v0, 0x3
invoke-direct {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->tryLoadExtraDex(I)V
:try_end_2f
.catchall {:try_start_1 .. :try_end_2f} :catchall_3a
.line 432
:cond_2f
:try_start_2f
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lorg/acdd/util/BundleLock;->WriteUnLock(Ljava/lang/String;)V
:try_end_38
.catchall {:try_start_2f .. :try_end_38} :catchall_45
.line 434
monitor-exit p0
return-void
.line 432
:catchall_3a
move-exception v0
:try_start_3b
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lorg/acdd/util/BundleLock;->WriteUnLock(Ljava/lang/String;)V
throw v0
:try_end_45
.catchall {:try_start_3b .. :try_end_45} :catchall_45
.line 416
:catchall_45
move-exception v0
monitor-exit p0
throw v0
.end method
.method private readCRCFromMetadata()J
.registers 5
.prologue
.line 325
new-instance v1, Ljava/io/File;
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v2, "meta"
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 326
const/4 v0, 0x0
.line 328
:try_start_a
new-instance v2, Ljava/io/DataInputStream;
new-instance v3, Ljava/io/FileInputStream;
invoke-direct {v3, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
invoke-direct {v2, v3}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V
:try_end_14
.catch Ljava/lang/Throwable; {:try_start_a .. :try_end_14} :catch_21
.catchall {:try_start_a .. :try_end_14} :catchall_2a
.line 329
:try_start_14
invoke-virtual {v2}, Ljava/io/DataInputStream;->readUTF()Ljava/lang/String;
.line 330
invoke-virtual {v2}, Ljava/io/DataInputStream;->readLong()J
:try_end_1a
.catch Ljava/lang/Throwable; {:try_start_14 .. :try_end_1a} :catch_3b
.catchall {:try_start_14 .. :try_end_1a} :catchall_39
move-result-wide v0
.line 333
if-eqz v2, :cond_20
.line 335
:try_start_1d
invoke-virtual {v2}, Ljava/io/DataInputStream;->close()V
:try_end_20
.catch Ljava/io/IOException; {:try_start_1d .. :try_end_20} :catch_33
.line 340
:cond_20
:goto_20
return-wide v0
.line 331
:catch_21
move-exception v1
.line 333
:goto_22
if-eqz v0, :cond_27
.line 335
:try_start_24
invoke-virtual {v0}, Ljava/io/DataInputStream;->close()V
:try_end_27
.catch Ljava/io/IOException; {:try_start_24 .. :try_end_27} :catch_35
.line 340
:cond_27
:goto_27
const-wide/16 v0, 0x0
goto :goto_20
.line 333
:catchall_2a
move-exception v1
move-object v2, v0
move-object v0, v1
:goto_2d
if-eqz v2, :cond_32
.line 335
:try_start_2f
invoke-virtual {v2}, Ljava/io/DataInputStream;->close()V
:try_end_32
.catch Ljava/io/IOException; {:try_start_2f .. :try_end_32} :catch_37
.line 337
:cond_32
:goto_32
throw v0
.line 336
:catch_33
move-exception v2
goto :goto_20
:catch_35
move-exception v0
goto :goto_27
:catch_37
move-exception v1
goto :goto_32
.line 333
:catchall_39
move-exception v0
goto :goto_2d
.line 331
:catch_3b
move-exception v0
move-object v0, v2
goto :goto_22
.end method
.method private tryExtractExtraDex(I)V
.registers 6
.prologue
.line 730
const/4 v0, 0x0
:goto_1
if-ge v0, p1, :cond_6
.line 732
:try_start_3
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extractSecondaryDexIfNecessary()V
:try_end_6
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_6} :catch_7
.line 739
:cond_6
return-void
.line 733
:catch_7
move-exception v1
.line 734
invoke-static {}, Lorg/acdd/framework/ACDD;->getInstance()Lorg/acdd/framework/ACDD;
move-result-object v2
const-string v3, "4036"
invoke-virtual {v2, v3, v1}, Lorg/acdd/framework/ACDD;->reportCrash(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 730
add-int/lit8 v0, v0, 0x1
goto :goto_1
.end method
.method private tryLoadDefaultDex(I)Z
.registers 13
.prologue
const/4 v3, 0x1
const/4 v0, 0x0
.line 477
const/4 v1, 0x0
.line 480
:try_start_3
new-instance v2, Ljava/io/File;
iget-object v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v5, "bundle.dex"
invoke-direct {v2, v4, v5}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
:try_end_c
.catchall {:try_start_3 .. :try_end_c} :catchall_7e
.line 481
:try_start_c
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
:try_end_13
.catchall {:try_start_c .. :try_end_13} :catchall_89
move v4, v0
.line 482
:goto_14
if-ge v4, p1, :cond_2c
.line 484
:try_start_16
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x0
invoke-static {v1, v5, v6}, Ldalvik/system/DexFile;->loadDex(Ljava/lang/String;Ljava/lang/String;I)Ldalvik/system/DexFile;
move-result-object v1
iput-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
:try_end_27
.catch Ljava/lang/Exception; {:try_start_16 .. :try_end_27} :catch_36
.catchall {:try_start_16 .. :try_end_27} :catchall_89
.line 497
:cond_27
:goto_27
:try_start_27
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
:try_end_29
.catchall {:try_start_27 .. :try_end_29} :catchall_89
if-eqz v1, :cond_7a
move v0, v3
.line 503
:cond_2c
if-eqz v2, :cond_35
.line 504
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
.line 506
:cond_35
:goto_35
return v0
.line 485
:catch_36
move-exception v1
.line 486
add-int/lit8 v5, p1, -0x1
if-ne v4, v5, :cond_27
.line 488
:try_start_3b
iget-object v5, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v5}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v5
invoke-static {v5}, Lorg/acdd/util/ApkUtils;->getFileMD5(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
.line 489
sget-object v6, Lorg/acdd/runtime/RuntimeVariables;->androidApplication:Landroid/app/Application;
iget-object v7, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v7}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v7
invoke-static {v6, v7}, Lorg/acdd/util/ApkUtils;->getMetaVersionCode(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
move-result-object v6
.line 490
const-string v7, "%s loadDex failed md5:%s ver:%s"
const/4 v8, 0x3
new-array v8, v8, [Ljava/lang/Object;
const/4 v9, 0x0
iget-object v10, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v10}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v10
aput-object v10, v8, v9
const/4 v9, 0x1
aput-object v5, v8, v9
const/4 v5, 0x2
aput-object v6, v8, v5
invoke-static {v7, v8}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v5
.line 491
invoke-static {}, Lorg/acdd/framework/ACDD;->getInstance()Lorg/acdd/framework/ACDD;
move-result-object v6
const-string v7, "4036"
new-instance v8, Ljava/lang/RuntimeException;
invoke-direct {v8, v5, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
invoke-virtual {v6, v7, v8}, Lorg/acdd/framework/ACDD;->reportCrash(Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_77
.catch Ljava/lang/Throwable; {:try_start_3b .. :try_end_77} :catch_78
.catchall {:try_start_3b .. :try_end_77} :catchall_89
goto :goto_27
.line 492
:catch_78
move-exception v1
goto :goto_27
.line 482
:cond_7a
add-int/lit8 v1, v4, 0x1
move v4, v1
goto :goto_14
.line 503
:catchall_7e
move-exception v2
:goto_7f
if-eqz v1, :cond_35
.line 504
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v2
invoke-virtual {v2, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
goto :goto_35
.line 503
:catchall_89
move-exception v1
move-object v1, v2
goto :goto_7f
.end method
.method private tryLoadExtraDex(I)V
.registers 8
.prologue
const/4 v0, 0x0
.line 742
new-instance v2, Ljava/io/File;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v3, "bundle2.apk"
invoke-direct {v2, v1, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 743
new-instance v3, Ljava/io/File;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v4, "bundle2.dex"
invoke-direct {v3, v1, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 744
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
invoke-virtual {v1, v3}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
move v1, v0
.line 747
:goto_1b
if-ge v1, p1, :cond_30
.line 749
:try_start_1d
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v4
const/4 v5, 0x0
invoke-static {v0, v4, v5}, Ldalvik/system/DexFile;->loadDex(Ljava/lang/String;Ljava/lang/String;I)Ldalvik/system/DexFile;
move-result-object v0
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extraDexFile:Ldalvik/system/DexFile;
:try_end_2c
.catch Ljava/io/IOException; {:try_start_1d .. :try_end_2c} :catch_38
.catchall {:try_start_1d .. :try_end_2c} :catchall_47
.line 755
:cond_2c
:goto_2c
:try_start_2c
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extraDexFile:Ldalvik/system/DexFile;
:try_end_2e
.catchall {:try_start_2c .. :try_end_2e} :catchall_47
if-eqz v0, :cond_50
.line 760
:cond_30
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
invoke-virtual {v0, v3}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
.line 762
return-void
.line 750
:catch_38
move-exception v0
.line 751
add-int/lit8 v4, p1, -0x1
if-ne v1, v4, :cond_2c
.line 752
:try_start_3d
invoke-static {}, Lorg/acdd/framework/ACDD;->getInstance()Lorg/acdd/framework/ACDD;
move-result-object v4
const-string v5, "4036"
invoke-virtual {v4, v5, v0}, Lorg/acdd/framework/ACDD;->reportCrash(Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_46
.catchall {:try_start_3d .. :try_end_46} :catchall_47
goto :goto_2c
.line 760
:catchall_47
move-exception v0
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
invoke-virtual {v1, v3}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
throw v0
.line 747
:cond_50
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_1b
.end method
.method private updateMetadata()V
.registers 6
.prologue
.line 263
new-instance v2, Ljava/io/File;
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v1, "meta"
invoke-direct {v2, v0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 264
const/4 v0, 0x0
.line 266
:try_start_a
invoke-virtual {v2}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v1
if-nez v1, :cond_1b
.line 267
invoke-virtual {v2}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->mkdirs()Z
.line 270
:cond_1b
new-instance v1, Ljava/io/DataOutputStream;
new-instance v3, Ljava/io/FileOutputStream;
invoke-direct {v3, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
invoke-direct {v1, v3}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_25
.catch Ljava/io/IOException; {:try_start_a .. :try_end_25} :catch_38
.catchall {:try_start_a .. :try_end_25} :catchall_41
.line 271
:try_start_25
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionLocation:Ljava/lang/String;
invoke-virtual {v1, v0}, Ljava/io/DataOutputStream;->writeUTF(Ljava/lang/String;)V
.line 272
iget-wide v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleCRC:J
invoke-virtual {v1, v2, v3}, Ljava/io/DataOutputStream;->writeLong(J)V
.line 273
invoke-virtual {v1}, Ljava/io/DataOutputStream;->flush()V
:try_end_32
.catch Ljava/io/IOException; {:try_start_25 .. :try_end_32} :catch_51
.catchall {:try_start_25 .. :try_end_32} :catchall_4f
.line 278
if-eqz v1, :cond_37
.line 280
:try_start_34
invoke-virtual {v1}, Ljava/io/DataOutputStream;->close()V
:try_end_37
.catch Ljava/io/IOException; {:try_start_34 .. :try_end_37} :catch_4b
.line 285
:cond_37
:goto_37
return-void
.line 275
:catch_38
move-exception v1
.line 278
:goto_39
if-eqz v0, :cond_37
.line 280
:try_start_3b
invoke-virtual {v0}, Ljava/io/DataOutputStream;->close()V
:try_end_3e
.catch Ljava/io/IOException; {:try_start_3b .. :try_end_3e} :catch_3f
goto :goto_37
.line 281
:catch_3f
move-exception v0
goto :goto_37
.line 278
:catchall_41
move-exception v1
move-object v4, v1
move-object v1, v0
move-object v0, v4
:goto_45
if-eqz v1, :cond_4a
.line 280
:try_start_47
invoke-virtual {v1}, Ljava/io/DataOutputStream;->close()V
:try_end_4a
.catch Ljava/io/IOException; {:try_start_47 .. :try_end_4a} :catch_4d
.line 282
:cond_4a
:goto_4a
throw v0
.line 281
:catch_4b
move-exception v0
goto :goto_37
:catch_4d
move-exception v1
goto :goto_4a
.line 278
:catchall_4f
move-exception v0
goto :goto_45
.line 275
:catch_51
move-exception v0
move-object v0, v1
goto :goto_39
.end method
# virtual methods
.method close()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 702
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->zipFile:Ljava/util/zip/ZipFile;
if-eqz v0, :cond_9
.line 703
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->zipFile:Ljava/util/zip/ZipFile;
invoke-virtual {v0}, Ljava/util/zip/ZipFile;->close()V
.line 705
:cond_9
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
if-eqz v0, :cond_12
.line 706
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
invoke-virtual {v0}, Ldalvik/system/DexFile;->close()V
.line 708
:cond_12
return-void
.end method
.method public final computeBundleCrc()V
.registers 3
.prologue
.line 288
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
.line 289
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lorg/acdd/util/ACDDUtils;->getFileCRC(Ljava/lang/String;)J
move-result-wide v0
iput-wide v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleCRC:J
.line 290
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
.line 291
return-void
.end method
.method findClass(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;
.registers 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/lang/ClassLoader;",
")",
"Ljava/lang/Class",
"<*>;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/ClassNotFoundException;
}
.end annotation
.prologue
const/4 v6, 0x0
.line 621
:try_start_1
sget-object v0, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
if-eqz v0, :cond_d
sget-object v0, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
invoke-virtual {v0}, Lorg/acdd/hack/Hack$HackedClass;->getmClass()Ljava/lang/Class;
move-result-object v0
if-nez v0, :cond_2a
.line 623
:cond_d
invoke-virtual {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->optDexFile()V
.line 625
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
if-nez v0, :cond_17
.line 626
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->loadDexes()V
.line 629
:cond_17
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexFile:Ldalvik/system/DexFile;
invoke-virtual {v0, p1, p2}, Ldalvik/system/DexFile;->loadClass(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;
move-result-object v0
.line 630
if-nez v0, :cond_29
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extraDexFile:Ldalvik/system/DexFile;
if-eqz v1, :cond_29
.line 631
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->extraDexFile:Ldalvik/system/DexFile;
invoke-virtual {v0, p1, p2}, Ldalvik/system/DexFile;->loadClass(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/Class;
move-result-object v0
.line 675
:cond_29
:goto_29
return-object v0
.line 638
:cond_2a
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexClassLoader:Ljava/lang/ClassLoader;
if-nez v0, :cond_79
.line 639
new-instance v1, Ljava/io/File;
sget-object v0, Lorg/acdd/runtime/RuntimeVariables;->androidApplication:Landroid/app/Application;
.line 640
invoke-virtual {v0}, Landroid/app/Application;->getFilesDir()Ljava/io/File;
move-result-object v0
invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
const-string v2, "lib"
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 642
new-instance v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$BundleArchiveRevisionClassLoader;
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 643
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
.line 644
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
.line 645
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v4
move-object v1, p0
move-object v5, p2
invoke-direct/range {v0 .. v5}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$BundleArchiveRevisionClassLoader;-><init>(Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/ClassLoader;)V
iput-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexClassLoader:Ljava/lang/ClassLoader;
:try_end_58
.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_58} :catch_92
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_58} :catch_95
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_58} :catch_98
.line 648
const/4 v0, 0x1
:try_start_59
invoke-direct {p0, v0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->tryExtractExtraDex(I)V
.line 650
iget-boolean v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isSecondaryDexExists:Z
if-eqz v0, :cond_79
.line 651
new-instance v0, Ljava/util/ArrayList;
const/4 v1, 0x1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
.line 652
new-instance v1, Ljava/io/File;
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v3, "bundle2.dex"
invoke-direct {v1, v2, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 653
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexClassLoader:Ljava/lang/ClassLoader;
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-static {v1, v2, v0}, Landroid/support/multidex/b;->a(Ljava/lang/ClassLoader;Ljava/io/File;Ljava/util/List;)V
:try_end_79
.catch Ljava/lang/Throwable; {:try_start_59 .. :try_end_79} :catch_8d
.catch Ljava/lang/IllegalArgumentException; {:try_start_59 .. :try_end_79} :catch_92
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_59 .. :try_end_79} :catch_95
.line 659
:cond_79
:goto_79
:try_start_79
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->afterLoadedDex()V
.line 661
sget-object v0, Lorg/acdd/hack/ACDDHacks;->DexClassLoader_findClass:Lorg/acdd/hack/Hack$HackedMethod;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->dexClassLoader:Ljava/lang/ClassLoader;
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p1, v2, v3
invoke-virtual {v0, v1, v2}, Lorg/acdd/hack/Hack$HackedMethod;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Class;
goto :goto_29
.line 655
:catch_8d
move-exception v0
.line 656
invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
:try_end_91
.catch Ljava/lang/IllegalArgumentException; {:try_start_79 .. :try_end_91} :catch_92
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_79 .. :try_end_91} :catch_95
.catch Ljava/lang/Throwable; {:try_start_79 .. :try_end_91} :catch_98
goto :goto_79
.line 663
:catch_92
move-exception v0
move-object v0, v6
.line 664
goto :goto_29
.line 665
:catch_95
move-exception v0
move-object v0, v6
.line 666
goto :goto_29
.line 667
:catch_98
move-exception v0
.line 668
instance-of v1, v0, Ljava/lang/ClassNotFoundException;
if-nez v1, :cond_c2
.line 669
instance-of v1, v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$DexLoadException;
if-eqz v1, :cond_a4
.line 670
check-cast v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$DexLoadException;
throw v0
.line 672
:cond_a4
sget-object v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Exception while find class in archive revision: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 673
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
.line 672
invoke-interface {v1, v2, v0}, Lorg/acdd/log/Logger;->error(Ljava/lang/String;Ljava/lang/Throwable;)V
:cond_c2
move-object v0, v6
.line 675
goto/16 :goto_29
.end method
.method findSoLibrary(Ljava/lang/String;)Ljava/io/File;
.registers 7
.prologue
.line 356
new-instance v0, Ljava/io/File;
const-string v1, "%s%s%s%s"
const/4 v2, 0x4
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
iget-object v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
aput-object v4, v2, v3
const/4 v3, 0x1
sget-object v4, Ljava/io/File;->separator:Ljava/lang/String;
aput-object v4, v2, v3
const/4 v3, 0x2
const-string v4, "lib"
aput-object v4, v2, v3
const/4 v3, 0x3
sget-object v4, Ljava/io/File;->separator:Ljava/lang/String;
aput-object v4, v2, v3
invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 358
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_2f
invoke-virtual {v0}, Ljava/io/File;->isFile()Z
move-result v1
if-eqz v1, :cond_2f
:goto_2e
return-object v0
:cond_2f
const/4 v0, 0x0
goto :goto_2e
.end method
.method getResources(Ljava/lang/String;)Ljava/util/List;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List",
"<",
"Ljava/net/URL;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
.line 689
new-instance v0, Ljava/util/ArrayList;
const/4 v1, 0x1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
.line 690
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->ensureZipFile()V
.line 691
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->zipFile:Ljava/util/zip/ZipFile;
if-eqz v1, :cond_40
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->zipFile:Ljava/util/zip/ZipFile;
invoke-virtual {v1, p1}, Ljava/util/zip/ZipFile;->getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry;
move-result-object v1
if-eqz v1, :cond_40
.line 693
:try_start_15
new-instance v1, Ljava/net/URL;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "jar:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v3}, Ljava/io/File;->toURL()Ljava/net/URL;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "!/"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_40
.catch Ljava/lang/Throwable; {:try_start_15 .. :try_end_40} :catch_41
.line 698
:cond_40
return-object v0
.line 694
:catch_41
move-exception v0
.line 695
new-instance v1, Ljava/lang/RuntimeException;
invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v1
.end method
.method public getRevisionDir()Ljava/io/File;
.registers 2
.prologue
.line 348
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
return-object v0
.end method
.method getRevisionFile()Ljava/io/File;
.registers 2
.prologue
.line 352
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
return-object v0
.end method
.method public getRevisionNum()J
.registers 3
.prologue
.line 344
iget-wide v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionNum:J
return-wide v0
.end method
.method isDexOpted()Z
.registers 4
.prologue
.line 363
:try_start_0
new-instance v0, Ljava/io/File;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v2, "bundle.dex"
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 364
sget-object v1, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
if-eqz v1, :cond_15
sget-object v1, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
.line 365
invoke-virtual {v1}, Lorg/acdd/hack/Hack$HackedClass;->getmClass()Ljava/lang/Class;
move-result-object v1
if-nez v1, :cond_1a
.line 366
:cond_15
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
.line 371
:goto_19
return v0
.line 368
:cond_1a
new-instance v0, Ljava/io/File;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v2, "bundle.lex"
invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
:try_end_26
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_26} :catch_28
move-result v0
goto :goto_19
.line 369
:catch_28
move-exception v0
.line 370
sget-object v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
const-string v2, "isDexOpted error"
invoke-interface {v1, v2, v0}, Lorg/acdd/log/Logger;->error(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 371
const/4 v0, 0x0
goto :goto_19
.end method
.method public isLegalBundleArchiveFile()Z
.registers 14
.prologue
const-wide/16 v10, 0x0
const/4 v0, 0x1
const/4 v1, 0x0
.line 295
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->readCRCFromMetadata()J
move-result-wide v2
.line 296
cmp-long v4, v2, v10
if-lez v4, :cond_1b
iget-wide v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleCRC:J
cmp-long v4, v4, v10
if-lez v4, :cond_1b
iget-wide v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleCRC:J
cmp-long v2, v2, v4
if-nez v2, :cond_19
.line 321
:goto_18
return v0
:cond_19
move v0, v1
.line 296
goto :goto_18
.line 298
:cond_1b
const-string v4, "CMPlugin"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
iget-object v6, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
invoke-virtual {v6}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, " => file: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, "0x%08X"
new-array v7, v0, [Ljava/lang/Object;
iget-wide v8, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleCRC:J
.line 299
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v8
aput-object v8, v7, v1
invoke-static {v6, v7}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, " meta: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, "0x%08X"
new-array v7, v0, [Ljava/lang/Object;
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v8
aput-object v8, v7, v1
invoke-static {v6, v7}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
.line 298
invoke-static {v4, v5}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 302
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v4
iget-object v5, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v4, v5}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
.line 304
:try_start_6e
iget-object v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-static {v4}, Lorg/acdd/util/ACDDUtils;->assertZipFileLegal(Ljava/io/File;)V
:try_end_73
.catch Ljava/lang/Exception; {:try_start_6e .. :try_end_73} :catch_89
.catchall {:try_start_6e .. :try_end_73} :catchall_a1
.line 307
cmp-long v1, v2, v10
if-gtz v1, :cond_7f
.line 308
:try_start_77
new-instance v1, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$1;
invoke-direct {v1, p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision$1;-><init>(Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;)V
invoke-static {v1}, Landroid/os/AsyncTask;->execute(Ljava/lang/Runnable;)V
:try_end_7f
.catch Ljava/lang/Exception; {:try_start_77 .. :try_end_7f} :catch_ac
.catchall {:try_start_77 .. :try_end_7f} :catchall_a1
.line 318
:cond_7f
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
goto :goto_18
.line 315
:catch_89
move-exception v0
move-object v12, v0
move v0, v1
move-object v1, v12
.line 316
:goto_8d
:try_start_8d
const-string v2, "CMPlugin"
invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_96
.catchall {:try_start_8d .. :try_end_96} :catchall_a1
.line 318
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
goto/16 :goto_18
:catchall_a1
move-exception v0
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v1, v2}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
throw v0
.line 315
:catch_ac
move-exception v1
goto :goto_8d
.end method
.method declared-synchronized optDexFile()V
.registers 9
.prologue
.line 376
monitor-enter p0
:try_start_1
invoke-virtual {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->isDexOpted()Z
move-result v0
if-nez v0, :cond_a0
.line 377
sget-object v0, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
if-eqz v0, :cond_13
sget-object v0, Lorg/acdd/hack/ACDDHacks;->LexFile:Lorg/acdd/hack/Hack$HackedClass;
.line 378
invoke-virtual {v0}, Lorg/acdd/hack/Hack$HackedClass;->getmClass()Ljava/lang/Class;
move-result-object v0
if-nez v0, :cond_db
.line 379
:cond_13
new-instance v1, Ljava/io/File;
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
const-string v2, "bundle.dex"
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 380
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
:try_end_1f
.catchall {:try_start_1 .. :try_end_1f} :catchall_cf
move-result-wide v2
.line 382
:try_start_20
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->lock(Ljava/io/File;)Z
move-result v0
if-nez v0, :cond_48
.line 383
sget-object v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Failed to get file lock for "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 384
invoke-virtual {v5}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
.line 383
invoke-interface {v0, v4}, Lorg/acdd/log/Logger;->error(Ljava/lang/String;)V
.line 387
:cond_48
invoke-virtual {v1}, Ljava/io/File;->length()J
move-result-wide v4
const-wide/16 v6, 0x0
cmp-long v0, v4, v6
if-gtz v0, :cond_99
.line 388
iget-object v0, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v4
invoke-static {v0, v4}, Lorg/acdd/dexopt/InitExecutor;->optDexFile(Ljava/lang/String;Ljava/lang/String;)Z
.line 389
sget-object v0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "[PluginTimer] bundle archieve dexopt bundle "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->location:Ljava/lang/String;
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, " cost time = "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
.line 391
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v6
sub-long v2, v6, v2
invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, " ms"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
.line 389
invoke-interface {v0, v2}, Lorg/acdd/log/Logger;->warn(Ljava/lang/String;)V
.line 393
invoke-direct {p0}, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->loadDexes()V
.line 394
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_99
.catch Ljava/lang/Throwable; {:try_start_20 .. :try_end_99} :catch_a2
.catchall {:try_start_20 .. :try_end_99} :catchall_d2
.line 402
:cond_99
:try_start_99
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
.line 403
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_a0
.catchall {:try_start_99 .. :try_end_a0} :catchall_cf
.line 412
:cond_a0
:goto_a0
monitor-exit p0
return-void
.line 396
:catch_a2
move-exception v0
.line 397
:try_start_a3
sget-object v2, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->log:Lorg/acdd/log/Logger;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Failed optDexFile \'"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 399
invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, "\' >>> "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
.line 397
invoke-interface {v2, v3, v0}, Lorg/acdd/log/Logger;->error(Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_c7
.catchall {:try_start_a3 .. :try_end_c7} :catchall_d2
.line 402
:try_start_c7
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v0
.line 403
invoke-virtual {v0, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
:try_end_ce
.catchall {:try_start_c7 .. :try_end_ce} :catchall_cf
goto :goto_a0
.line 376
:catchall_cf
move-exception v0
monitor-exit p0
throw v0
.line 402
:catchall_d2
move-exception v0
:try_start_d3
invoke-static {}, Lorg/acdd/util/ACDDFileLock;->getInstance()Lorg/acdd/util/ACDDFileLock;
move-result-object v2
.line 403
invoke-virtual {v2, v1}, Lorg/acdd/util/ACDDFileLock;->unLock(Ljava/io/File;)V
.line 404
throw v0
.line 406
:cond_db
new-instance v0, Ldalvik/system/DexClassLoader;
iget-object v1, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->bundleFile:Ljava/io/File;
.line 407
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v1
iget-object v2, p0, Lorg/acdd/framework/bundlestorage/BundleArchiveRevision;->revisionDir:Ljava/io/File;
.line 408
invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v2
const/4 v3, 0x0
.line 409
invoke-static {}, Ljava/lang/ClassLoader;->getSystemClassLoader()Ljava/lang/ClassLoader;
move-result-object v4
invoke-direct {v0, v1, v2, v3, v4}, Ldalvik/system/DexClassLoader;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/ClassLoader;)V
:try_end_f1
.catchall {:try_start_d3 .. :try_end_f1} :catchall_cf
goto :goto_a0
.end method