OK, so I've searched the Wiki & the forums, Googled other forums, waded through MSDN documents, tried multiple methods using makecab and WinCE Cab Manager, and I'm still unable to create a working CAB file that successfully applies customizations via the registry.
What I have are various XML files with the customizations I'd like to implement by creating one CAB I can call after hard resetting. The device of interest is an HTC Hermes running LWSV WM6, latest rom. Basically, at this point I need a "make CAB file from XML files" tutorial. I found the one in the Wiki here but the part I needed on the 2nd page hasn't been written.
Any kind soul willing to give me a hand?
TIA,
denali
Well, it would be easier to help you if you told us what is the specific problem you are running in to.
- Does makecab.exe fail to create a cab with your xml?
- Does the cab fail to install?
- Do you get some sort of error message at some point?
I made only one attempt at creating a registry only cab, but it was successful. All I did was:
makecab _setup.xml mysettings.cab
Here is one hint though: open your XML in IE or another browser. You will immediately see if it is malformed in some way (maybe a missing tag).
Thanks for your reply.
Makecab looked to be the simplest way, and it did generate a cab, which failed to install with not so much as an error message; it just informed me installation was unsuccessful. BTW, the cab was on my storage card.
One of my thoughts was that the code might be wrong, so I looked at the xml in IE, notepad, and even ran everything through the basic syntax scan Cab Manager does when trying to add text to the provisional xml areas. I did have to make some changes; maybe I'll have another go at scrubbing the files.
denali
There is another possibility for this error:
Your cab may not have permission to alter the security settings you are attempting to apply.
Some settings require a cab to be signed with a trusted certificate.
Ordinarily I'd tell you to application unlock your phone, but since you want to run the cab immediately after hard reset I am not sure how to solve the issue.
OK, so this is what I tried, following a one-bite-at-a-time strategy.
I extracted XML code and cleaned it up in Notepad, previewed it in IE with no glaring issues to my eye.
Code:
<wap-provisioningdoc>
<!-- 2-1. Home Screen Plug-in
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\Today\Items">
<characteristic type="Get Xpress Mail">
<parm name="Order" value="5" datatype="integer" />
</characteristic>
</characteristic>
</characteristic> -->
<!-- 3-2. Ringtone-->
<characteristic type="FileOperation">
<characteristic type="\Windows\Rings\gm sunny audio2.wav" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\gm sunny audio2.wav" translation="install"/>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Sounds">
<characteristic type="RingTone0">
<parm name="Sound" value="\Windows\Rings\gm sunny audio2.wav" datatype="string"/>
<parm name="Category" value="Ring" datatype="string"/>
</characteristic>
</characteristic>
</characteristic>
<!--4-1. PIE home page
<characteristic type="FileOperation">
<characteristic type="\Windows\default.htm" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\_default.htm" translation="install"/>
</characteristic>
</characteristic>
</characteristic> -->
<!--Delete Favorite-->
<characteristic type="Registry">
<nocharacteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\MSN Mobile" />
<nocharacteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\Pocket PC Web Guide" />
</characteristic>
<!--Add Favorite-->
<characteristic type="Registry">
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\MEdia Net" translation="filesystem" >
<parm name="Order" datatype="integer" value="0" />
<parm name="ReadOnly" datatype="integer" value="1" />
<parm name="URL" datatype="string" value="http://home/" />
<parm name="Icon" datatype="string" value="\windows\MEdia_Net_Home_01.bmp" translation="filesystem" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\PocketPC" >
<parm name="URL" datatype="string" value="http://pocketpc.com"/>
<parm name="Order" datatype="integer" value="1" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\AT&T Support - Pocket PC">
<parm name="URL" datatype="string" value="http://www.cingular.com/customer_service"/>
<parm name="Order" datatype="integer" value="2" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\My Windows Mobile">
<parm name="URL" datatype="string" value="http://www.mywindowsmobile.com/"/>
<parm name="Order" datatype="integer" value="3" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\WindowsMedia.com">
<parm name="URL" datatype="string" value="http://windowsmedia.com"/>
<parm name="Order" datatype="integer" value="4"/>
</characteristic>
<!-- 4-3. Settings View & Zoom -->
<characteristic type="HKCU\Software\Microsoft\Internet Explorer\Main" translation="filesystem">
<parm name="ZoomSetting" datatype="integer" value="4" /> <!--zoom:medium-->
<parm name="MakeFit" datatype="integer" value="1" /> <!--view:default-->
</characteristic>
</characteristic>
<characteristic type="Registry">
<!-- 5-2. Show PIN2 Page -->
<characteristic type="HKLM\SOFTWARE\OEM\PhoneSetting" translation="filesystem">
<parm name="ShowPIN2Page" datatype="integer" value="1" />
<!-- Enable NITZ -->
<parm name="ShowNITZPage" datatype="integer" value="1" />
</characteristic>
<characteristic type="HKLM\Drivers\BuiltIn\RIL" translation="filesystem">
<parm name="NITZEnable" datatype="integer" value="1" />
<!-- Set SMS Service -->
<parm name="SMSService" datatype="integer" value="1" />
</characteristic>
<!-- SMS Settings -->
<characteristic type="HKLM\System\Inbox\Settings" translation="filesystem">
<parm name="SMStoSMTPShortCode" datatype="integer" value="121" />
<parm name="AllowSMStoSMTPConcatenation" datatype="integer" value="1" />
<parm name="AllowSMStoSMTPAddress" datatype="integer" value="1" />
<parm name="CurServiceName" datatype="string" value="SMS" />
</characteristic>
<!--Operator name string and service provider name showing rule-->
<characteristic type="HKLM\SOFTWARE\OEM\PhoneSetting" translation="filesystem">
<parm name="ONSDisplayRule" datatype="integer" value="4" />
<parm name="EnableUsimEF" datatype="integer" value="1" />
<parm name="Enable3GLongNamePrefix" datatype="integer" value="0" />
</characteristic>
<!--Override the GSM Short String Rule-->
<characteristic type="HKLM\ControlPanel\Phone" translation="filesystem">
<parm name="ShortStringExclusionList" datatype="multiplestring" value="*0","*1","*2","*3","*4","*5","*6","*7","*8","*9","#0","#1","#2","#3","#4","#5","#6","#7","#8", "#9""/>
</characteristic>
<characteristic type="HKLM\Software\Microsoft\Diagnostics" translation="filesystem">
<parm name="ShowLogCode" datatype="integer" value="65535" />
<parm name="DiagCode" datatype="integer" value="65534" />
</characteristic>
<!-- WiFi QoS Settings -->
<characteristic type="HKLM\Comm\TNETWLN1\Parms" translation="filesystem">
<parm name="WME_Enable" datatype="integer" value="0" />
</characteristic>
<!-- 0: Disable QoS feature -->
<!-- 1: Enable QoS feature -->
<!-- Disable IPv6
<characteristic type="HKLM\Comm\AFD" translation="filesystem">
<parm name="Stacks" datatype="multiplestring" value="tcpstkirdastkbtd" />
</characteristic>
<nocharacteristic type="HKLM\Comm\Devices\TCPIP6" translation="filesystem"/>
-->
<!-- 1.3.03 4. Remove "Disable IPv6" settings in Generic UI, Line 199. -->
<!-- Set GSM/UMTS band. -->
<characteristic type="HKLM\SOFTWARE\OEM\UMTS\BandSelection" translation="filesystem">
<parm name="Band" datatype="integer" value="0" />
<!-- (0:AUTO, 1:Euro band, 2:US band, 3:Japan band) -->
</characteristic>
<!-- 1.3.06 1. Set both "Network type" & "GSM/UMTS band" to "AUTO". -->
<!-- Remove "Band" page of phone "Options". -->
<characteristic type="HKLM\SOFTWARE\OEM\PhoneSetting" translation="filesystem">
<parm name="ShowUMTSBandPage" datatype="integer" value="1" />
<!-- (1: show GSM/UMTS band page) -->
<!-- (0, none : hidden GSM/UMTS band page) -->
</characteristic>
<!-- 1.3.06 2. Remove "Band" page of phone "Options". -->
<!-- 1.3.03 3. Add the correct "USB to PC" related settings in Generic UI, Line 201. -->
<!-- Set USB to PC Unchecked -->
<characteristic type="HKLM\Drivers\USB\FunctionDrivers" translation="filesystem" >
<parm name="DefaultClientDriver" datatype="string" value="Serial_Class" translation="filesystem" />
</characteristic>
<!-- Wireless Modem default APN setting -->
<characteristic type="HKLM\SOFTWARE\OEM\WModem" translation="filesystem" >
<parm name="Preset GPRS APN" datatype="string" value="isp.cingular" translation="filesystem" />
</characteristic>
<!-- 1.3.03 5. Update the Wireless Modem default APN to "isp.cingular" -->
</characteristic>
</wap-provisioningdoc>
Then I renamed it to "_setup.xml" and excuted makecab _setup. xml PP_Generic_UI_Hermes_CWS.cab; a CAB was generated w/o an error message. I copied the CAB to my Storage Card via USB/Activesync 4.5; it failed to install w/ the "Installation ... was unsuccessful" message.
Then I found a signing util in this link (http://forum.xda-developers.com/showthread.php?t=250216&highlight=sign), ran it w/ only an error message saying it was signed but not time stamped. I tried install this "signed" CAB via the method above, with the same results.
Any thoughts? Anybody?
denali
Question: After you signed the cab did you still get a question "This cab is not signed by a trusted certificate ..... install YES / NO?"
From what I saw in that thread, you need to provision your device with the certificate first, because you are not signing with one that is built in.
Also, on first glance, I can't see anything problematic with the XML so I guess you have to do this the hard way: comment all but one of the settings and create a cab. If it installs ok, uncomment another setting and try again until you find out what causes the installation to fail.
As to your question, I've never gotten a message like that. I installed the test certificate and attempted to install the CAB again with the same results. FWIW, after I click on the CAB, it looks like it's inatalling, complete with the progress bar except that when the final message comes up, mine reads Installation of <foo> was unsuccesful", and not in its own error box either.
I'm not convinced it's a signing issue, rather it seems to be something internal to the CABs, like I'm missing a step or file. I will step through the code as you suggested.
Thanks again,
denali
Right methods, wrong tool(s)
I found my problem.
I was unaware WinXP came with makecab.exe, so I dowloaded the Cabinet SDK, which seems to have been developed for Win98 or so, and used that executable. Bottom line, I was using an old executable.
I've successfully made single-line changes to my registry via CAB & CPF files, and, with a little luck, will get the rest of these customizations knocked out.
Thanks for your help levenum!
denali
Your welcome.
Actually, you just taught me something too. I knew desktop windows used cab files for installation, but I did not know cabwiz / makecab for them were readily available.
I always used the utilities from Pocket PC and Smartphone SDKs for WM 5 or 2003 depending on the device I was creating the cab for.
I'm trying to cook my own rom with XML files being executed on the preconfig.txt file but i'm having some issues
a) copying a file from the Windows folder into the ringtone folder and making it the default ringtone.
b) change the regional settings to UK English,
this is my xml for these two bits
Code:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<!--Ringtone-->
<characteristic type="FileOperation">
<characteristic type="\Windows\Rings\bennyhill.wma" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\benny.wma" translation="install" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKCU\ControlPanel\Sounds">
<characteristic type="RingTone0">
<parm name="Sound" value="\Windows\Rings\bennyhill.wma" datatype="string" />
<parm name="Category" value="Ring" datatype="string" />
</characteristic>
</characteristic>
</characteristic>
<!--Region-->
<characteristic type="Locale">
<parm name="Locale" value="2057" />
</characteristic>
</wap-provisioningdoc>
c) remove the files which i'm having to install as cabs instead of OEM's ( for some reason the OEM doesnt work properly)
this is my delete files bit
Code:
<?xml version="1.0" encoding="utf-8"?>
<wap-provisioningdoc>
<!--deletefiles-->
<characteristic type="FileOperation">
<characteristic type="Windows\picsel.cab" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="FileOperation">
<characteristic type="Windows\PCMKeyboard09b.cab" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>
i must be doing something very wrong if none of these xml things work
im not too hot on this myself but shouldnt the second part be full path?
eg
\Windows\picsel.cab
Imp
i'll try that but the copy file bit doesnt work and that is using the \Windows\*** syntax
working sample body
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
</characteristic>
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
<characteristic type="PowerPoint Mobile.lnk" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\ppt.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
dan1967 said:
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
</characteristic>
<characteristic type="%CE11%\Office Mobile" translation="install">
<characteristic type="MakeDir" />
<characteristic type="PowerPoint Mobile.lnk" translation="install">
<characteristic type="Copy">
<parm name="Source" value="\Windows\ppt.lnk" translation="install" />
</characteristic>
</characteristic>
</characteristic>
Click to expand...
Click to collapse
ok, but it doesnt really help that much.
so does making a directory above make the following lines assume that its "copying" the file TO that folder as it doesnt seem to be specified anywhere.. as i'm not creating a folder i thought my syntax was correct.
your assuption should be correct I think. In all the XML's I saw that handled files Makedir existed in that form no matter what. I am no specialist but I saw and used a lot of XML's.
best of luck,
dan
there anyway of running the XML file on a device without going through the pain of recooking/flashing?
ie copying the xml to the phone and exectuting it somehow?
Look for AdvancedConfig or HTCustom and they load & execute XML files
Hello everyone,
first of all I'm sorry if this question was already ask, but I want to make some skin for my phone and I don't know how...
Is there any software or tutorial?
Don't blame me if there is a post about that, I have done a research but I haven't find anythings.
Thanks a lot to the XDA community for your work.
s.nyx
ps:sorry for my poor english i'm french.
Hi everyone,
My phone is a Xperia X1 with a Windows Mobile 6.5 Rom from X1iser (he does a great job, thanks a lot).
I have downloaded a WM 6.5 theme in a cab files and I am trying to understand how it's work, all I say below is not true maybe I'm wrong.
There are 6 files in :
- _setup.xml : it does the installation on the phone (copy, rename and paste the files below).
- UNK~1.000 : no information in the xml file.
- 00_SETUP.001 : after installing it becomes _setup.xml and there are some certificate information inside.
- DLLA~1.002 : after installing it becomes theme.dll but i have tried to open it whith Notepad but I can't understand it.
- WALLA~1.003 : after installing it becomes wall01.jpg and it's the wallpaper when the phone is close (no keyboard out).
- WALLB~1.004 : after installing it become wall02.jpg and it's the wallpaper when the phone is open (keyboard out).
Is there anyone to explain me how I can modify the dll file? Because I think it is the key to set up the theme.
I give you the xml code of the first _setup.xml if it can help, but i have rename the files and if the owner of the theme is not agree I will delete it ASAP.
Code:
<wap-provisioningdoc>
<characteristic type="Install">
<parm name="InstallPhase" value="install" />
<parm name="AppName" value="Theme" />
<parm name="InstallDir" value="\Windows" translation="install" />
<parm name="NumDirs" value="3" />
<parm name="NumFiles" value="4" />
<parm name="NumRegKeys" value="0" />
<parm name="NumRegVals" value="0" />
<parm name="NumShortcuts" value="0" />
</characteristic>
<characteristic type="FileOperation">
<characteristic type="%CE2%" translation="install">
<characteristic type="MakeDir" />
<characteristic type="_setup.xml" translation="install">
<characteristic type="Extract">
<parm name="Source" value="00_SETUP.001" />
<parm name="WarnIfSkip" />
</characteristic>
</characteristic>
<characteristic type="theme.dll" translation="install">
<characteristic type="Extract">
<parm name="Source" value="DLLA~1.002" />
<parm name="WarnIfSkip" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="%CE5%" translation="install">
<characteristic type="MakeDir" />
<characteristic type="wall01.jpg" translation="install">
<characteristic type="Extract">
<parm name="Source" value="WALLA_~1.003" />
<parm name="WarnIfSkip" />
</characteristic>
</characteristic>
</characteristic>
<characteristic type="%InstallDir%" translation="install">
<characteristic type="MakeDir" />
<characteristic type="wall02.jpg" translation="install">
<characteristic type="Extract">
<parm name="Source" value="WALLB.004" />
<parm name="WarnIfSkip" />
</characteristic>
</characteristic>
</characteristic>
</characteristic>
<characteristic type="Registry" />
</wap-provisioningdoc>
Thanks
Hi,
I have created the following xml provisioning file:
<?xml version="1.0" encoding="utf-8" ?>
<wap-provisioningdoc>
<characteristic type="BrowserFavorite">
<characteristic type="Sickipedia">
<parm name="URL" value="!!link deleted" />
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKLM\Software\Google\GoogleMaps">
<parm name="TestValue" value="test" datatype="string" />
</characteristic>
</characteristic>
<characteristic type="UnInstall">
<characteristic type="\Program Files\GoogleMaps\GoogleMaps.exe">
<parm name="uninstall" value="1"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
(excust the formatting)
I have run makecab and it created the cpf.
I have run cabsigntool and it signs it.
I try to run it on the device and it runs silently.
But....
It has NO EFFECT.
Is therer a permissions problem to set in the registry?
Or is the XML wrong?
any help appreciated...
Typical, I post it up then I solve it.
I used makecab to make a cab not a cpf and it worked.
Hi,
I would like to create a software in order to save Emails account in a provxml file, and reload this provxml file after a hard reset for example.
Here is my code
Code:
string[] StorageList;
StorageList = GetStorageCardNames();
XmlDocument configDoc = new XmlDocument();
configDoc.LoadXml("<wap-provisioningdoc><characteristic-query type=\"EMAIL2\" recursive=\"true\"/></wap-provisioningdoc>");
XmlDocument output = ConfigurationManager.ProcessConfiguration(configDoc, true);
output.Save("\\" + StorageList[0].ToString().Trim() + "\\email.provxml");
MessageBox.Show("Your email config is complete, on \\" + StorageList[0].ToString().Trim() + "\\email.provxml", "Done");
Code:
Here is my provxml result :
<wap-provisioningdoc>
<characteristic type="EMAIL2" recursive="true">
<characteristic type="{88947265-7B57-7D04-F748-B52E49C52B09}">
<parm name="SERVICENAME" value="free.fr" />
<parm name="SERVICETYPE" value="POP3" />
<parm name="INSERVER" value="free.fr" />
<parm name="AUTHNAME" value="toto" />
<parm name="OUTSERVER" value="smtp.free.fr" />
<parm name="REPLYADDR" value="[email protected]" />
<parm name="SMTPALTAUTHNAME" value="Toto" />
<parm name="NAME" value="transfairre" />
<parm name="LINGER" value="0" />
<parm name="RETRIEVE" value="2048" />
<parm name="KEEPMAX" value="0" />
<parm name="DWNDAY" value="3" />
<parm name="FORMAT" value="2" />
<parm name="AUTHREQUIRED" value="0" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
I don't retrieve the AUTHSECRET field, who is the password field.
I would like to know if there is a solution in order to get the password, in order to have automatically a complete provxml configuration file.
Great thanks
regards,
Nixeus
Hi Nixeus
Can this help you http://forum.xda-developers.com/showthread.php?t=685979 or this http://forum.xda-developers.com/showthread.php?t=295889 or http://forum.xda-developers.com/showthread.php?t=681337 ?
This is the one I used in the last year http://forum.xda-developers.com/showpost.php?p=4631640&postcount=5
Hello my friend and thanks for your answer.
I have read your links but in all tha case, we nee to add manually the password on the provxml file.
Is there a way to retrieve it manually ?
I really don't know, I just use the last link to create a cab for my 2 mailboxes and it works without inputting anything.