2019-02-04 20:08:30 +00:00
|
|
|
.class final Lcom/crashlytics/android/core/c;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "BinaryImagesConverter.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/crashlytics/android/core/c$a;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private final context:Landroid/content/Context;
|
|
|
|
|
2019-02-04 20:42:43 +00:00
|
|
|
.field private final ph:Lcom/crashlytics/android/core/c$a;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method constructor <init>(Landroid/content/Context;Lcom/crashlytics/android/core/c$a;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/crashlytics/android/core/c;->context:Landroid/content/Context;
|
|
|
|
|
2019-02-04 20:42:43 +00:00
|
|
|
iput-object p2, p0, Lcom/crashlytics/android/core/c;->ph:Lcom/crashlytics/android/core/c$a;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private K(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/crashlytics/android/core/an;->W(Ljava/lang/String;)Lcom/crashlytics/android/core/am;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
2019-02-04 20:42:43 +00:00
|
|
|
iget-object v1, p1, Lcom/crashlytics/android/core/am;->rF:Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/16 v2, 0x78
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, -0x1
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, p1, Lcom/crashlytics/android/core/am;->path:Ljava/lang/String;
|
|
|
|
|
|
|
|
const/16 v3, 0x2f
|
|
|
|
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p1, Lcom/crashlytics/android/core/am;->path:Ljava/lang/String;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/io/File;
|
|
|
|
|
|
|
|
invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/io/File;->exists()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
|
|
|
|
invoke-direct {p0, v2}, Lcom/crashlytics/android/core/c;->a(Ljava/io/File;)Ljava/io/File;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:try_start_0
|
2019-02-04 20:42:43 +00:00
|
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/c;->ph:Lcom/crashlytics/android/core/c$a;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Lcom/crashlytics/android/core/c$a;->b(Ljava/io/File;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
new-instance v2, Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
|
|
|
|
const-string v3, "base_address"
|
|
|
|
|
2019-02-04 20:42:43 +00:00
|
|
|
iget-wide v4, p1, Lcom/crashlytics/android/core/am;->rE:J
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2, v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
const-string v3, "size"
|
|
|
|
|
|
|
|
iget-wide v4, p1, Lcom/crashlytics/android/core/am;->size:J
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
const-string v3, "name"
|
|
|
|
|
|
|
|
iget-object p1, p1, Lcom/crashlytics/android/core/am;->path:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
const-string p1, "uuid"
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
:try_end_1
|
|
|
|
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
|
|
|
|
return-object v2
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wx()Lio/fabric/sdk/android/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "CrashlyticsCore"
|
|
|
|
|
|
|
|
const-string v3, "Could not create a binary image json string"
|
|
|
|
|
|
|
|
invoke-interface {v1, v2, v3, p1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception v1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wx()Lio/fabric/sdk/android/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const-string v3, "CrashlyticsCore"
|
|
|
|
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v5, "Could not generate ID for file "
|
|
|
|
|
|
|
|
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object p1, p1, Lcom/crashlytics/android/core/am;->path:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {v2, v3, p1, v1}, Lio/fabric/sdk/android/l;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
return-object v0
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_3
|
|
|
|
:goto_1
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private a(Ljava/io/File;)Ljava/io/File;
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x9
|
|
|
|
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "/data"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v0, p0, Lcom/crashlytics/android/core/c;->context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/crashlytics/android/core/c;->context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
|
|
|
|
iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->nativeLibraryDir:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-direct {v1, v0, v2}, Ljava/io/File;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
move-object p1, v1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v0
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wx()Lio/fabric/sdk/android/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "CrashlyticsCore"
|
|
|
|
|
|
|
|
const-string v3, "Error getting ApplicationInfo"
|
|
|
|
|
|
|
|
invoke-interface {v1, v2, v3, v0}, Lio/fabric/sdk/android/l;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static b(Lorg/json/JSONArray;)[B
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v1, "binary_images"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, p0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
:try_end_0
|
|
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p0
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wx()Lio/fabric/sdk/android/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "CrashlyticsCore"
|
|
|
|
|
|
|
|
const-string v2, "Binary images string is null"
|
|
|
|
|
|
|
|
invoke-interface {v0, v1, v2, p0}, Lio/fabric/sdk/android/l;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
new-array p0, p0, [B
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static c(Lorg/json/JSONArray;)Ljava/lang/String;
|
|
|
|
.locals 3
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lorg/json/JSONException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p0}, Lorg/json/JSONArray;->length()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-ge v1, v2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method final J(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
new-instance v0, Lorg/json/JSONArray;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
new-instance v1, Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string p1, "maps"
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/crashlytics/android/core/c;->c(Lorg/json/JSONArray;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
:try_end_0
|
|
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
const-string v1, "\\|"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
array-length v2, p1
|
|
|
|
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
|
|
|
|
aget-object v2, p1, v1
|
|
|
|
|
|
|
|
invoke-direct {p0, v2}, Lcom/crashlytics/android/core/c;->K(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {}, Lio/fabric/sdk/android/c;->wx()Lio/fabric/sdk/android/l;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "CrashlyticsCore"
|
|
|
|
|
|
|
|
const-string v3, "Unable to parse proc maps string"
|
|
|
|
|
|
|
|
invoke-interface {v1, v2, v3, p1}, Lio/fabric/sdk/android/l;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method final a(Ljava/io/BufferedReader;)[B
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lorg/json/JSONArray;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0, v1}, Lcom/crashlytics/android/core/c;->K(Ljava/lang/String;)Lorg/json/JSONObject;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-static {v0}, Lcom/crashlytics/android/core/c;->b(Lorg/json/JSONArray;)[B
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|