欢迎Hermes爱好者s署名转载本文,转载请遵循署名-非商业性使用-相同方式共享 2.5协议,注明出自http://www.thinkagain.cn 

You can copy, distribute this article, but dont forget to point a link to my site:http://www.thinkagain.cn

English user please scrolls down for english explanation.
=====================================================

授之以之: 

系列2. 分解OS.nb文件,制作ROM kitchen所需的ROM文件

续上文,我们已经从Dopod官方WM6.0 ROM中提取出OS.nb文件。本文将介绍如何分解OS.nb文件,制作ROM kitchen所需的ROM文件。再次说明下,本系列所提的ROM kitchen,均指的是bepe的ROM kitchen,但原文链接提供的ROM kitchen是基于Universal ROM,而本系列所探讨的是,如何自己制作基于dopod官方WM6.0 ROM的ROM Kitchen。

基于XDA论坛上的dump ROM工具和bepe的packagetool,我编制了一个Decompile_OS.bat批处理文件来自动分解OS.nb和生成ROM kitchen所需的OEM,ROM(含XIP)和SYS文件夹。运行该批处理文件后,将会在该文件所在目录下生成My_ROM_Kitchen目录,里面包括OEM,ROM和SYS目录,3个ROM Kitchen必需的文件夹。请在下滚到页末从本站下载此批处理文件。

因Bepe的Packagetool的执行需.NET 2.0支持,所以请确保系统已安装Microsoft .NET Framework Version 2.0,或Microsoft下载,并安装。

为了更好地查看ROM文件,请更改系统的文件夹选项,使资源管理器显示文件的扩展名和显示系统文件及隐藏文件。

  

1. 解压decompile_os.zip,得到Decompile_OS.bat批处理文件和Tools文件夹,批处理文件执行时调用的工具软件全部在Tools文件夹内。请将从Dopod官方WM6.0 ROM提取的Windows.nb文件复制到Decompile_OS.bat所在目录。如图1。

 

分解OS,制作WM6.0 ROM kithcen  

Fig.1 将Windows.nb复制到文件夹

2. 双击Decompile_OS.bat,执行批处理文件。将会提示“请将Windows.nb或者OS.nb复制到本文件夹”,如果你已经复制完毕,按任意键将开始分解OS文件。如图2。

分解OS,制作WM6.0 ROM kithcen

Fig.2 运行Decompile_OS.bat

3. 按任意键后,批处理文件将会将Windows.nb从命名为OS.nb,并开始分解OS.nb。

分解OS,制作WM6.0 ROM kithcen

Fig.3 开始从OS.nb中提取ROM文件

4. 这时屏幕会滚动大量文件信息,不会理会。

分解OS,制作WM6.0 ROM kithcen

Fig.4 Dump OS.nb

5. 出现图5提示说明,OS.nb分解完毕后,会生成dump目录和一些临时文件(OS.nb.extra,OS.nb.payload,imgfs.bin和dump_MemoryMap.txt)。按任意键后,批处理会自动将dump文件夹改名为My_ROM_Kitchen,并调用PKGTool开始制作SYS和OEM文件夹。

分解OS,制作WM6.0 ROM kithcen

Fig.5 按任意键开始制作SYS和OEM

6. OEM和SYS文件夹制作完毕后,按任意键开始制作XIP文件夹。如图6。

分解OS,制作WM6.0 ROM kithcen

Fig.6 按任意键开始制作XIP

7. 请确保OS.nb文件在批处理文件目录下。

分解OS,制作WM6.0 ROM kithcen

Fig.7 确保OS.nb在目录中

8. XIP制作完毕后,批处理会自动将原目录下的OS.nb移动到My_ROM_Kitchen/ROM/目录下。至此Bepe的ROM Kitchen所需的OEM,SYS和ROM文件夹已全部制作完毕。

分解OS,制作WM6.0 ROM kithcen

Fig.8 XIP文件夹制作完毕,将SYS,OEM和ROM复制到ROM kitchen

批处理运行完毕后,会在批处理所在目录下生成My_ROM_Kitchen文件夹。如图9。

分解OS,制作WM6.0 ROM kithcen

Fig.9 My_ROM_Kitchen已生成

My_ROM_Kitchen里面还有OEM,ROM和SYS 3个子目录。如图10。这3个目录就是从Dopod 官方版WM6.0 ROM中提取的ROM kitchen文件。本批处理亦可以用于分解非官方版OS.nb文件,此时有可能Packagetool将会在本目录下生成很多该OS制作者自行添加的一些文件(如一些OEM软件等),请自行将这些文件复制到SYS文件夹下。

分解OS,制作WM6.0 ROM kithcen

Fig.10 OEM,SYS和ROM文件夹

打开OEM文件夹,可以看到里面包括8个目录和OEM.cer文件。其中OEMOPERATORS目录下的文件尤为重要,通过修改该目录下的Preconfig.txt可以设置第一次运行Windows mobile 6.0时的自动运行的配置。OEMAPPS里面是一些系统自带的OEM的程序,如MMS程序,照相机(Camera.exe),ClearValuePDF程序等。你可以将它们提取出来,制成ROM kitchen的可选项。大部分的文件夹下面都含有*.rgu文件,这是注册表文件。你可以用写字板(Notepad)编辑它们。但为了保证ROM的完整性,不建议直接修改这些rgu文件,建议在制作ROM kitchen单独建立rgu文件,这些将在以后讨论。

分解OS,制作WM6.0 ROM kithcen

Fig.11 OEM文件夹内容

ROM文件夹里面还有XIP子文件夹和OS.nb文件(从官方版ROM提取的OS.nb)

分解OS,制作WM6.0 ROM kithcen

Fig.12 ROM文件夹内容

SYS文件夹内含的子目录比较多,主要是一些系统软件,如输入法,windows live等,通过编制option.xml,你亦可以将在ROM kitchen里面做成可选项。

分解OS,制作WM6.0 ROM kithcen

Fig.13 SYS文件夹内容

在SYS下有一个WinCENLS_WWE文件夹,进入该目录后,可看见一个wince.nls文件。该文件里面含有的是各个国家地区的语言,时间,货币,数字显示等,Dopod官方版默认的wince.nls里面没有包括中国(中华人民共和国)的设置内容。本站提供的wince.nls里面含有中国,日本和韩国设置内容,但是有1.5Mb大,请在下面下载后替换原文件。或者你也可以“拿来主义”,用本批处理分解其它网友制作的中文ROM,然后采用它们的wince.nls。wince.nls是硬编码后的文件,所以目前为止我还不知道如何编辑它。

OK,本文到此为止,ROM kitchen所需的3个文件夹(OEM,SYS和ROM)均已搞定,下次,我们将开始建立ROM kitchen(基于Bepe ROM kitchen)。 

软件下载(Tools download)

Microsoft .NET Framework Version 2.0,Microsoft下载

Decompile_OS.zip,本站下载。 

Download decompile_os.zip
zip- File
07. Aug 2007 (5305Hits)

wince.nls文件,本站下载。

Download wince.nls
nls- File
08. Aug 2007 (1815Hits)

 

 

=============English explanatin================== 

 

Lesson 2. Extract ROM files for kitchen from OS.nb

Continue…

We are already extracted OS.nb from Dopod official WM6.0 ROM in the previous. Today I will talk about how to decompile OS.nb to make the necessary ROM files for ROM kitchen. Again, the ROM kitchen we mentioned in the series is always bepe’s ROM kitchen, however ROM kitchen in the original released page is basedd on universal ROM, while our sereis is talk about how to make your owner rom kitchen based on official WM6.0 ROM. 

I made a Decompile_OS.bat file to automatically decompile OS.nb and create OEM, ROM(includes XIP) and SYS folders for ROM kitchen based on dump ROM tools and bepe’s packagetool which are released on XDA forum. After running bat file, it will create My_ROM_Kitchen folder which includes OEM, ROM and SYS directories. You can download this bat file from above.

Before starting decompile works, you have to ensure:

Be sure your system already installed Microsoft .NET2.0 Framework. Or download from MS. 

Revise your folder option, be sure you can see the extension name of file, the hiden file and the system file can be displayed correctly in explorer.

 

1. Extract the decompile_os.zip you downloaded from above, it includes Decompile_OS.bat file and Tools folder where the executive files evoked by bat are placed. Copy the Windows.nb that you extracted from official ROM to folder. See Fig.1. 

2. Double click to run Decompile_OS.bat, be sure the windows.os is in the folder ,then press any key to start decompile OS file. See Fig.2.

3. After you press any key, the bat file will rename windows.nb to OS.nb, and decompile it. See Fig.3.

4. Large file information will scrolled in screen, let them go. See Fig.4. 

5. If the screen displays “OS.nb已分解,按任意键开始制作SYS安定OEM文件夹”, it indicates that the OS.nb is decompiled. There are dump folder and some temporary files(OS.nb.extra,OS.nb.payload,imgfs.bin和dump_MemoryMap.txt). After you press any key, the bat file will rename dump folder to My_ROM_Kitchen, and evoke PKGTool to make SYS and OEM directories. See Fig.5.

6. After OEM and SYS directories are made, press any key to start making XIP folder. See Fig.6.

7. Be sure OS.nb is in the same folder with bat file. 

8. After the XIP folder is made, the bat file will automatically move OS.nb to My_ROM_Kitchen/ROM. So far, we have done the decompile and make necessary folders for ROM kitchen works. See Fig.8. Press any key to exit bat.

The bat file will create My_ROM_Kitchen directory in root folder, see Fig.9. The My_ROM_Kitchen includes OEM, ROM and SYS sub folders which are extracted from dopod official WM6.0 ROM. See Fig.10. Not only decompile the official wm6.0 rom, but also this bat can be used to decompile other inofficial ROM. Sometimes, there are some files(such as OEM softwares) under My_ROM_Kitchen while you use it to decompile inofficial ROM, please manually copy them into SYS folder.

 In OEM folder, there are 8 sub folders and OEM.cer file. See Fig.11. Be revising the Preconfig.txt in OEMOPERATORS, you can customize the configuration in the first time windows mobile 6.0 running. OEMAPPS includes some default OEM applications, e.g. camera, MMS application(Acro MMS), ClearValuePDF etc. You can pick them out, by making option.xml to let them are selectable option in ROM kitchen. Almost folders include *.rgu file, the rgu file is the registry file, you may edit it by using Notepad. However, for the sake of keeping integrality of ROM, I suggest making rgu files individually and add them to ROM kitchen instead of revising them directly. We will talk about how to do that later. 

ROM folder includes XIP sub folder and OS.nb which is extracted from official ROM. See Fig.12.

There are many sub folders in SYS. See Fig.13. Most of them are system software, e.g. inputs, windows live. By making option.xml, they are also can be selectable in ROM kitchen. Under SYS, there is a folder named WinCENLS_WWE, enter it, you will see a wince.nls file. This nls file contains the country regional settings. The default nls file from dopod official ROM doesnt contain the chinese regional setting. The wince.nls in above contains chinese, japanese and korea regional settings with file size 1.5Mb. Please download it and replace the default wince.nls file. So far, we have decompiled OS.nb and made the OEM, SYS and ROM folders for ROM kitchen. Next we will talk about building ROM kitchen.

[tags]hermes, PDA, ROM kitchen, tutorial, wm6.0, X01HT[/tags] 

Feed Me


转载文章请注明转载自:ThinkAgain - Let's Blog!

引用地址:http://www.thinkagain.cn/archives/334.html