#Smali Editing help
1 messages · Page 1 of 1 (latest)
What
I need help for smali Editing to export my save file i don't know how to edit smali.
.method private exportAppData()V
.locals 8
const-string v0, "/data/data/jp.co.level5.yws1"
const-string v1, "/sdcard/yw1_dump"
new-instance v2, Ljava/io/File;
invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
new-instance v3, Ljava/io/File;
invoke-direct {v3, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-static {v2, v3}, Lcom/Level5/YokaiWatch/YW1Activity;->copyRecursive(Ljava/io/File;Ljava/io/File;)V
return-void
.end method
.method public static copyRecursive(Ljava/io/File;Ljava/io/File;)V
.locals 10
invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z
move-result v0
if-eqz v0, :file_copy
invoke-virtual {p1}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :dir_exists
invoke-virtual {p1}, Ljava/io/File;->mkdirs()Z
:dir_exists
invoke-virtual {p0}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object v0
array-length v1, v0
const/4 v2, 0x0
:loop
if-ge v2, v1, :done
aget-object v3, v0, v2
new-instance v4, Ljava/io/File;
invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v5
invoke-direct {v4, p1, v5}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
invoke-static {v3, v4}, Lcom/Level5/YokaiWatch/YW1Activity;->copyRecursive(Ljava/io/File;Ljava/io/File;)V
add-int/lit8 v2, v2, 0x1
goto :loop
:file_copy
new-instance v0, Ljava/io/FileInputStream;
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
const/16 v2, 0x1000
new-array v2, v2, [B
:read_loop
invoke-virtual {v0, v2}, Ljava/io/FileInputStream;->read([B)I
move-result v3
const/4 v4, -0x1
if-ne v3, v4, :write_data
goto :close_streams
:write_data
const/4 v4, 0x0
invoke-virtual {v1, v2, v4, v3}, Ljava/io/FileOutputStream;->write([BII)V
goto :read_loop
:close_streams
invoke-virtual {v0}, Ljava/io/FileInputStream;->close()V
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
:done
return-void
.end method
this would prob work
and you can hook this on com.Level5.YokaiWatch.YW1Activity
exports all the files recursively in data/data
the files you would be looking for after exporting
would be main.bin & backup.bin
but you would still need a script to import them back for your friend
i dont understand anything what is to complicated for me sry
Okay i will but now i don't have time i am still a student who needs to go to school
yeah thats it
okay but with which save editor can i edit my save
you should rename the ykw1 folder to yw1
otherwise your save will corrupt itself

you'd have to ask @viscid briar
im sure he would know
out of curiosity, can you send me your save
I want to check something
you can have mine pookie
sure i sent him mine already
lmao
you sound like biel 😭
(someone in the comp discord)
want to check, the switch port didn't change the format much
so I was checking if they changed it in the smartphone port
they did quite a bit, so tommorow I'll work on it
alot.
I'll get into it tmrw I don't have much time right now
oh dear
should be easy though