Files
rr3-apk/smali_classes3/com/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

305 lines
7.8 KiB
Smali

.class public Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/google/firebase/crashlytics/internal/common/NativeSessionFile;
# instance fields
.field public final dataTransportFilename:Ljava/lang/String;
.field public final file:Ljava/io/File;
.field public final reportsEndpointFilename:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V
.locals 0
.line 40
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->dataTransportFilename:Ljava/lang/String;
iput-object p2, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->reportsEndpointFilename:Ljava/lang/String;
iput-object p3, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->file:Ljava/io/File;
return-void
.end method
.method private asGzippedBytes()[B
.locals 7
const/16 v0, 0x2000
new-array v0, v0, [B
const/4 v1, 0x0
.line 80
:try_start_0
invoke-virtual {p0}, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->getStream()Ljava/io/InputStream;
move-result-object v2
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 81
:try_start_1
new-instance v3, Ljava/io/ByteArrayOutputStream;
invoke-direct {v3}, Ljava/io/ByteArrayOutputStream;-><init>()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 82
:try_start_2
new-instance v4, Ljava/util/zip/GZIPOutputStream;
invoke-direct {v4, v3}, Ljava/util/zip/GZIPOutputStream;-><init>(Ljava/io/OutputStream;)V
if-nez v2, :cond_1
.line 92
invoke-virtual {v4}, Ljava/io/OutputStream;->close()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
:try_start_3
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
if-eqz v2, :cond_0
:try_start_4
invoke-virtual {v2}, Ljava/io/InputStream;->close()V
:try_end_4
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_0
:cond_0
return-object v1
:catchall_0
move-exception v0
goto :goto_5
:catchall_1
move-exception v0
goto :goto_3
.line 87
:cond_1
:goto_0
:try_start_5
invoke-virtual {v2, v0}, Ljava/io/InputStream;->read([B)I
move-result v5
if-lez v5, :cond_2
const/4 v6, 0x0
.line 88
invoke-virtual {v4, v0, v6, v5}, Ljava/util/zip/GZIPOutputStream;->write([BII)V
goto :goto_0
:catchall_2
move-exception v0
goto :goto_1
.line 90
:cond_2
invoke-virtual {v4}, Ljava/util/zip/GZIPOutputStream;->finish()V
.line 91
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object v0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_2
.line 92
:try_start_6
invoke-virtual {v4}, Ljava/io/OutputStream;->close()V
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_1
:try_start_7
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_0
:try_start_8
invoke-virtual {v2}, Ljava/io/InputStream;->close()V
:try_end_8
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_0
return-object v0
.line 80
:goto_1
:try_start_9
invoke-virtual {v4}, Ljava/io/OutputStream;->close()V
:try_end_9
.catchall {:try_start_9 .. :try_end_9} :catchall_3
goto :goto_2
:catchall_3
move-exception v4
:try_start_a
invoke-virtual {v0, v4}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V
:goto_2
throw v0
:try_end_a
.catchall {:try_start_a .. :try_end_a} :catchall_1
:goto_3
:try_start_b
invoke-virtual {v3}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_b
.catchall {:try_start_b .. :try_end_b} :catchall_4
goto :goto_4
:catchall_4
move-exception v3
:try_start_c
invoke-virtual {v0, v3}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V
:goto_4
throw v0
:try_end_c
.catchall {:try_start_c .. :try_end_c} :catchall_0
:goto_5
if-eqz v2, :cond_3
:try_start_d
invoke-virtual {v2}, Ljava/io/InputStream;->close()V
:try_end_d
.catchall {:try_start_d .. :try_end_d} :catchall_5
goto :goto_6
:catchall_5
move-exception v2
:try_start_e
invoke-virtual {v0, v2}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V
:cond_3
:goto_6
throw v0
:try_end_e
.catch Ljava/io/IOException; {:try_start_e .. :try_end_e} :catch_0
:catch_0
return-object v1
.end method
# virtual methods
.method public asFilePayload()Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File;
.locals 2
.line 68
invoke-direct {p0}, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->asGzippedBytes()[B
move-result-object v0
if-eqz v0, :cond_0
.line 70
invoke-static {}, Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File;->builder()Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File$Builder;
move-result-object v1
.line 71
invoke-virtual {v1, v0}, Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File$Builder;->setContents([B)Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File$Builder;
move-result-object v0
iget-object v1, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->dataTransportFilename:Ljava/lang/String;
.line 72
invoke-virtual {v0, v1}, Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File$Builder;->setFilename(Ljava/lang/String;)Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File$Builder;
move-result-object v0
.line 73
invoke-virtual {v0}, Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File$Builder;->build()Lcom/google/firebase/crashlytics/internal/model/CrashlyticsReport$FilesPayload$File;
move-result-object v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return-object v0
.end method
.method public getReportsEndpointFilename()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->reportsEndpointFilename:Ljava/lang/String;
return-object v0
.end method
.method public getStream()Ljava/io/InputStream;
.locals 3
iget-object v0, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->file:Ljava/io/File;
.line 55
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_1
iget-object v0, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->file:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->isFile()Z
move-result v0
if-nez v0, :cond_0
goto :goto_0
.line 59
:cond_0
:try_start_0
new-instance v0, Ljava/io/FileInputStream;
iget-object v2, p0, Lcom/google/firebase/crashlytics/internal/common/FileBackedNativeSessionFile;->file:Ljava/io/File;
invoke-direct {v0, v2}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_0
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
:cond_1
:goto_0
return-object v1
.end method