PDA

View Full Version : [For Cooks] Auto Cab Installation for your Rom


kin0kin
08-02-2008, 02:04 AM
I posted this over at Sleuth's thread in Hack & Dev, so I thought maybe I should also post it here so that if other cooks would like to incorporate auto installation feature, you can take a look at how it is done.

I have been using auto installation feature in my Roms for the past 3 months and there is no need to introduce another app as everything can be done with just autorun.exe. However, pardon me if I missed something that this app offers but autorun.exe/preautorun.exe doesn't.

Let me share what I know about auto cab installation.

With just autorun.exe, it is possible to:

1) Auto Install cabs from Extended Rom, then
2) Continue Auto Installation from Storage Card
3) It is also possible to Auto install the cabs into Storage Card by editing the cabs Path with some sort of cab creator/editing program. I used WinCECabManager.
4) With the Hide command, you can auto install virtually everything with just autorun.exe

Auto installation is not new and we've seen it used in Extended Rom. We also know that it is possible to Auto Install from storage card. We know that for autorun to work, it has to point to the config.txt file's path:

[HKEY_LOCAL_MACHINE\Comm]
"TurnRadioFlag"=dword:0
"AutoRunType"=dword:0
"AutoRunCFG"="\\Extended_ROM\\config.txt"
"AutoRun"="\\Extended_ROM\\autorun.exe"

In this case, when autorun fires up, it searches for the config.txt in Extended Rom and start executing the parameters in the file. At the end of the config file, it usually ends with the reset command. For example:

LOCK:Enabled
CAB: \Extended_ROM\AdobeFlashLite_2_1.cab
CAB: \Extended_ROM\HTCTaskManager.cab
Hide:Enabled
LOCK:Disabled
RST: Reset


To have auto run install from storage card, we simply change the path to:

[HKEY_LOCAL_MACHINE\Comm]
"AutoRunType"=dword:0
"AutoRunCFG"="\\Storage Card\\config.txt"
"AutoRun"="\\Extended_ROM\\autorun.exe"

Of course, for phones without extended rom, I believe it's look for autorun in windows. In either case, it doesn't matter since all it needs is to launch autorun from somewhere and points to the config file.

The Tricky part for phones with Extended Rom is, how the heck can we auto install from Storage Card after auto installation is done in Extended Rom. We want it to auto install from extended rom, then continue to the storage card, not just either one of them.

To auto install from Storage Card, after auto installation is done with Extended Rom, we simply have to patch the config file path with a command in Extended Rom, then EXECute autorun again. I made a cab called Set_Auto_Run which simply contains:

[HKEY_LOCAL_MACHINE\Comm]
"AutoRunType"=dword:0
"AutoRunCFG"="\\Storage Card\\config.txt"
"AutoRun"="\\Extended_ROM\\autorun.exe"
*there's also another line that sets the autorun flag to 0.

and my Extended Rom config file looks like this:

LOCK:Enabled
CAB: \Extended_ROM\AdobeFlashLite_2_1.cab
CAB: \Extended_ROM\HTCTaskManager.cab
CAB: \Extended_ROM\Set_Auto_run.cab
Hide:Enabled
EXEC:\Extended_ROM\AutoRun.exe
LOCK:Disabled
RST: Reset


The config file in the storage card would be something like this:
LOCK:Enabled
CAB: \Storage Card\Cabs\Call_Firewall.cab
CAB: \Storage Card\Cabs\TCPMP.cab
CAB: \Storage Card\Cabs\FlashVideoBundle.CAB
CAB: \Storage Card\Cabs\Threaded_SMS.cab
LOCK:Disabled
RST: Reset


At the end of the autorun from storage card, it resets the phone. However, if one doesn't use the auto installation feature, autorun will execute the reset command in the config.txt within Extended Rom and completes the Rom Installation.

To auto Install from Storage Card to Storage Card/Windows, simply change the Cab's Path. Instruction can be found in my Rom's link.

To make your life easier, all you need to do is put the following lines in your config.txt in extended rom:

CAB: \Extended_ROM\Set_Auto_run.cab
Hide:Enabled
EXEC:\Extended_ROM\AutoRun.exe
LOCK:Disabled
RST: Reset

And toss in the Set_Auto_Run.cab into your extended Rom, then prepare the config.txt in storage card and you are done. If there's no config.txt in storage card, this feature is bypassed automatically.

Radimus
08-02-2008, 04:05 PM
Thank you... this feature should be in all ROMs, especially LITE ROMs, that usually take so much more time to customize

chunkymonkey
08-02-2008, 04:55 PM
Great info mate. Worth adding a note, or link to this thread, into Matt_kr's 'Extended_ROM Consolidation' thread. I think even more people could benefit from your research that way. (Don't look it up by name, he spelled 'consolidation incorrectly in its title - it's here: http://forum.xda-developers.com/showthread.php?t=335871).

Qudos to you fella.