[Windows Mobile] kokotas:
There are quite enough applications out there that sort packages, but

I wrote this simple console application and even though it's not as good as the other package sorters I'm here to share it with anyone interested...

I have written it having in mind the outcome of bepe's xidump:

dump
|_IMGFS
| |___OEM
| |___RESERVED
| |___SYS
| |___.ROM (file)
| |___.VM (file)
|
|_XIP
|_LangDB
|_MSXIPKernel
|_MSXIPKernelLTK
|_OEMXIPKernel
|_WinCENLS_%locale%

so I always run it after xidump in order to get the most out of it...And so should you;)

Usage :

OSPS.exe /t:<Target (OEM) Folder> [COLOR="blue"]/n[/COLOR] [COLOR="red"]/r[/COLOR] [COLOR="green"]/d[/COLOR] [COLOR="Magenta"]/s[/COLOR] [COLOR="Sienna"]/k[/COLOR]
/n <Optional switch to sort packages into EXT>
/r <Optional switch to sort registry files>
/d <optional switch to delete empty packages>
/s <Optional Switch to sort SYS,XIP packages>
/k <Optional Switch to keep all original comments>

If /r is given

the application will rewrite each registry file removing duplicate values and making it more readable.

If /r is omitted

no registry files will be touched.

If /n is given

the application will:

a) Convert every OEM package which name starts with "PACKAGE_*" to EXT Package named after the package's MASD.

b) Move the corresponding localization files ("PACKAGE_...wait for it..._%locale%") to the EXT Package's %locale% subdir.

c) Read initflashfiles.dat and if there are any entries about any EXT Package it will split initflashfiles.dat, rewrite it and create an app.dat for each of those EXT Packages, converting the hexstrings to readable strings.

If /n is omitted

the application will:

a) Copy every OEM package which name starts with "PACKAGE_*" to a new folder - Pkgs\Common - and it will rename them after each package's MASD.

b) Move each corresponding localization Package ("PACKAGE_...wait for it..._%locale%") to a new folder - Pkgs\Locale - and it will rename them after each package's MASD and (%locale%).

c) Read initflashfiles.dat and if there are any entries about any Package it will split initflashfiles.dat, rewrite it and create an initflashfiles.txt for each of those Packages, converting the hexstrings to readable strings.

The application will sort all *manila files found according to language.

If /s is given

the application will:

a) Sort OEM into 3 subfolders : (i) %locale%, (ii) COMMON, (iii) dpi_%dpi%

b) Sort SYS to VK style.

c) Sort XIP like this:

XIP
|_%Build_Number%
|_LangDB
|_MSXIPKernel
|_MSXIPKernelLTK
|_%Device_Name%
|_OEMXIPKernel
|_WinCENLS_%locale%

If /s is omitted

the application will not make any further changes to the dump.

If /d is given

the application will remove any empty Packages (like X1,X2,L1,etc),

If /d is omitted

no packages will be deleted.

If /k is given

the application will keep all the original comments in initflashfiles.dat and app.dat/initflashfiles.txt.

If /k is omitted

the application will just keep some basic comments.

Change Log:

07/July/10 - v1.0.0.0

Initial Release

10/July/10 - v1.0.0.1

Added /s and /k switches

11/July/10 - v1.1.0.0

Added conversion of hexstrings to readable strings for ALL LCIDs

20/July/10 - v1.2.0.0

Bug-Fix: Some files from the locale packages weren't moved as they should

Changed how /k switch works(read more...)

20/July/10 - v1.2.1.0

Increased stability

22/Sep/10 - v1.2.2.0

Bug-Fix: Some PACKAGE_2DManila* folders were left inside OEM

17/Nov/10 - v1.3.0.0

Bug-Fix: Registry sorting wasn't working 100%

22/Nov/10 - v1.4.0.0

Bug-Fix: Manila lcid sorting

To Do:

Any suggestions are welcomed!

Any bug reports are appreciated!

Regards!