2020-07-23 01:06:17 +00:00
|
|
|
.class public Lf/g/m/c;
|
|
|
|
.super Lf/g/m/l;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "DirectorySoSource.java"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final a:Ljava/io/File;
|
|
|
|
|
|
|
|
.field public final b:I
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Ljava/io/File;I)V
|
|
|
|
.locals 0
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-direct {p0}, Lf/g/m/l;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iput-object p1, p0, Lf/g/m/c;->a:Ljava/io/File;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iput p2, p0, Lf/g/m/c;->b:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public a(Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)I
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v0, p0, Lf/g/m/c;->a:Ljava/io/File;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-virtual {p0, p1, p2, v0, p3}, Lf/g/m/c;->c(Ljava/lang/String;ILjava/io/File;Landroid/os/StrictMode$ThreadPolicy;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public c(Ljava/lang/String;ILjava/io/File;Landroid/os/StrictMode$ThreadPolicy;)I
|
2020-09-16 23:45:23 +00:00
|
|
|
.locals 7
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
|
|
|
|
invoke-direct {v0, p3, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const-string v3, "SoLoader"
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const-string p2, " not found on "
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {p1, p2}, Lf/e/c/a/a;->K(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {v3, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string v1, " found on "
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {p1, v1}, Lf/e/c/a/a;->K(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-static {v3, p3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
and-int/lit8 p3, p2, 0x1
|
|
|
|
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget p3, p0, Lf/g/m/c;->b:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
and-int/2addr p3, v1
|
|
|
|
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " loaded implicitly"
|
|
|
|
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {v3, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
return v1
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-23 01:06:17 +00:00
|
|
|
iget p3, p0, Lf/g/m/c;->b:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
and-int/2addr p3, v1
|
|
|
|
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
|
|
|
|
sget-boolean p1, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p3, "SoLoader.getElfDependencies["
|
|
|
|
|
|
|
|
const-string v4, "]"
|
|
|
|
|
|
|
|
invoke-static {p3, p1, v4}, Lcom/facebook/soloader/Api18TraceUtils;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:try_start_0
|
|
|
|
new-instance p1, Ljava/io/FileInputStream;
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-virtual {p1}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {p3}, Lf/g/j/k/a;->X(Ljava/nio/channels/FileChannel;)[Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
:try_start_2
|
|
|
|
invoke-virtual {p1}, Ljava/io/FileInputStream;->close()V
|
|
|
|
:try_end_2
|
|
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
|
|
|
|
sget-boolean p1, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "Loading lib dependencies: "
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {p1}, Lf/e/c/a/a;->F(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p3}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {p1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {v3, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
array-length p1, p3
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
:goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
if-ge v2, p1, :cond_7
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
aget-object v4, p3, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v5, "/"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
if-eqz v5, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_4
|
2020-09-16 23:45:23 +00:00
|
|
|
or-int/lit8 v5, p2, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v4, v6, v6, v5, p4}, Lcom/facebook/soloader/SoLoader;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p2
|
|
|
|
|
|
|
|
:try_start_3
|
|
|
|
invoke-virtual {p1}, Ljava/io/FileInputStream;->close()V
|
|
|
|
|
|
|
|
throw p2
|
|
|
|
:try_end_3
|
|
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
|
|
|
|
:catchall_1
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
sget-boolean p2, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string p4, "Not resolving dependencies for "
|
|
|
|
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {v3, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
:try_start_4
|
2020-07-23 01:06:17 +00:00
|
|
|
sget-object p1, Lcom/facebook/soloader/SoLoader;->b:Lf/g/m/k;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
:try_end_4
|
|
|
|
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_4 .. :try_end_4} :catch_0
|
|
|
|
|
|
|
|
check-cast p1, Lcom/facebook/soloader/SoLoader$a;
|
|
|
|
|
|
|
|
:try_start_5
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p3, p2}, Lcom/facebook/soloader/SoLoader$a;->b(Ljava/lang/String;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_5
|
|
|
|
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_5 .. :try_end_5} :catch_0
|
|
|
|
|
|
|
|
return v1
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/UnsatisfiedLinkError;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string p3, "bad ELF magic"
|
|
|
|
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_8
|
|
|
|
|
|
|
|
const-string p1, "Corrupted lib file detected"
|
|
|
|
|
|
|
|
invoke-static {v3, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
const/4 p1, 0x3
|
|
|
|
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
:try_start_0
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v0, p0, Lf/g/m/c;->a:Ljava/io/File;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getCanonicalPath()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
2020-07-23 01:06:17 +00:00
|
|
|
iget-object v0, p0, Lf/g/m/c;->a:Ljava/io/File;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v2, "[root = "
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v0, " flags = "
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
iget v0, p0, Lf/g/m/c;->b:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/16 v2, 0x5d
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {v1, v0, v2}, Lf/e/c/a/a;->s(Ljava/lang/StringBuilder;IC)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|