- 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
194 lines
3.9 KiB
Smali
194 lines
3.9 KiB
Smali
.class public abstract Lcom/helpshift/util/FileUtil;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# direct methods
|
|
.method public static deleteDir(Ljava/lang/String;)V
|
|
.locals 5
|
|
|
|
.line 46
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 48
|
|
invoke-virtual {v0}, Ljava/io/File;->exists()Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 52
|
|
:cond_0
|
|
invoke-virtual {v0}, Ljava/io/File;->listFiles()[Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
.line 53
|
|
array-length v1, p0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
.line 58
|
|
:cond_1
|
|
array-length v1, p0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_3
|
|
|
|
aget-object v3, p0, v2
|
|
|
|
.line 59
|
|
invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 60
|
|
invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v4}, Lcom/helpshift/util/FileUtil;->deleteDir(Ljava/lang/String;)V
|
|
|
|
.line 62
|
|
:cond_2
|
|
invoke-virtual {v3}, Ljava/io/File;->delete()Z
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 65
|
|
:cond_3
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
|
|
return-void
|
|
|
|
.line 54
|
|
:cond_4
|
|
:goto_1
|
|
invoke-virtual {v0}, Ljava/io/File;->delete()Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static readFileToString(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 25
|
|
:try_start_0
|
|
new-instance v1, Ljava/io/File;
|
|
|
|
invoke-direct {v1, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 26
|
|
new-instance v2, Ljava/io/FileInputStream;
|
|
|
|
invoke-direct {v2, v1}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
.line 28
|
|
:try_start_1
|
|
invoke-virtual {v1}, Ljava/io/File;->length()J
|
|
|
|
move-result-wide v0
|
|
|
|
long-to-int v0, v0
|
|
|
|
.line 29
|
|
new-array v1, v0, [B
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 31
|
|
invoke-virtual {v2, v1, v3, v0}, Ljava/io/FileInputStream;->read([BII)I
|
|
|
|
.line 33
|
|
new-instance v0, Ljava/lang/String;
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/String;-><init>([B)V
|
|
:try_end_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 39
|
|
invoke-static {v2}, Lcom/helpshift/util/Utils;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
move-object v0, v2
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_1
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_1
|
|
move-exception v1
|
|
|
|
move-object v2, v0
|
|
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
:try_start_2
|
|
const-string v1, "fileutil"
|
|
|
|
.line 36
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "Error reading file: "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v1, p0, v0}, Lcom/helpshift/log/HSLogger;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 39
|
|
invoke-static {v2}, Lcom/helpshift/util/Utils;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
const-string p0, ""
|
|
|
|
return-object p0
|
|
|
|
:goto_1
|
|
invoke-static {v0}, Lcom/helpshift/util/Utils;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
.line 40
|
|
throw p0
|
|
.end method
|