android
  #181  
Old 03-05-2011, 05:41 AM
slade slade is offline
Member
 
Join Date: Oct 2010
Posts: 118
Default

do not forget this has to be a binary raw dump. i think you do have the right repacker it just has some issues. please to the following and check your files and see if it has differences. maybe its just a missing hex in the end or beginning of the file? I remember weired bytes there.
Reply With Quote

Advertisement [Remove Advertisement]

  #182  
Old 03-06-2011, 03:40 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Well I looked both files and they are completely different....The repacker doesn't work at all or not so good
In the nik1105 repacked file, filenames aren't stored only in the beginning part. This is the main fail cause, I think.

I'll write all the infos about the file format here (that I discovered...when nik releases the source we can improve them...to people are better than one!!)

Format

Sizes are always stored unsigned long, little endian (the first byte is the last hex digit)

::: Header :::

Folder names are always 44 byte long. Unused bytes are NULL.
Each folder block is linked to a file block or another folder block.
Each new folder or fille list (2 or more blocks) begins with 0x40 0x00 x00 x00

- Sysdata main folder -

Begins with "\x01\x00\x00\x00\x00\x00\x00\x00Sysdata", followed by 37 null bytes "\x00" then "\x40\x00\x00\x00" (I finally discovered that this sequence is used when a folder or a file list is beginning.)
Now 4 bytes indicating SySdata.bin file size (it is better to update it at the end of repacking, maybe init it with \xff\xff\xff\xff)-> The repacker has put there a wrong value.
Here 8 null bytes, with unknown functionality.
4 bytes: Number of folders contained in Sysdata\ (not sub-subfolders!)
Other 4 unknown nul bytes

- Folders -

...

- Files -

Blocks of 52 bytes per file.
Filenames seems to be max 44 chars long. Then 4 byte is the position of the data of the file, the following 4 bytes are the file lenght. Both sizes are stored in unsigned long (little endian)

::: DATA :::

At address 0xfc10 begins the data part (of course not always...only if original repack!)

Last edited by Lorenz092; 03-06-2011 at 04:52 AM.
Reply With Quote

  #183  
Old 03-06-2011, 05:42 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Here a nice hack. I updated ONLY one file, quite manually with a python script, of sysdata.bin (default.aui). I changed also sysdata filesize and default.aui filesize.
It should work....!!!

Lets see if it works:
- if it works it's only a problem of the repacker
- if it doesn't work, I could have done a mistake

LINK: sysdata_soundmod.zip
Reply With Quote

  #184  
Old 03-06-2011, 09:27 AM
slade slade is offline
Member
 
Join Date: Oct 2010
Posts: 118
Default

i tried something which worked on my linux so i cannot guarantee anything else but:
making a fat32 image from an rfs image it is still mountable as rfs readonly. but not as writable. so maybe its sufficent to create a fat32 image via linux?!?
Reply With Quote

  #185  
Old 03-06-2011, 09:33 AM
nik1105's Avatar
nik1105 nik1105 is offline
Junior Member
 
Join Date: Apr 2010
Location: Russia, Novosibirsk
Posts: 68
Default

Some notes about packer:
-When you unpack sysdata.bin to some folder, the following path will be created: out\sysdata\
-When you pack archive you should pack out\ folder instead of out\sysdata\
And another thing to notice: path to these folders should contain ony english characters,
in others cases packer can lose file to pack, to check this open log file.

We've already rebuild packed file, it can be downloaded here: http://depositfiles.com/files/zed51dvlx
If this file wont work, it will mean that there is still some issuies with packer module.
At this moment i dont have packer source on my pc, but i will get soon and post here

P.S I have developed only interface(due to lack of time), so i am not responsible for packer behaviour
__________________
http://nsoft.ucoz.ru Join the software revolution.
Reply With Quote

  #186  
Old 03-06-2011, 12:22 PM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Quote:
Originally Posted by Lorenz092 View Post
Here a nice hack. I updated ONLY one file, quite manually with a python script, of sysdata.bin (default.aui). I changed also sysdata filesize and default.aui filesize.
It should work....!!!

Lets see if it works:
- if it works it's only a problem of the repacker
- if it doesn't work, I could have done a mistake

LINK: sysdata_soundmod.zip
Hey slade...don't try try firmware!!
I forgot that also other adresses are to be updated...I'm really idiot sometimes (here in northern Italy we say "mona" hahah)
Reply With Quote

  #187  
Old 03-07-2011, 07:21 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Quote:
Originally Posted by nik1105 View Post
Some notes about packer:
We've already rebuild packed file, it can be downloaded here: http://depositfiles.com/files/zed51dvlx
If this file wont work, it will mean that there is still some issuies with packer module.
As I've already said, your repacked file begins too early to store data. In other words, in the original file ALL file - folder list is in the beginning part of file which means that data comes after. But in the repacked isn't really so. You have only all the folders listed and then data of the first file which is correct for the unpacker but not correct for the player.

EDIT: another challenge is to understand the qmg format. We have an help since they left a bitmap file in the same folder of the qmg encrypted file ----> This will be very very difficult but we are more than one person...yeah!

Last edited by Lorenz092; 03-07-2011 at 07:27 AM.
Reply With Quote

  #188  
Old 03-07-2011, 07:53 AM
nik1105's Avatar
nik1105 nik1105 is offline
Junior Member
 
Join Date: Apr 2010
Location: Russia, Novosibirsk
Posts: 68
Default

oh, i figured out whats wrong, probably this happened because i forgot to translate something in file structure to the packer developer.
About qmg: if we could convert this format to normal picture or animation this will be great, because this is a problem for a lot of people, who wants to customize samsung's devices, but unfortunately there is almost no information about its structure.
Update:
We have found several bugs in packer, now the rebuilded file is equal to the original one.
Archive will be reuploaded in 13-14 hours.
__________________
http://nsoft.ucoz.ru Join the software revolution.

Last edited by nik1105; 03-07-2011 at 10:58 AM.
Reply With Quote

  #189  
Old 03-08-2011, 03:29 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Quote:
Originally Posted by nik1105 View Post
oh, i figured out whats wrong, probably this happened because i forgot to translate something in file structure to the packer developer.
About qmg: if we could convert this format to normal picture or animation this will be great, because this is a problem for a lot of people, who wants to customize samsung's devices, but unfortunately there is almost no information about its structure.
Update:
We have found several bugs in packer, now the rebuilded file is equal to the original one.
Archive will be reuploaded in 13-14 hours.
Yessss Please release the new packer so I can mod the sounds to test or better, I'll attach them here!!
Put in Auidata and repack
Attached Files
File Type: zip Default_aui.zip (22.4 KB, 2 views)
Reply With Quote

  #190  
Old 03-08-2011, 03:42 AM
SekraSoft SekraSoft is offline
Junior Member
 
Join Date: Mar 2011
Posts: 11
Default

Quote:
Originally Posted by Lorenz092 View Post
Well I looked both files and they are completely different....The repacker doesn't work at all or not so good
In the nik1105 repacked file, filenames aren't stored only in the beginning part. This is the main fail cause, I think.
It is because filesystem was mixed with data. Pointers & offsets may allow this thought but standard unpacker is not
Quote:
Originally Posted by Lorenz092 View Post
Each new folder or fille list (2 or more blocks) begins with 0x40 0x00 x00 x00
It is not true 0x40 (you can see it near word "sysdata") is offset of list of files of folder "sysdata" which is in root of sysdata.bin.
Next 0x40 is parent offset of some subfolder.
When I wrote packer, I never use constant 0x40 but now repacked sysdata.bin is equals to original file.
Quote:
Originally Posted by Lorenz092 View Post
I finally discovered that this sequence is used when a folder or a file list is beginning.
I think you should not discover anything because Jean-Louis posted the best explanation of structure of file. But there was unknown bytes too. But it is numbers of folders and files in root.
I think I know application of every byte in sysdata.bin excluding 4 bytes near the size of file. Or size of file has length 8b, but it is very strange because all offsets and sizes have 4b. Or they are magic bytes.
Quote:
Originally Posted by Lorenz092 View Post
Now 4 bytes indicating SySdata.bin file size (it is better to update it at the end of repacking, maybe init it with \xff\xff\xff\xff)-> The repacker has put there a wrong value.
Thank you! Packer puts (size of file + 8bytes)... It is because I wrote packer thinking that size is 8b-length and added 8 to size. I am sorry, it was really my mistake because file was already made, place for size was allocated and I must not add 8b...
Quote:
Originally Posted by Lorenz092 View Post
Here 8 null bytes, with unknown functionality.
4 bytes: Number of folders contained in Sysdata\ (not sub-subfolders!)
Other 4 unknown nul bytes
8 unknown bytes are 4 magic size bytes and parent offset of root's subfolder
other 4 unknown bytes is number of files contained in Sysdata\

This is very-very short rewiev of Sysdata.bin:
01 00 00 00 - number of root's subfolders
00 00 00 00 - number of root's subfiles
Sysdata - name of the first folder in the root
40 00 00 00 - pointer to structure of type 2
8 bytes - size of sysdata.bin & magic bytes
--------------------------
byte #64 = 0x40: here struct type 2 is starting which is about folder "Sysdata"
00 00 00 00 - parent offset
0a 00 00 00 - number of Sysdata's subfolders
00 00 00 00 - number of Sysdata's subfiles
there are 0x0a of structs-3 and 0x00 of structs-4
--------------------------
..another..structs..(filesystem of packed file)..
..data..(files)..
Quote:
Originally Posted by Lorenz092 View Post
At address 0xfc10 begins the data part (of course not always...only if original repack!)
Thank you! 0xfc10 or 64528... When I got this number yesterday, I became
very happy because my function counting size of filesystem counted it right.

nik1105 will post new version of repacker where:
* programs return exitcode!=0 for errors (so UI writes that was error)
* packer writes true size of file
* packer writes filesystem at the beginning of file

And excuse me. I can not speak or write English so my texts can be very strange. I write it myself but I think automatic translator will write they better
Reply With Quote

  #191  
Old 03-08-2011, 04:06 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

I'm really happy that I helped you fixing the repacker
now it's really the time to try changing some content...
Reply With Quote

  #192  
Old 03-08-2011, 04:14 AM
SekraSoft SekraSoft is offline
Junior Member
 
Join Date: Mar 2011
Posts: 11
Default Packer 5; Unpacher 7

There are new packer & unpacker and their sources in the file:
http://depositfiles.com/files/51dr32dxo
Reply With Quote

  #193  
Old 03-08-2011, 09:28 AM
nik1105's Avatar
nik1105 nik1105 is offline
Junior Member
 
Join Date: Apr 2010
Location: Russia, Novosibirsk
Posts: 68
Default

http://nsoft.ucoz.ru/products/firmwa...reRepacker.zip
Here is the full package
__________________
http://nsoft.ucoz.ru Join the software revolution.
Reply With Quote

  #194  
Old 03-08-2011, 09:59 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Quote:
Originally Posted by nik1105 View Post
I only overwritten packer & unpacker into your gui folder and everything went OK! I sucefully repacked the archive and compared with a program: it is the same! Now slade or lebellium should try to mod it with my soudfile attached some post ago...
Reply With Quote

  #195  
Old 03-08-2011, 10:30 AM
SekraSoft SekraSoft is offline
Junior Member
 
Join Date: Mar 2011
Posts: 11
Default

Full package of nik1105 contains new file Howitworks.txt
It may explain how to build tree for packer.

Information for Linux users:
1. You should read this file and make program building this tree.
2. replace all '\' to '/' for paths in sources (please, don't replace \n )
3. packer determines absolute path using presence of symbol ':'

All what I know about unix paths are only that they are using '/' and beginning with '/' so I can't rewrite my sources for you.
Reply With Quote

  #196  
Old 03-08-2011, 01:51 PM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Quote:
Originally Posted by SekraSoft View Post
Full package of nik1105 contains new file Howitworks.txt
It may explain how to build tree for packer.

Information for Linux users:
1. You should read this file and make program building this tree.
2. replace all '\' to '/' for paths in sources (please, don't replace \n )
3. packer determines absolute path using presence of symbol ':'

All what I know about unix paths are only that they are using '/' and beginning with '/' so I can't rewrite my sources for you.
Well when is / for first char means abs path
Thanks for the software...now as i already said, is the time to test on device!

EDIT: little bug in Changelog -> v 0.3(08/03/2010) (2011 )
Reply With Quote

  #197  
Old 03-08-2011, 02:03 PM
lebellium's Avatar
lebellium lebellium is offline
Samsung Moderator
 
Join Date: Sep 2007
Location: Paris
Posts: 3,597
Default

Congrats guys!
Waiting for Slade to make me the R0.ROM file
__________________
I'm French^^ *GenerationMP3 Samsung Moderator*
Reply With Quote

  #198  
Old 03-08-2011, 02:26 PM
SekraSoft SekraSoft is offline
Junior Member
 
Join Date: Mar 2011
Posts: 11
Default

Quote:
Originally Posted by Lorenz092 View Post
Well when is / for first char means abs path
Some words about Linux...

So I can rewrite sources... Or not... (Everybody can do it but I think my code is very strange and it is difficult to understand it)

But somebody should make file with filesystem (or copy file made by Nik's UI for sysdata.bin if we will not work with another files in the future)

Packing sysdata.bin without UI:
(this information will become useful for linux when packer for linux will be made)
pack.ini.zip (attachment) contains pack.ini (made by Nik's UI) with list of files and folders (of sysdata.bin)
this is a file for my packer
you should replace string "put_path_to_folder_here" in the beginning of pack.ini to real path of folder which you want to pack (absolute or related with path of pack.ini)
and run packer.
for example: packer pack.ini sysdata_new.bin pack.log
Attached Files
File Type: zip pack.ini.zip (4.6 KB, 3 views)
Reply With Quote

  #199  
Old 03-09-2011, 04:13 AM
Appick's Avatar
Appick Appick is offline
Junior Member
 
Join Date: Mar 2011
Location: France
Posts: 83
Default

Hi all,

I can't contribute anything. I stumbled across this thread last week-end when I Googled "new frimware update for R0" and just finished reading everything last night.
I didn't understand anything - except that this is brilliant and what I've wanted for ages (I asked about it on GenerationMP3 this summer - what happened to those forums, are they/you still on strike, Lebellium? (why's you're English so good?)) and that you are doing a great job.
Hope you are able to enjoy yourselves abit, though!

So you've got another groupie - all I can do is send you good vibes!
Reply With Quote

  #200  
Old 03-09-2011, 09:07 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Quote:
Originally Posted by Appick View Post
So you've got another groupie - all I can do is send you good vibes!
This is always good

@SekraSoft: I can try to compile them in linux with Anjuta (IDE)...let's see what happens
Reply With Quote

Reply

Tags
r0, rockbox, samsung yp-r0

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:09 AM.