MP4 Nation Forums
Back to MP4 Nation - The MP4 Nation Blog - The Raz Special - Themes

It is currently Fri Sep 03, 2010 3:59 am

All times are UTC




Post new topic Reply to topic  [ 111 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Wed Feb 03, 2010 11:22 pm 
Offline
Casual nationite
Casual nationite
User avatar

Joined: Sun Dec 27, 2009 1:55 pm
Posts: 65
Location: Poltava, Ukraine
Ok, as i promised, i release my first version of s(UN)pack Tools here, exclusively at the mp4nation forum.
It is the first and maybe a little buggy version, it is not labeled BETA, but hey - it is! :)

There are not all functions implemented yet, but those implemented seems to work pretty well.
No crushes for me. Be patient while working with this tool and do not harry to push all possible buttons at the same time :)
Some checks are there, some - are not. So do not do wrong things.

Bug reports and ideas are welcome! I'll try to improve my app and fix bugs as fast as possible.

Image

For now app can unpack the whole rom image, extract/replace single files (max new file size is limited to old file size, or some bytes bigger - up to 31 byte bigger, depending on exact file, any way, app will not allow to do the wrong, i hope :) ), extract single folders (including subfolders), change version and descript info. Preview is available for bmp/jpg/txt/xml files, all other formats can be viewed as plain text if you are lucky enough (this function is implemented 'coz some config files havo not the xml or txt but bin or smth alike extension).

The only thing that not implemented for the moment - packing back your own image - this is the one i left for the next version - along with fixing bugs :) And of course there is another way for the moment to pack your own image using ISPtool from sunplus.

Be careful not to spoil your FW image - tool works directly with image file, so better make a copy of it for backup.

Little bit more info:
- app unpacks FW to the "Extract" folder to the folder with the same name as image file;
- app extracts files and folders to the root of the "Extract folder";
- "Output" folder will be used as a default folder for packing tool;
- "Input" folder will be used as a default source folder for packing tool;
- "Temp" folder is a temp folder :)

So, you see - for the moment you are not allowed to choose any folders by yourself. I still think if it is necessary...

Ok, taste please....


P.S. Pls, do not redistribute to other web resources. Only those two in about dialog allowed and openschemes.com and only along with a link to original resource - this topic.


Attachments:
File comment: v1.1 - critical update!
sUNpackTOOLS.zip [473.06 KiB]
Downloaded 18 times

_________________
If it aint broke, take it apart and fix it.
...now waiting for my aPad to be shipped...


Last edited by gordgelin on Tue Aug 17, 2010 7:40 am, edited 5 times in total.
Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 2:54 am 
Offline
Newbie Nationite
Newbie Nationite

Joined: Tue Nov 24, 2009 5:24 am
Posts: 15
AWESOME! Can't wait to try it! :wink:
Thanks for your hard work!


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 6:48 am 
Offline
Learning Nationite
Learning Nationite

Joined: Mon Jan 11, 2010 8:16 am
Posts: 24
works! very good looking tool as well.

Our developer request: It would be great if you could add new files, or replace files with different filesize. I guess that means recomputing a lot of ROFS table entries but it might not be too difficult depending on how the ROFS tables are treated in software.

Anyway, great stuff!


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 7:59 am 
Offline
Casual nationite
Casual nationite
User avatar

Joined: Sun Dec 27, 2009 1:55 pm
Posts: 65
Location: Poltava, Ukraine
openschemes,

yes, adding files and replacing with a files of a bigger size wold be great i think. adding files is especially easy, while replacing needs some of my funcs to be rewritten... must study ROFS specs.

See, i was not successful to find needed ROFS node/file tables descriptions in the net, so i was analyzing the rom image with winhex and calc to investigate the way it is working in. i've investigated the order in which files/folders are placed in the image from the source folder, and don't know if i can put the file to the end of the image and just insert one node item and one fs item to tables to say it exists and to what folder it belongs to and just to update some offsets after that. and the other question is that i don't know - hidden partition are dynamically created while flashing or its size is a constant? But hey - yes i can add functionality you request, but must test the results after :) request accepted.

_________________
If it aint broke, take it apart and fix it.
...now waiting for my aPad to be shipped...


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 11:10 am 
Offline
Supreme Nationite
Supreme Nationite
User avatar

Joined: Fri Feb 22, 2008 6:22 pm
Posts: 1448
Location: Nieuwerkerk a/d Ijssel - Netherlands
Gordgelin, fantastic job 8) keep on going my friend!

_________________
Image Image

Recieved the T13FHD!


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 4:30 pm 
Offline
Learning Nationite
Learning Nationite

Joined: Mon Jan 11, 2010 8:16 am
Posts: 24
gordgelin wrote:
don't know if i can put the file to the end of the image and just insert one node item and one fs item to tables to say it exists and to what folder it belongs to


I thought the table order was entries for dir/file, then subdir/file, etc. So I was thinking that insertion of a new file would have to split the table entries as well as the data. But just slapping it on the end is an interesting idea.

However, I have some suspicion that the device "walks" through the dir entries, loading as it goes using something like datapointer+=thisfilesoffset. In that case, one file placed at the end might blow up the pointer and have the device looking in empty space for all files after that one.

As far as the amount of space, I think it's plenty. You can estimate it by the amount that seems to be "missing" when you plug USB. Mine looks like about 256MB missing. I will find the real values later.


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 5:05 pm 
Offline
Casual nationite
Casual nationite
User avatar

Joined: Sun Dec 27, 2009 1:55 pm
Posts: 65
Location: Poltava, Ukraine
openschemes wrote:
I was thinking that insertion of a new file would have to split the table entries as well as the data. But just slapping it on the end is an interesting idea.

However, I have some suspicion that the device "walks" through the dir entries, loading as it goes using something like datapointer+=thisfilesoffset. In that case, one file placed at the end might blow up the pointer and have the device looking in empty space for all files after that one.



Ok, i thought inserting file will look like this:
- inserting new node item to node table into the proper place;
- inserting new fs item to the fs table into the proper place (depending on the dir it belongs to);
- updating file offsets/file header/some other stuff;
- inserting file data at the end of the rom image;

But then i began to think as you do. i don't think that puting file data at the end will blow up the pointer, 'coz all file offsets are stored in the node table. But that will blow up my app when calculating new file max size for replacing... and for now the new algo looks like this:
- append new node item to the end of the node table;
- inserting new fs item to the fs table into the proper place (depending on the dir it belongs to);
- updating file offsets/ file header/some other stuff;
- inserting file data at the end of the rom image;

openschemes wrote:
I thought the table order was entries for dir/file, then subdir/file, etc.
Yes, it is. And that's the reason i was doubting if i can store new file data at the end.. For now i think i can. Just need to put node and fs items to appropriate places and correct offsets.

openschemes wrote:
As far as the amount of space, I think it's plenty. You can estimate it by the amount that seems to be "missing" when you plug USB. Mine looks like about 256MB missing. I will find the real values later.
Yes, i've noticed that too..mine is missing about >300 mb..

P.S. 'coz don't know ROFS specs, pls tell me, is that node table, that goes after rom image header also flashed to device or that is for flasher only? 'coz if not flashed, than you are right - must split data too...

_________________
If it aint broke, take it apart and fix it.
...now waiting for my aPad to be shipped...


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 5:57 pm 
Offline
Learning Nationite
Learning Nationite

Joined: Mon Jan 11, 2010 8:16 am
Posts: 24
gordgelin wrote:
is that node table, that goes after rom image header also flashed to device


Yes, the node table is flashed to device at page 0x2000 - the start of ROFS in nand. So that must mean that the first 32MB is reserved for RedBoot, and the next 200-300MB is reserved for ROFS. After that, it's the FAT partition the user can see. I will give you the real size data soon, so you can check the limit when adding new files.

However, I think I have found a real bug this time. Replacing the OS file 8000_MMI.RAP would not boot, so I traced the problem and it seems there may be a difference/issue with arrays used to hold the data? maybe i, i+1 issue? Here's how to duplicate it.

Open image, extract 8000_MMI.RAP. Replace with extracted file. New image will not match the old image in two bytes. Last byte of RAP and first byte of next file, perhaps?


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Thu Feb 04, 2010 6:32 pm 
Offline
Casual nationite
Casual nationite
User avatar

Joined: Sun Dec 27, 2009 1:55 pm
Posts: 65
Location: Poltava, Ukraine
openschemes wrote:
gordgelin wrote:
is that node table, that goes after rom image header also flashed to device

Yes, the node table is flashed to device


Do we both mean under "rom header" first 32 bytes of image?

openschemes wrote:
[Open image, extract 8000_MMI.RAP. Replace with extracted file. New image will not match the old image in two bytes. Last byte of RAP and first byte of next file, perhaps?


Accepted and fixed, new version uploaded. Thnx for report. Just messed up some index, so had one byte lost and one junk byte :)

_________________
If it aint broke, take it apart and fix it.
...now waiting for my aPad to be shipped...


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Fri Feb 05, 2010 4:10 am 
Offline
Learning Nationite
Learning Nationite

Joined: Mon Jan 11, 2010 8:16 am
Posts: 24
gordgelin wrote:
Do we both mean under "rom header" first 32 bytes of image?


Yes, the first bytes in page 0x2080 of flash are the 32-byte header starting with .moR. Then, the table data.

gordgelin wrote:
Accepted and fixed, new version uploaded. Thnx for report. Just messed up some index, so had one byte lost and one junk byte :)


No problem - glad you were able to find and fix so quickly!


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Fri Feb 05, 2010 2:09 pm 
Offline
Casual nationite
Casual nationite
User avatar

Joined: Sun Dec 27, 2009 1:55 pm
Posts: 65
Location: Poltava, Ukraine
Hey, guys! Download the new version 1.1! Great compatibility improvements done.
Recently i found in the web a great bunch of FWs which were ununpackable by my tool 'coz of their not standart order of packaged files, so i fix my app to support them too! If you had any issues - try this version.

And another known issue - do not try to replace the last file in this folders:
.\Resource\Xml\video\ - if you have ascending order of folders in your fw
.\Image\Game - if you have descending order of folders in your fw
.\Image - the same as previous, but only if do not have GAME folder

_________________
If it aint broke, take it apart and fix it.
...now waiting for my aPad to be shipped...


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Fri Feb 05, 2010 4:11 pm 
Offline
Learning Nationite
Learning Nationite

Joined: Mon Jan 11, 2010 8:16 am
Posts: 24
Cool - a new update!

Do you mind explaining what these file restrictions are?

gordgelin wrote:
last file in this folders:
.\Resource\Xml\video\ - if you have ascending order of folders in your fw
.\Image\Game - if you have descending order of folders in your fw
.\Image - the same as previous, but only if do not have GAME folder


They sound very logical, so I'm interested as to the root cause. For now, I'll follow your rules when replacing.


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Fri Feb 05, 2010 4:54 pm 
Offline
Casual nationite
Casual nationite
User avatar

Joined: Sun Dec 27, 2009 1:55 pm
Posts: 65
Location: Poltava, Ukraine
openschemes wrote:
They sound very logical, so I'm interested as to the root cause. For now, I'll follow your rules when replacing.


This restriction caused by one tiny bug in the replacing file algo. I have no time to fix it yet. But during weekend i will try to do that and to add functions you have requested.

Bug is that for now app decides if the replacement file size is valid in this way:
(next file offset - this file offset). But those mentioned files are last files in fs items table, so NO next file offset. Sorry that was late night when i was coding that part :(

_________________
If it aint broke, take it apart and fix it.
...now waiting for my aPad to be shipped...


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Fri Feb 05, 2010 7:18 pm 
Offline
Supreme Nationite
Supreme Nationite
User avatar

Joined: Fri Feb 22, 2008 6:22 pm
Posts: 1448
Location: Nieuwerkerk a/d Ijssel - Netherlands
gordgelin wrote:
Hey, guys! Download the new version 1.1! Great compatibility improvements done.
Recently i found in the web a great bunch of FWs which were ununpackable by my tool 'coz of their not standart order of packaged files, so i fix my app to support them too! If you had any issues - try this version.

And another known issue - do not try to replace the last file in this folders:
.\Resource\Xml\video\ - if you have ascending order of folders in your fw
.\Image\Game - if you have descending order of folders in your fw
.\Image - the same as previous, but only if do not have GAME folder


Great :!: 8)

_________________
Image Image

Recieved the T13FHD!


Top
 Profile  
 
 Post subject: Re: s(UN)pack Tools 2010 - new sunplus 8000 FW modding tool
PostPosted: Tue Feb 09, 2010 7:52 am 
Offline
Learning Nationite
Learning Nationite

Joined: Mon Jan 11, 2010 8:16 am
Posts: 24
gordgelin wrote:
Bug is that for now app decides if the replacement file size is valid in this way:
(next file offset - this file offset). But those mentioned files are last files in fs items table, so NO next file offset. Sorry that was late night when i was coding that part :(


Very clear explanation - thanks for sharing the details. You've got a very nice tool here, I think that soon it will help bring a lot of new hackers into the fold.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 111 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group