Related
Hi everybody,
I'm on the way to learn ROM-cooking. On that long trip I reached another hurdle. I've successfully created packages and put them into the OEM folder of the kitchen. So far so good, ROM has been created successfully. But after I've flashed the ROM to the device I found out that the files are exists twice. For example I've created a package from iContact_0.8.cab. Here is a part of the initflashfile.txt:
...
root:-Directory("Programme")
Directory("\Programme"):-Directory("iContact")
Directory("\Programme\iContact"):-File("default.png","\Windows\default.png")
Directory("\Programme\iContact"):-File("default.skn","\Windows\default.skn")
Directory("\Programme\iContact"):-File("english.lng","\Windows\iCenglish.lng")
Directory("\Programme\iContact"):-File("german.lng","\Windows\iCgerman.lng")
Directory("\Programme\iContact"):-File("iContact.exe","\Windows\iContact.exe")
Directory("\Programme\iContact"):-File("iphone.png","\Windows\iphone.png")
Directory("\Programme\iContact"):-File("iphone.skn","\Windows\iphone.skn")
Directory("\Programme\iContact"):-File("Settings.exe","\Windows\Settings.exe")
...
After flashing the ROM to the device I have file english.lng in folder \Programme\iContact and I also have file iCenglish.lng in folder \Windows, I have file iContact.exe in \Programme\iContact and I also have iContact.exe in \Windows. I thought an entry like Directory("\Programme\iContact"):-File("iContact.exe","\Windows\iContact.exe") means move file from \Windows to \Programme\iContact.
I found out that I have the same problem with a lot of other packages I've created with package-creator 2.7.
What am I doing wrong?
Tom
initflashfile.txt can not move a file it just creates a copy or a shortcut to the file.
If you want to move a file you must use a xml file.
NikMel said:
initflashfile.txt can not move a file it just creates a copy or a shortcut to the file.
If you want to move a file you must use a xml file.
Click to expand...
Click to collapse
@NikMel thank you for that hint. Is that part of provxml files or option.xml? Can you provide an example, please? And sorry that I'm so clueless.
Tom
Ok, I think it is the mxi_<package>_*.provxml what should be created to do this, is that right? Assuming that it is I've created such a file for my package and tried to use it instead of flashfiles.txt. But it seems that the file will not be executed while the ROM has been flashed to the device. Who or what is responsible to execute all the *provxml on the device? Are all *provxml files executed automatically? I found hints that mxip_ and mxipcold_ means that the files are executed during reflashing respect. cold-restarting the device while mxipupdate_ means executing each time the package has been updated.
I have to learn so much ....
Thanks for any help.
Tom
Hi everybody,
ok, it's the mxi_<package>_*.provxml what should doing the stuff. But it seems that it is not executed after flashing the ROM to the device.
I searched a lot of threads in the forum (for example this one: http://forum.xda-developers.com/showthread.php?t=398025&page=2). It seems that many other guys have the same problem but I couldn't find a solution.
In the meantime I'm totally confused about UC, Autorun, Autoshortcut etc. etc.. It would be very nice if someone could get me going on. What should be done to get this damned *provxml working??
Tom
Ok,
during further tests I found out that the mxip_<package>_*.provxml is being executed if it only contains Registry entries and/or MakeDir FileOperations. If I add a simple copy how it is done in for example this file: mxip_HtcApps_HTC_Ringtone.provxml the mxip-File is not been executed for whatever reason.
Is there somebody who knows what the reason for this behavior is? In the MS documentation I read something about access rights which could be restricted by OEM manufacturers. Could it be that the problem is caused by missing rights? And if yes, how change it?
Tom
Hi,
mxip_*provxml files are executed during flashing. Ok, that's a fact and it is working for me now. I found out that I only can use <characteristic type="Copy"> within the provxml. Once I used <characteristic type="Move"> the provxml will not be executed due to an error.
In fact all files from OEM packages goes into \windows and if someone uses a mxip_*provxml to implement those package for example in \Programme the files are duplicated. It seems not to be possible to remove the source files from \windows.
I did a test with rapiconfig.exe /p mxip_iContact08_100.provxml. If the provxml contains <characteristic type="Move"> I got an error message Config failed (0x80070005): Zugriff verweigert. After changing the provxml and replacing all "Move" with "Copy" the command works as expected.
Then I tried to delete a source file from the windows folder with TotalCommander running on the device. But it is not possible to delete the file.
Is there a way to delete the source files from the windows folder? Is it possible to put the source files from packages in an other folder than \windows?
Thanks for any advice.
Tom
Hi there,
Just want to tell you that i'm following this thread with great interest, as I also want to learn about cooking rom's, when I have some spare time.
So, please keep posting your updates on this matter.
@ all rom kookers and devellopers~
please share what you know, isn't that the spirit of Xda forum? It's the only way to get further, the more people thinking means more and faster advances been made.
Cheers
tomduke99 said:
Is there a way to delete the source files from the windows folder?
Click to expand...
Click to collapse
This is not possible becaue the files are part of the ROM I think. This has to be done before the ROM is created. But I'm not sure whether this is possible I don't think so, this would require the kitchen to do all the stuff with the mxip*provxml.
tomduke99 said:
Is it possible to put the source files from packages in an other folder than \windows?
Click to expand...
Click to collapse
All files from the kitchen stored in \windows. Does the kitchen knows something about the structure of the filesystem? Shouldn't this be provided by the package tool resp. by BuildOS? Or am I being completely off track?
Thanks for any advice.
Tom[/QUOTE]
I think the best workaround for this problem is to use the automated WM customization.
Cook your ROM with only the stuff you want to leave in the Windows folder. Check all initflashfiles.dat and *.provxml files, and remove them from the ROM! Leave only one initflashfiles.dat file, that will create the permanent folders (PermDir directive) and copy the checkautorun.lnk to the startup folder. This shortcut, in theory, is the only duplicate you will have in your whole ROM.
Then build a CAB file to install all files you need outside the windows folder.
Build an ExtROM with this cab file, a config.txt file and the autorun.exe file (see tutorials around the forums on creating an extrom).
Build your nbh file with os.nb and extrom.nb, and flash!
If all goes well, you will see the rom booting, then starting customization, then resetting, and when the phone comes back, you will have a nice, clean, duplicate-free ROM.
I didn´t try any of it, it´s just a theory.
Hope it helps.
Eduardo
Try the following:
<characteristic type="FileOperation">
<characteristic type="yourfile.foo">
<characteristic type="Move">
<parm name="Source" value="\Windows\yourfile.foo" translation="install"/>
<parm name="RemoveAttributes" value="R" />
<parm name="RemoveAttributes" value="S" />
</characteristic>
</characteristic>
</characteristic>
I am working on my new Raphael kitchen and having a small problem. I have two options. One for my custom icons that get placed in the program folder or sub folders from there. The other is for the default icons.
First thing I want to do with the XML coding that will be in a cab is to delete some shortcuts when the cab is run.
Is this the correct setup for deleting files
Code:
<characteristic type="FileOperation">
<characteristic type="\Path\to\Target File.ext" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
The other setup would be to move files. Would anyone be kind enough if you know how, to show me how to move files with XML coding?
Thanks. I would search around but spent countless hours working on the kitchen and just looking to see if someone was willing to lend a hand.
I know how to create CABs and all that...just looking for some help with the XML coding.
Thanks in advance!
hi guys,
having issues with a 6.5 kitchen...
image files arent being associated with any program...
does anyone know how i can revert to the default HTC pimg.exe (image viewer) or even HTC album
this will be for .jpg / jpeg / .bmp / .gif files
if someone can help me with cooking this into my rom it'll be muchly appreciated
cant believe no one is willing to help
ryousuke said:
cant believe no one is willing to help
Click to expand...
Click to collapse
try this here
thanks for the reply but i'm hoping to do this via registration @ OS install rather than through software post wm6.5 setups...
any one else able to create a reg to implement it?
i can not belive
nobody willing to help you
you can fix it yourself !!!
if you just used the "search button"
for bug correcting
1. correct the bug
2. open an reg editor
3. save the key that you need as name.reg
4. add it to your kitchen
also you can add metadata folder to sys
REGEDIT4
[HKEY_CLASSES_ROOT\jpegfile]
@="JPEG Image"
[HKEY_CLASSES_ROOT\jpegfile\DefaultIcon]
@="\windows\HTCAlbum.exe,-300"
[HKEY_CLASSES_ROOT\jpegfile\Shell]
[HKEY_CLASSES_ROOT\jpegfile\Shell\Open]
[HKEY_CLASSES_ROOT\jpegfile\Shell\Open\Command]
@="\windows\HTCAlbum.exe "%1""
this is the patch for you
fo the same for all picture extensions
or you can just edit
Album_3_2_19193429_0\files\mxipupdate_MASD_zzzHTCAlbum_RegKey.provxml
<characteristic type="HKCR\jpegimage\DefaultIcon" translation="filesystem">
<parm name="" datatype="string" value="HTCAlbum.exe,-300" translation="filesystem"/>
</characteristic>
to
<characteristic type="HKCR\3gpfile\DefaultIcon" translation="filesystem">
<parm name="" datatype="string" value="HTCAlbum.exe,-300" translation="filesystem"/>
</characteristic>
all this with just an simple search
i did search here and in google all wkend...
tried first method with the reg editing still not working...
will try the 2nd method tomorrow when i have some time...
htc album often has a provxml that fixes the file associations for album. find the packages from mega and edit the provxml to be pimg instead of album. provxml gets installed at first boot without the need for auto run. that would be the sure way to fix your problem.
i'll check the provxml file when i get home (will comment the fields out)
thing even if i dont install HTC album the files arent associated...
and i recall the provxml file already 'trying' to add associate to htc (obviously not working) as when i added it to enrivus kitchen the software works but as mentioned above no link in file explorer / titanium pictures.
thanks for the help
Hello,
I've got some windows mobile 5 handhelds that I'm running in kiosk mode. One of the applications that can be run from the kiosk has the ability to access Internet Explorer. I want to be able to disable internet explorer so even when the user tries to access this feature, IE will not pop-up.
From what I've seen while searching on google, there is no direct way to remove PIE or even disable it. I've searched ways to black list programs and found this link here: http://www.satter.org/2007/03/lets_shell_some.html. This seems like it would work. It's a registry fix but I can't seem to get the .CPF file to update the configuration on the handheld. The error I get is 'your device settings cannot be changed by Test.cpf'. I assume I need to sign the .CPF file but I am unsure how to do this exactly...
Any thoughts if this will work or other methods???
Thanks!
Zac
Ok so after looking into this further I learned the certificates in the WM5 and 6 SDK folders are outdated. I downloaded newer certificates and installled the updated certs.sdk to the handheld but the cpf file still will not work. The error now is: 'The program or setting could not be installed because it is not digitally signed with a trusted certificate.' The updated certs I got are all trusted (I think). The cert I am using is SDKSamplePrivDeveloper.pfx.
Nevermind, got it to work. I didn't need to do any signing at all, just needed to remove some not needed XML in my _setup.xml file.
For what it's worth, here's the XML to blacklist an application (in this case PIE):
Code:
<?xml version="1.0" encoding="utf-8" ?>
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Security\Policies\Shell">
<parm name="DisallowRun" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun">
<parm name="1" value="iexplore.exe" datatype="string" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
Well done, solved your problem yourself, and in the mean time a new guide generated for people who wanted to do this.
Thansk
madnish30.
hi,
thanks for this tweak very interesting but i'm on WM 6.5.5 Titanium Energy Rom and there is no _setup.xml, can not find it so can not do this tweak or i missed something , could you help, be more explicit...
Second question, is there a possibility to know exactly witch applications, process are launch when windows start?
Thanks
V.
MakeCab Tutorial
voyd said:
hi,
thanks for this tweak very interesting but i'm on WM 6.5.5 Titanium Energy Rom and there is no _setup.xml, can not find it so can not do this tweak or i missed something , could you help, be more explicit...
Second question, is there a possibility to know exactly witch applications, process are launch when windows start?
Thanks
V.
Click to expand...
Click to collapse
Hello,
You create an XML file on your PC called _setup.xml and use makecab.exe that comes with the WM5/6 SDK from the command line to create a CAB file.
But, to make life simpler, I've attached this zip file which has makecab.exe, my _setup.xml, and also a task manager program you can run on WM that I've downloaded (it has a registry editor built into it too, which is convenient ).
To use:
1) Make any changes you need to _setup.xml
2) Run makecab.exe from the command line with this syntax: "makecab _setup.xml <'filename'.cab>"
3) Install this on the handheld, reboot device, run the program you've blacklisted and enjoy the access denied pop up!
Blacklist _setup.xml:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\Security\Policies\Shell">
<parm name="DisallowRun" value="1" datatype="integer" />
</characteristic>
<characteristic type="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun">
<parm name="1" value="iexplore.exe" datatype="string" /> <!-- change 'value' to whatever program you want blacklisted -->
<!-- <parm name="2" value="ANOTHER_PROGRAM.exe" datatype="string" /> -->
<!-- <parm name="3" value="YET_ANOTHER_PROGRAM.exe" datatype="string" /> -->
</characteristic>
</characteristic>
</wap-provisioningdoc>
Disable Backlist _setup.xml:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<wap-provisioningdoc>
<characteristic type="Registry">
<!-- Disable DisallowRun -->
<characteristic type="HKLM\Security\Policies\Shell">
<parm name="DisallowRun" value="0" datatype="integer" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
To answer your second question, most startup programs will be listed under the /Windows/StartUp folder.
Hope this helps!
madnish30 said:
Well done, solved your problem yourself, and in the mean time a new guide generated for people who wanted to do this.
Thansk
madnish30.
Click to expand...
Click to collapse
Thank you! Glad to help out!
another alternative
Hello people,
Here's another alternative which does not involve making cab files / fiddling with the registry (not all devices support this, since they are ROM_hardcoded);
WM5/6 command DONOTHiNG.EXE copy to device make shortcut link to Program Files
http://www.stephan-brenner.com/?p=190
Rename iexplore.exe to *.bak
Copy donothing.exe to \Windows\
Rename donothing.exe to iexplore.exe
done
Of course there are 101 other wonderfull 'solutions' to think of using donothing.exe
ThanX a ton for these wonder full wapprovisioning xml
FYC:
WinCE CAB Analyzer (MSCEInf): .CAB extraction
ExtenDir CABS .CAB creation (PgDn a bit) (optionally ExtenDir should be switched off if you're not using it!! )
Converting packages or your favorite tweaks to a setup cab was never so easy!
o/~
Senax said:
Hello people,
Here's another alternative which does not involve making cab files / fiddling with the registry (not all devices support this, since they are ROM_hardcoded);
WM5/6 command DONOTHiNG.EXE copy to device make shortcut link to Program Files
http://www.stephan-brenner.com/?p=190
Rename iexplore.exe to *.bak
Copy donothing.exe to \Windows\
Rename donothing.exe to iexplore.exe
done
Of course there are 101 other wonderfull 'solutions' to think of using donothing.exe
Click to expand...
Click to collapse
This method does work, the only concern I had with this was what if an administrator needs to get have access to that program that is overwritten? In my case if I overwrote iexpore.exe then I'd have no way of accessing the internet or downloading any vital programs (unless they were already installed before hand). My device had no way to USB connect and bluetooth file transferring was becoming a pain to get to work so that's why I used the CAB method downloading them first through PIE from a virtual directory then disabling PIE.
But hey, if you're sure you won't need PIE or any other program you want disable this method works great!
Thanks!
Or Batch iT
Why not make a batch file? Use a standard ASCII editor like Notepad.exe and copy + paste the following code (assuming running from C drive). Make sure Word-Wrap = OFF (always while editing (source))!
Code:
@ECHO OFF
@REM renaming of blacklisted application(s) back to original so one can operate executables as expected
C:
CD\
CD Windows\System32\
@REM Remember the short 8.3 filename (stick to that within batch files).
REN YourExecutable.exe donothin.exe
@REM Assuming you renamed original *.exe to *.e_e
REN YourExecutable.e_e Depends.exe
@REM Need to switch drives/partition? Just type its letter D: [ENTER] CD\ [so windows its current PATH is the root of the current drive].
:END
EXiT
Online DOS_Batch handbook
Senax said:
Why not make a batch file? Use a standard ASCII editor like Notepad.exe and copy + paste the following code (assuming running from C drive). Make sure Word-Wrap = OFF (always while editing (source))!
Code:
@ECHO OFF
@REM renaming of blacklisted application(s) back to original so one can operate executables as expected
C:
CD\
CD Windows\System32\
@REM Remember the short 8.3 filename (stick to that within batch files).
REN YourExecutable.exe donothin.exe
@REM Assuming you renamed original *.exe to *.e_e
REN YourExecutable.e_e Depends.exe
@REM Need to switch drives/partition? Just type its letter D: [ENTER] CD\ [so windows its current PATH is the root of the current drive].
:END
EXiT
Online DOS_Batch handbook
Click to expand...
Click to collapse
Nice! Very simple to use!
Hi,
I try to delete *_manila files via provXML but that fails with error 0x80070005.
Here you can see what I do foreach file
Code:
<characteristic type="\Windows\00061bfb_manila" translation="install">
<characteristic type="Delete">
<parm name="RemoveAttributes" value="R" />
<parm name="RemoveAttributes" value="S" />
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\Windows\000bbc87_manila" translation="install">
<characteristic type="Delete">
<parm name="RemoveAttributes" value="R" />
<parm name="RemoveAttributes" value="S" />
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
Please help!
MadMatt
Are you trying to delete a rom file? It doesn't work. Just remove the file from your kitchen.
Farmer Ted said:
Are you trying to delete a rom file? It doesn't work. Just remove the file from your kitchen.
Click to expand...
Click to collapse
Yes, I want to delete it, but only afther it's copied to \Extendir\Manila Search for extendir and you'll know what I want to do. But indeed, I fear that it are ROM files... Is there another way to get them there in first boot?
That's why it's a rom file. There's no deleting them. If you could delete rom files, you could totally eff up your device rather easily. The way I move batch groups of files is with zip files. You can load dozens or hundreds of files into a zip file (which is a single, compressed rom file) and have them quickly copied to other locations using a mortscript. It's much faster than a cab install, and doesn't load any of the uninstall crap into the file system/registry/databases. There's really no point in copying one file at a time into the \Extendir directory, as you'll be defeating the purpose of using Extendir, so if you want to use extendir, you'll either have to move the files there with a mortscript/unzip or with a cab file, or just copy them from your sd card to the extendir directory. In the latter case, you could probably just put them in the extendir folder on your sd card and not even worry about it.
Here's an example of an unzipping mortscript:
UnZipALL("\Windows\Bing.zip","\Windows\")
Click to expand...
Click to collapse
I have a zip-folder with all the Bing sub-folders in it (\audio and \xaml). The script unzips the files into windows, where the rest of the Bing files and modules are located. In total, 104 files are stored in the zip folder, so I've basically been able to replace 104 rom files that would need to be copied to another directory with 2, which lowers the rom file count by a lot. If you put all your manila files in zip folder, and then unzip it to \extendir\manila, you'll save on the rom file count, which is basically the entire point of using extendir. The unzipping only works if the directory has already been created and also if there are no over-writes required. You could also make the directories by adding these commands to the beginning of the script:
MkDir("\Extendir\")
MkDir("\Extendir\Manila\")
Click to expand...
Click to collapse
Okay, I gave this a try, but extracting using a MortScript doesn't work... Or do I need some packages to be able to run a Mscr file?
This is what I have in my Config_AP.txt file
Code:
CFG: \WINDOWS\config_end.txt
CFG: \WINDOWS\Madmatt.txt
And in my Madmatt.txt (that will contain all customization made by me):
Code:
EXEC: \Windows\ManilaExtendir.mscr
But thats not working with this in my ManilaExtendir.mscr file:
Code:
MkDir("\Extendir\")
MkDir("\Extendir\Manila\")
UnZipALL("\Windows\Manila_CFC.zip","\Extendir\")
And another question (maybe I should ask this in Extendir thread): How can I cook the Extendir.dll in my XIP? Because when I use the BuildXIP_Of_MSXIPkernel tool (provided by Alexx~) that crashes. I guess that happens because it's a dll and not S000, S001 and so on. But how can I convert?
Thanks for the help you already provided to me! Hope you can help me out with this!
You've got mortscript cooked in, right? Assuming that you do, just test out the unzipping script on your device, and make sure it works before you cook and flash. Put the zip file in \windows and run the script. It may help to delete the directories first, too. And if you're doing a lot of morscript stuff during customization, you could just dump autorun and config.txt's altogether. I did it a while ago, and am really glad that I did. First boot is much faster without autorun. I just have a shortcut called custom.lnk that I have copied into the startup folder with initflashfiles.dat. It points to a mortscript (custom.mscr) that has a queue of unzips in it that does all of my customization; at the end, it deletes the custom.lnk from startup so it doesn't run every time I reset the device. I also import an xml; I don't use cabs, so don't have to deal with them. This is what it looks like (off-topic, but what the hell):
Code:
WriteFile("\Windows\Active sync xml.lnk","1#\Windows\dF_TaskMgr.exe /provxml \WINDOWS\zzz-Active Sync.xml")
#runwait("\WINDOWS\UnzipFpseCE.mscr")
runwait("\WINDOWS\Unzipmotweet.mscr")
runwait("\WINDOWS\UnzipRescoAudio.mscr")
runwait("\WINDOWS\UnzipResco.mscr")
runwait("\WINDOWS\UnzipRescoPhoto.mscr")
runwait("\WINDOWS\UnzipRescoRadio.mscr")
runwait("\WINDOWS\UnzipSchema.mscr")
runwait("\WINDOWS\UnzipUCWEB.mscr")
runwait("\WINDOWS\StartMenu.mscr")
runwait("\WINDOWS\UnzipTemplates.mscr")
runwait("\WINDOWS\Unzip1.mscr")
runwait("\WINDOWS\UnzipBing.mscr")
runwait("\WINDOWS\Restore.mscr")
runwait("\WINDOWS\cleanup.mscr")
run("\Windows\Refresh.lnk")
run("\Windows\Active sync xml.lnk")
SetFileAttribs("\Windows\Active sync xml.lnk","system",FALSE)
delete("\Windows\Active sync xml.lnk")
SetFileAttribs("\Windows\StartUp\Custom.lnk","system",FALSE)
SetFileAttribs("\Windows\StartUp\Custom.lnk","readonly",FALSE)
delete("\Windows\StartUp\Custom.lnk")
run("\WINDOWS\AEBPlus.exe")
run("\WINDOWS\RKbdInit.exe")
run("\Windows\skbackup.lnk")
I'm not sure what to tell you about building the XIP; I was using EVK when I played around with extendir, and it rebuilt it w/o problem.
Thanks! And how can I check if I have MortScript installed? What packages do I need to cook in?
If you have to ask, it's not installed, lol. It's not native winmo software. Here's a package; I changed the default icon because I find it annoying. The package is in oem format; you can either convert it to an EXT or probably put it in your OEM directory.
Farmer Ted said:
If you have to ask, it's not installed, lol. It's not native winmo software. Here's a package; I changed the default icon because I find it annoying. The package is in oem format; you can either convert it to an EXT or probably put it in your OEM directory.
Click to expand...
Click to collapse
Thanks! I'll take a look for what I can use MortScript too! I like it! The only thing that doesn't work is Extendir now... But I'll post that in the Extendir thread. This one can be closed. Thanks Farmer Ted.
Ok, I'll close it. The 0-commands.txt file in the package is a quick list of mortscript commands. I put a 0 on it so that it pops up to the top of the\windows folder and is easy to access. You can delete it if you don't want it. There's also a much more thorought manual in pdf form out there, if you search for it.