Users browsing this thread: 5 Guest(s)
How to identify archive file format (PC only detects it as "file")
#1
So there's this old offline game I have in the phone that I wanted to extract, and I'm stumped because the file is unidentified. 
The main game folder only had two files, both of unidentified format. In the game's root folder, there's a "cache"and "lib", but both are empty.

Opening the unidentified file in Notepad gives me the scripts, and I see directory commands such as "/data/img/resources/bg05a.jpg". I am not able to find WHERE is this "data/img" folder is. I tried scanning the same files with Ravioli Scanner, and it does detect images and such, but it  wasn't able to extract the files. The images all came out corrupted. I assume then, that this unidentified file format is actually some form or archive file. I just have no idea what it is. 

Ravioli also output a bunch of .dat files, which I tried to run through Aseet Studio, but turned out nothing. 

Any help? Attached is the file in question

https://drive.google.com/file/d/1MscNlCJ...sp=sharing
Reply
Thanked by:
#2
If you need to extract from an archive then use quickbms. Unfortunately because you didn't say which game so I can't look for a script for you. Additionally if the game your attempting to extract from has no script then you can create one using the guide on the forums. https://www.vg-resource.com/thread-28180.html
Reply
Thanked by:
#3
My bad. The game is a visual novel called "Shall We Date Heian Love", but the game's since taken off the dev's servers so I'm not sure if you can download the necesary files.
If I try to open the file itself with notepad, it shows me the game's story script. Not entirely sure where the images are stored at
Reply
Thanked by:
#4
When you open it with a hex editor, the first few letters of the file are "SQLite format 3". It is an SQLite database file.

Using SQLite Browser (https://sqlitebrowser.org), I can see they saved every file under "fileinfo" table, with original filename as key and its data as value. It's pretty easy to rip.

[Image: sgeTXhC.png]

- Rufas
Reply
Thanked by:
#5
Hi, sorry for being a n00b but I'm not sure how to rip the data with SQLite Browse. Do I just import it, or do I have to do something with a Hex Editor first??
When I import database from SQL file I get this error: "Error importing data: Error in statement #1: near "SQLite": syntax error"

Clearly I'm doing something wrong here
Reply
Thanked by:
#6
You shouldn't import it, but just open it. Go to "File" -> "Open Database..." and select "All Files (*)" to see the file. Click on the file name and click "Open" button.

To get to where I was on the screenshot,
1) click on "Browse Data" tab
2) right below you see "Table", select "fileinfo" from the drop-down menu.
3) scroll down, and on any images, double-click on "BLOB"
4) you can then save the file by clicking "Export" button.

Unfortunately I don't see there's any way to auto-export all files. You'll have to export it one-by-one.

If you are familiar with command-line, you can use the command-line version (https://sqlite.org), and run
Code:
sqlite3  Himekoi  'SELECT writefile(filepath,filedata) FROM fileinfo'

You'll get a new folder called 'data' with everything in it.

Good luck,
- Rufas
Reply
Thanked by: otchi
#7
Hi, thanks! I managed to get DB Browser to work.
So about the SQlite comman, do I have to put the HImekoi file in the same folder as the SQlite?
Also

Code:
sqlite3  Himekoi  'SELECT writefile(filepath,filedata) FROM fileinfo'


^ Do I just copy-paste this in, or should I change "filepath" into a directory (e.g "C:/My folder")? I ust tried to run it and it's telling me "Sqlite 3 is not recognized as a command".
Reply
Thanked by:
#8
Sorry for the confusion, the command-line version is actually another tool from different author, so you'll need to download it from https://sqlite.org/download.html to run the code.

The code can be just copy-paste to run. You do not need to change anything. It will save them on the same folder you run the code from.

The 'filepath' and 'filedata' is the column header from table 'fileinfo', FYI.

Either way, you can always get the files from DB browser if you are having problem with command-line stuff.

Good luck,
- Rufas
Reply
Thanked by:
#9
Oh I see. Which one do I have to download? I have a Windows 8 64 bit.
I'm supposed to run the code in CMD, or the new downloaded tool? Thanks for being patient with my questions
Reply
Thanked by:
#10
It should be under "Precompiled Binaries for Windows", the one with "sqlite-tools-XXX.zip". It is a 32-bit exe, but Windows 64-bit can run it just fine.

After that, put "Himekoi" together with "sqlite3.exe" run the CMD code
Code:
sqlite3  Himekoi  'SELECT writefile(filepath,filedata) FROM fileinfo'

You should get every files inside 'data' folder.

If it doesn't work, as a backup plan, you'll have to export each file, one-by-one, with DB browser.

Good luck,
- Rufas
Reply
Thanked by:
#11
Sorry to trouble you again but this time I'm getting "unrecognized token "SELECT"" error
Reply
Thanked by:
#12
That's strange... the code works on my end. I have no idea why it doesn't work on yours.

I'll save you the trouble and just upload the extracted files.

http://www.mediafire.com/file/5i1puok61u...me.7z/file

- Rufas
Reply
Thanked by: otchi
#13
Thank you so much!
It's really weird. Should I have run CMD as Admin? Or did I do something wrong somewhere?
What I did was download "sqlite-tools-win32-x86-3330000", put the HImekoi file inside the same folder as "sqlite3.exe", and then ran the code
I already changed the CMD directory to the folder that contains sqlite3.exe too

But I used the Windows CMD. Should I have run it into the sqlite3.exe one?

This is what my CMD window looks like

[Image: cfa871740524e42b492f240c13dd96c7cd15da59.jpg]
Reply
Thanked by:
#14
The screenshot is a lot clearer on the error, it is the single-quote before SELECT causing problem.

Try run the SQL query on interactive shell, like this:

Code:
F:\sqlite-tools-win32-x86-3330000>sqlite3  Himekoi<ENTER>
sqlite>SELECT writefile(filepath,filedata) FROM fileinfo;<ENTER>
sqlite>.exit<ENTER>

Do not type <ENTER>, just press Enter on the keyboard.

- Rufas
Reply
Thanked by:
#15
Sorry to keep troubling you over this, but this is what happens when I try to enter "SELECT writefile(filepath,filedata) FROM fileinfo;"

[Image: 74087a841ed875136452a129218a73de6370fe50.png]



It just turned blank
I have no idea what keeps going wrong.
Reply
Thanked by:


Forum Jump: