Author Topic: .opk extracting  (Read 7430 times)

Deagle275 (OP)

  • Posts: 110
.opk extracting
« on: September 04, 2013, 09:55:36 pm »
So, i extracted an opk (edit it to .zip and extract), if i want to edit some files, and turn it back into an .opk , i just zip it with store mode and rename it from something.zip to something.opk?Also, if i want to edit the name displayed on the .opk , i just change the name of the .elf?Also , separate settings ?Because i intend to prepare some dosbox auto-boot , right settings  games :D .

zear

  • * Moderator
  • Posts: 2381
Re: .opk extracting
« Reply #1 on: September 04, 2013, 10:26:55 pm »
This method will absolutely not work!
Opk is a squashfs filesystem. By renaming it to .zip you most likely tricked your extraction program to see a known file extension. It has however detected that it is not a .zip, but .squashfs and correctly extracted it. I have no idea what sort of a program you are using, however the dedicated tools for squashfs image handling can be found in "squashfs-tools" package, which should be part of every distro's package repository.

The following tools are used:
unsquashfs file.opk - to extract an opk (or just simply mount it)
mksquashfs directory file.opk - to create an opk with the contents from directory

To modify parameters of the opk such as the name, icon or executable, modify the *.desktop file present in the opk. More information can be found here.

Deagle275 (OP)

  • Posts: 110
Re: .opk extracting
« Reply #2 on: September 04, 2013, 10:41:00 pm »
I am using ubuntu , and it did extract correctly , using the default app .
Well, the .png isn't corrupt , and i've managed to open the .desktop file, as you told me .
This http://packages.ubuntu.com/lucid/squashfs-tools ?

zear

  • * Moderator
  • Posts: 2381

Deagle275 (OP)

  • Posts: 110
Re: .opk extracting
« Reply #4 on: September 04, 2013, 11:53:49 pm »
 unsquashfs $HOME/GCW-Zero/OPK/cavestory.opk
<
Used this , after using sudo apt-get install squashfs-tools , And , got that .
« Last Edit: September 04, 2013, 11:55:33 pm by Deagle275 »

Deagle275 (OP)

  • Posts: 110
Re: .opk extracting
« Reply #5 on: September 05, 2013, 08:27:39 pm »
Help, all i got as an answer from terminal was a < :(

zear

  • * Moderator
  • Posts: 2381
Re: .opk extracting
« Reply #6 on: September 05, 2013, 09:44:09 pm »
Help, all i got as an answer from terminal was a < :(
Is that your prompt?
'>' (not '<') would be printed if you had a linebreak character '\' in your path. I have no other explanation.

You should have received something similar to this:
Code: [Select]
[[email protected] tmp]$ unsquashfs zerox86.opk
Parallel unsquashfs: Using 2 processors
3 inodes (19 blocks) to write

[==============================================================================================================================================================================================================================|] 19/19 100%
created 3 files
created 1 directories
created 0 symlinks
created 0 devices
created 0 fifos

Keep in mind that with the default parameters, the opk is extracted to ./squashfs-root, so you might want to check if such directory exists.

Deagle275 (OP)

  • Posts: 110
Re: .opk extracting
« Reply #7 on: September 05, 2013, 10:35:30 pm »
Thenk you, tested again, now worked :D

 

Post a new topic
Post a new topic