SDConfigGen - a tool for automatically creating SDAutorun configurations - Windows Mobile Development and Hacking General

First off, I'd like to thank Sleuth255 for SDAutoRun, and to mousio for his AutoRun tool which provided the inspiration for this project.
SDConfigGen is a command line tool for the PC which inspects a collection of files to be installed, then produces an SDConfig.txt and other associated scripts and provisioning files to allow SDAutoRun to automatically install them.
It differs from mousio's solution in that rather than having SDAutoRun call a MortScript to do all the work, this tool creates an SDConfig.txt to do the majority, only calling scripts for specific functionality when required. Scripts (and therefore MortScript) may not even be required, if nothing being installed needs automation.
Installation
Unzipping the contents of the archive will produce this folder structure:
\
Storage Card\SDConfig\Cabs\
Files\
Scripts\
Settings\
Sys\​First things first - to use any of the script-based functionality a copy of the MortScript installation cab file must be placed within the Sys folder. Download MortScript-4.11b7.zip (or newer version) from http://www.sto-helit.de, then extract \cab\MortScript-4.11b7-PPC.cab from it.
Usage
If the name of the Storage Card will be different on your target device, then rename that folder to whatever it will be. Otherwise, just leave it as it is.
Within the sub-folders of SDConfig, add the files you want to be installed.
Cabs:
Any .cab files in this folder will be installed. If the installation of a .cab file requires user interaction (to confirm a license window, for example), then create a .mscr script file of the same name containing instructions to be executed while the cab file is being installed.
For example, if you need to install a cab file: "eWallet-PocketPC-Install.cab",
create a file called "eWallet-PocketPC-Install.mscr" too. This file contains
MortScript to be run while the cab installer is being run, for example:
Code:
windowTitle = "Software License Agreement"
WaitFor(windowTitle, 60)
SendLeftSoft(windowTitle)
Note that you don't need to worry about actually installing the cab, or waiting for installation to finish - just write the automation code itself.
The SDAutoRun UI will be hidden while an interactive cab is being installed like this, and a MortScript status window shown instead. The device will be responsive to user input, so if any non-automatable interaction is required, that can be done manually.
Files:
After the cab files have been installed, all files in this folder will be copied directly to the root folder. To copy files to sub-folders, place them in sub-folders of this folder. For example, to copy files to the Windows folder, create a Windows folder here and place the files within it.
Standard (English) folder names will automatically be replaced by variables, so files in the "Files\Program Files" folder here will be copied to %CE1% folder by SDAutoRun.
The file copy operation is actually performed by generating a CopyFiles.xml provisioning file in the Sys folder, and it is this that goes in the SDConfig.txt file. This method was chosen as it avoids the path length limit of copying directly in SDConfig.txt, and allows for the %CEn% variable subsitution scheme.
Settings:
After the files have been copied, any settings in this folder will be applied. Settings may either be .xml provisioning files (which are added directly to SDConfig.txt), or registry data in .reg, .rgu or .cereg files. Registry data files will be automatically converted to xml provisioning files within the Sys folder, which are then added to SDConfig.txt.
Scripts:
After the settings have been applied, any .mscr scripts within this folder will be executed. SDConfigGen will generate instructions in SDConfig.txt to automatically handle copying them to the \Temp folder and renaming them to replace spaces by underscores before execution if required.
Note that the device will not be interactive at this point, so don't write scripts that require user interaction.
Sys:
Apart from placing a copy of MortScript-4.11b7-PPC.cab in here, you shouldn't touch the contents of this folder; they will be automatically cleaned out and generated by the SDConfigGen tool.
Notes
I've provided RegToXml as a standalone .exe file so that registry data files can be manually converted to .xml provisioning files, if required. This is not generally necessary, though, as it will occur automatically as part of the SDConfigGen process.
Due to limitations of SDAutoRun, during installation some files need to be copied to the \Temp folder on the device before execution. A TempCleanup.xml provisioning file is generated in the Sys folder by SDConfigGen which is the last thing executed by SDConfig.txt. It should remove any temporary files that were placed in the \Temp folder, but will not remove the folder itself, or any other files within it.
SDAutoRun also requires that SDConfig.txt be ASCII, which means that if any files contain characters outside that range (such as accented characters), they can not be directly referenced. SDConfigGen will automatically detect this, and generate provisioning XML files to transparently rename the files before processing them, then back again afterwards.
The last statement in the SDConfig.txt is the RST: Reset statment, to reset the device.
The only part of the file structure that can be changed is the name of the "Storage Card" folder - the other folders cannot be renamed or moved. By default, when the SDConfigGen tool is run, it works with the first sub folder under the folder the .exe file is placed. To override this behaviour, pass the folder path to SDConfigGen.exe as a command line argument.
Cabs, settings and scripts are executed in alphabetical order, grouped by subfolder. Subfolders will be executed first, so for example the contents of Cabs\Prerequisites\ would be installed before the files directly in Cabs\ (but after files in Cabs\A\). All interactive cabs are executed first, followed by non-interactive ones.
All generated files (except SDConfig.txt) are in Unicode UTF-16 encoding.
To have SDConfigGen create a log file of the generation process, use the SDConfigGenWithLog.bat file included in the archive. It will create a results.log file containing the messages that would normally be output to the console.
This is still an early version, so there will probably be bugs with it. I've used it successfully for setting up my own device several times now, but I can't make any guarantees. Please do post any bug reports or suggestions here though!
Alex
Updates
0.6:
All output files are now in UTF-16 encoding, with the exception of SDConfig.txt, which is in ASCII.
If files referenced by SDConfig.txt have names containing non-ASCII characters, provisioning files to automatically rename them before they are accessed, and to restore them afterwards will be generated.
Subfolders are now supported in the Cabs, Settings and Scripts folders. Files within subfolders will be processed first, in alphabetical order of subfolder name.
File folder variable substition made case insensitive
Added SDConfigGenWithLog.bat file for easy logging of output to a log file
0.5.1:
Removed .svn files from the file structure (oops!)
0.5:
Made warning message on skipping registry files less confusing
RegToXml: Now supports empty values for String, MultiString and Binary values
RegToXml: Made ,ore robust to invalid data - if a value contains invalid data, only that value is skipped.
RegToXml: The line number is now reported with any error or warning message.
RegToXml: Whitespace allowed to surround the = in value lines.
0.4:
RegToXml: Fixed nesting bug with registry key deletion conversion
RegToXml: Now supports comments (lines starting with ; )
0.3:
RegToXml now assumes that registry files without Unicode BOM's are encoded in the system default ANSI codepage, rather than UTF-8 (this means that if your registry file is UTF-8, it must contain a Byte Order Mark to be read correctly)
0.2:
Files are now installed in alphabetical order by file name (within their own group). For example, first interactive cabs A-Z, then non-interactive cabs A-Z. This allows control over installing cabs that require others to be installed before or after them.
.NET Framework (required)

Lookin Mighty Fine Siuer.
Not in the Testing Time yet.
But does the scripts folder eventually combine the scripts into one?
(lazy Bum At Work, Not Able to test it)

No, the scripts in the scripts folder are not combined into a single script, they are all executed separately. Would there be some benefit to trying to combine them into a single script before execution?

AlexVallat said:
No, the scripts in the scripts folder are not combined into a single script, they are all executed separately. Would there be some benefit to trying to combine them into a single script before execution?
Click to expand...
Click to collapse
No, you are absolutely right there is now good reason for it.
It's better to have them seprated, makes finding **** Ups easier.
Don't know what i was thinking or why..

AlexVallat,
Thanks for your job, you soft is amazingly simple which is a great pro compared to SASHIMI for instance.
So yhis afternoon I started to put all my files in the appropriate folders and when I launch SDConfigGen with the folder path I don't get in the config.txt file \Storage Card\ before the files to execute but the path I gave as parameter. I think transforming the path given into \Storage Card\ could help.
One other point, as a poor French guy your RegToXml converter does not handle all the French extended character set such as é, à, ... Could you make it support this characters.
Anyway for now it is fully usable but requires SDConfig.txt file edition before launching the whole process. Tomorrow it will be hands-on time as I plan to upgrade my Polaris ROM so more news to come regarding SDCofingGen usage.
The_Steph

The_Steph said:
AlexVallat,
Thanks for your job, you soft is amazingly simple which is a great pro compared to SASHIMI for instance.
So yhis afternoon I started to put all my files in the appropriate folders and when I launch SDConfigGen with the folder path I don't get in the config.txt file \Storage Card\ before the files to execute but the path I gave as parameter. I think transforming the path given into \Storage Card\ could help.
One other point, as a poor French guy your RegToXml converter does not handle all the French extended character set such as é, à, ... Could you make it support this characters.
Anyway for now it is fully usable but requires SDConfig.txt file edition before launching the whole process. Tomorrow it will be hands-on time as I plan to upgrade my Polaris ROM so more news to come regarding SDCofingGen usage.
The_Steph
Click to expand...
Click to collapse
Hm my pall had the same thing but changing to Unicode seemed to solve his XML issue. NOt sure if this is the same but worth the try.

Great work alex!
Question:
Anyway to verify the syntax of the provisioning XML files?
Any tools out there that can create these files or verify them? I think a tool like this would be great.
NEVERMIND! I just saw your reply in the reg2xml converter thread! THANKS!

The_Steph: Thanks for your comments!
The idea with the path is that the name of the folder is used to control the name of the Storage Card on the device. So if you name your folder Storage Card, that's what goes in the SDConfig.txt. If, on your device, it has a different name (due to language changes, or whatever), then you need to rename the folder appropriately.
Thanks for the bug report about accented characters in RegToXml. I will fix that and post an updated version soon.
gtxaspec: I could verify that the files were valid XML, but the more useful check that they contain valid provisioning instructions is beyond the scope of this project. Not least because the documentation describing what are valid instructions is confusing and can be inaccurate. With anything other than the file and registry providers, it usually ends up being a case of trial and error. With the file and registry providers, using the auto-generation capabilities of SDConfigGen will avoid most surprises.
Alex

Version 0.3 released
I've just updated the first post to release version 0.3. This should address the accented characters issue raised by The_Steph, however it does mean that if your registry file is UTF-8 encoded, it must include Byte Order Marks to indicate this. Otherwise, it will be assumed to be encoded in the system default code page.
I've also added a feature that files are now installed in alphabetical order (within each group). If you need to make sure that certain cabs are installed before others, this can now be done by renaming them, usually by including a numeric prefix.
Alex

reg2xml bugs
Hi Alex,
Converting everything to xml and using standard provisioning is an interesting approach!
Only obviously reg2xml has got some problems still with .reg files containing certain characters:
I've attached you a sample file which is not converted correctly at three points, each with a different error cause.
- Comments (Lines beginning with ";") in the .reg files are sometimes (not in every case, could not see what the trigger is) leading to an aborted conversion.
- Some characters like the arrow character (ASCII 27/1BHex) are also a problem.
Maybe the attached file helps in finding the bug.
BTW: Do you also have a tool that is converting just the other way around: From XML to reg indstead of from reg to XML?
Sometimes I need to have a .reg file instead of an .XML. And importing the XML and then trying to find all registry entries to export it back to a .reg can be a very tedious thing when the imports are not all together in one registry branch.
Thanks!

Thanks for the bug report, asango. Yes, I forgot about comments, I'll fix that and release an update soon. I'm looking into what the best way to handle control characters like 0x1B is (which is 'Escape', according to the ASCII chart I'm looking at). Obviously crashing is not an acceptable behaviour, so I'll have some sort of fix for it.
I don't have a XmlToReg tool, but it sounds like a good idea - I'll probably write one over the weekend.
Alex

Great, looking forward to that, thank you!

Version 0.4 released
The first post has been updated to version 0.4. RegToXml has been updated to add support for comments in .reg files.
Unfortunately there appears to be no way to include control characters in an XML file. If the character itself, or even the character entity (like &#x1B, then the file is regarded as malformed and not accepted. I have therefore not been able to do anything to fix this (sorry asango!).
If anyone knows of a way that a provisioning file could be used to set a registry string value containing these characters, please let me know.
On a more positive note, the requested XmlToReg tool is up - I've given it its own thread here: XmlToReg.
Alex

Yes, the comments are now handled corectly, perfect!
Some other thing is still an issue:
test.reg: Converting...
test.reg: Conversion failed. (Unexpected value format: dword) Skipping.
In this case the output file is not generated at all, seems that not only the value is skipped but this causes the whole file not being written.
This leads to another suggestion: Would it be possible to indicate the line number where a problem happened?
This would make it much easier to find the problem.
And regarding the non handled escape characters:
This also leads to aborting. Would it also be possible to just skip them and issue a warning but go on with the conversion and with writing the outout file for the rest of the entries?

Now that is odd. "dword" is a perfectly valid value format, it shouldn't have produced that error. Any chance you could send me the .reg file that produced it?
Line numbers should be do-able, I'll add that to the next version.
The "skipping" message there referred to the "test.reg" at the start of the message, not to the dword value. I agree it looks misleading as it is currently worded though, I'll improve that.
About recovering from errors and skipping only invalid values rather than the whole file - this will be quite tricky. By the time I am notified of invalid characters by the XmlWriter, it has already given up in a sulk and can't be persuaded to continue writing any further. I'll need to do some sort of pre-vetting before passing data on to it. If I come up with any good ideas on how to do this, I'll include it in the next version.
Alex

asango, here's a candidate RegToXml.0.5.0 - could you check if it is still reporting the "Unexpected value format: dword" error with your file? It now reports line numbers, which might help track down the problem. It should also be able to recover from an invalid value and skip just that value, although I'm not sure how well that is working yet.
Alex

Hi Alex,
Great, the line numbers are making things much easier and this way I even found the reason for this error very easily:
Here's the point where it is failing:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RIL]
"NITZEnable"= dword:00000001
...with this error message:
test.reg: Converting...
[Line 194] Error: Invalid value (Unexpected value format: dword)
Skipping: HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RIL\NITZEnable
Done.
As soon as I'm deleting the blank between the "=" and "dword" everything is ok.
Maybe you can allow blanks after the "=" in general?
This would solve this issue definitely
And yes, by the way the xml file is now generated despite of this error, very good!
Asango

Hmm... I'm not sure whitespace is supposed to be allowed around the = sign. It doesn't make anything ambiguous though, so there's no good reason not to relax the matching. Try this 0.5.1 which allows whitespace around the = sign, hopefully that should now parse your file correctly.
Alex

Yes, now I can see no other issues with the RegToXml tool, good work!
Also the whole cold boot import is ok with one exception:
Only the CopyFiles.xml which is generated by the SDConfigGen.exe is not copying all the files from the "Files" diectory during its execution.
Tried to import that xml manually with the xml option of Taskmgr and also got an error, but since the error is *very* uninformative and not showing the line number and my CopyFiles.xml is rather big I could not find the problem.
Could it be that the reason for the error is that if a file is already existing or read only that this will stop the rest of the import?

asango said:
Yes, now I can see no other issues with the Only the CopyFiles.xml which is generated by the SDConfigGen.exe is not copying all the files from the "Files" diectory during its execution.
Tried to import that xml manually with the xml option of Taskmgr and also got an error, but since the error is *very* uninformative and not showing the line number and my CopyFiles.xml is rather big I could not find the problem.
Click to expand...
Click to collapse
Second hands-on day with SDConfigGen and I have the same issue with v0.4. CopyFiles.xml is not executed at all. Probably a syntax error issue as stated by asango (I've done the same tests as him).
The_Steph

Related

Automate Multiple CAB installation

Okay after a few hours of searching and fiddling I got this to work out...but it still needs improvement.
I followed some details from:
http://www.gpcarreon.com/?p=291
So basically you get this and install it:
http://nsis.sourceforge.net/Download
Then create a folder at root level (i.e. C:\MyInstall)
In that folder place the following files:
All the .cab files (which you obtain like locked extended ROM files)
All .ini files (which you create)
T-Mobile Customization.nsi (which you download from below)
In the Above mentioned nsi script I have allocated 20 spaces, however you can add/remove lines as needed. Don't forget to increment the following fields:
“FILE 1"
SecFile1
SectionIn 1
File 1.ini
File 1.CAB
StrCpy $0 “$INSTDIR\1.ini”
I didn't change it in my file, however if you want to change File 1 to another name make sure you're consistent so all reference to 1 would change to your file name. Capice?
Now for your cab files depending on how many lines/cabs you have your basic format for your cab file will look like this:
[CEAppManager]
Version = 1.0
Component = 1
[1]
Description = MT-MMS-WI19-051213-1 [MMS]
Uninstall = MT-MMS-WI19-051213-1 [MMS]
CabFiles = 1.cab
Where Component is the name from the "File 1" and the [1] matches the component name. Description and Uninstall as far as I can tell can be whatever you like. And CabFiles must be the cab files name, in this case 1.cab (which reflects in the nsi file)
The file name for the ini must also be the same as you specified. File1.ini
After you have done all this save your script, cabs, and inis in the folder at the root level. And then right click on the script and choose compile! If you successfully compiled the script you should see an option to "Test Installer" and you will also a new executable file generated.
Now for the problem part where I seek your assistance As I mentioned before I'm a rookie when it comes to this stuff so I haven't the slightest clue where I would begin. But if you do use this method it's quite annoying to have to pause every two seconds to wait for the device to prompt you where to install it and for you to acknowledge successful installation. So what I'm thinking is how do I make it "silent" meaning it automatically installs to the "Device" and does not say "successful installation press ok to continue..." I was thinking this would be done in the ini file for each of the cabs, however I do not know. Anyone else know what can be done in this matter.
Thanks in advance...hopefully this will help someone....

[APP] xcopyce - 0v04 [08 SEP 2008]

Hi
This app was created a few months ago and lived in the UC thread created by Sleuth255. I said if there was enough interest I would move the post to the it's own thread. I got to 0v03, so I started a new thread.
xcopyce v0-04
This is an application idea l3v5y came up with and somehow convinced me into writing .
Purpose
To copy folders as part of the UC process.
Requirements
* .Net CF 2.0
* UC (Of course).
Usage
*Download the Zip file and extract xcopyce.exe onto your the root of your storage card.
*Add the following lines to your UC File
Code:
CPY1:\Storage Card\xcopyce.exe
CPY2:\Temp\xcopyce.exe
EXEC:\Temp\xcopyce.exe
Replace folder paths where necessary, remeber that EXEC: does not support spaces (hence why I'm copying to \Temp).
Config
Create a file on the root of your storage card called xcopyce.txt - this is the config file.
*The format of the file is "source" "destination" attribs.
*Comments begin with a # symbol.
*By default destination files are created without attributes.
*File attributes are as follows (case insensitive):
Code:
r - read-only
a - archive
s - system
h - hidden
Example:
Code:
[COLOR="DarkGreen"]#Copy Temp from Storage Card to your Device[/COLOR]
"\Storage Card\Temp" \Temp
[COLOR="DarkGreen"]#Copy Folder making all files Read only in the Destination[/COLOR]
\Temp "\Temp2" r
[COLOR="DarkGreen"]#Copy Folder making all files Hidden and System in the Destination[/COLOR]
\Temp2 \Temp3 sh
[COLOR="DarkGreen"]#Copy Folder making all files System, hidden, read-only and archive in the Destination[/COLOR]
\Temp3 \Temp4 shra
Double Quotes can surround either the source or destination, but must surround paths with spaces in. This is the same as when using the xcopy command line. If in doubt surround both sides with quotes.
Logging
A log file is created on the root of your storage card called xcopyce.log. This file is over written every time you run.
Change Log
0v01
- Initial Development.
0v02
- No longer requires the storage card to be called "\Storage Card".
0v03
- Support for destination file attribute setting.
- Now over writes read-only files in the destination.
- Changes to log file structure.
- Handles blank lines in the config file.
0v04
- Bug fix: Line parser algorithm should handle work in all cases. (#10)
Credits
l3v5y for the idea.
Sleuth255 for his UC work in the first place.
nikagl for inspiring more updates.
Download
Here
MD5 Hash
Code:
9E08A46EC3E049FF71BFF476FE818BD4
Thanks
Dave
Thanks Dave! And now let's add some tags for the search engines which I had initially used to find this wonderful program, but did not (I only accidentaly stumbled accross it because you had the link in your sig!):
This tool is the perfect addition to Sashimi and/or UC / User Customization as it can be executed using a Command Line on any Windows Mobile (WM5 or WM6) device to copy files and overwrite read only files!
Regards,
Nika.
Me likey file attributes!
Now I'm going to have to flash a ROM to try it out!
One question though... Can this copy files as well as folders?
BTW, I added this to the UC post.
l3v5y said:
Me likey file attributes!
Now I'm going to have to flash a ROM to try it out!
One question though... Can this copy files as well as folders?
BTW, I added this to the UC post.
Click to expand...
Click to collapse
Thanks mate. At the moment just folders. I'll look at files for 0v04.
Ta
Dave
Hi Dave,
I guess for compatibility with UC you've created the current tool, where it uses a file to perform the copy tasks. Would it be possible to create a 100% command line method, like xcopy in Windows?
For instance here's the usage of xcopyce I'd love to see (straight from xcopy /? ):
XCOPYCE source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/i] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/u] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...]
source: Specifies the file(s) to copy.
destination: Specifies the location and/or name of new files.
/A = Copies only files with the archive attribute set, doesn't change the attribute.
/M = Copies only files with the archive attribute set, turns off the archive attribute.
/D:m-d-y = Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]... = Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
/P = Prompts you before creating each destination file.
/S = Copies directories and subdirectories except empty ones.
/E = Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/V = Verifies each new file.
/W = Prompts you to press a key before copying.
/C = Continues copying even if errors occur.
/I = If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q = Does not display file names while copying.
/F = Displays full source and destination file names while copying.
/L = Displays files that would be copied.
/G = Allows the copying of encrypted files to destination that does not support encryption.
/H = Copies hidden and system files also.
/R = Overwrites read-only files.
/T = Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
/U = Copies only files that already exist in destination.
/K = Copies attributes. Normal Xcopy will reset read-only attributes.
/N = Copies using the generated short names.
/O = Copies file ownership and ACL information.
/X = Copies file audit settings (implies /O).
/Y = Suppresses prompting to confirm you want to overwrite an existing destination file.
/Z = Copies networked files in restartable mode.
Regards,
Nika.
nikagl said:
Hi Dave,
I guess for compatibility with UC you've created the current tool, where it uses a file to perform the copy tasks. Would it be possible to create a 100% command line method, like xcopy in Windows?
For instance here's the usage of xcopyce I'd love to see (straight from xcopy /? ):
...snip...
Regards,
Nika.
Click to expand...
Click to collapse
If I ever get enough free time I might do...
Ta
Dave
It's working well!
But, I must disagree with
This is an application idea l3v5y came up with and somehow conned me into writing .
Click to expand...
Click to collapse
I did not "con" you into doing it. You chose to do it.
l3v5y said:
It's working well!
But, I must disagree with
I did not "con" you into doing it. You chose to do it.
Click to expand...
Click to collapse
Lighten up
DaveShaw said:
Just for the record I was not conned, hoodwinked, tricked or in any way forced against my will by l3v5y to create this program.
Click to expand...
Click to collapse
Hows that suit you ?
Only kidding, I'll expand the word conned into convinced.
Ta
Dave
Thanks a lot. It's a great tool. I'll try to use it with my batterystatus theme.
Error in parser ?
Hi,
first of all, thanks for this apps !
I've found an error : I'm using this line :
"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data"
and it doesn't work as it must do. I looked at the log file, and found that it try :
source: \Carte de Stockage\@Backup\Apps\Application Data ---- ok
dest: \Application
attribs: Data
so even with double quotes, the parser find a space, and so choose last chars (in my case the end of path) as attribs.
I made a few tests, always bad :
"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data" r ---> attribs are Data "r
without quotes
...
Can you fix it please?
Thanks
TheBeO said:
Hi,
first of all, thanks for this apps !
I've found an error : I'm using this line :
"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data"
and it doesn't work as it must do. I looked at the log file, and found that it try :
source: \Carte de Stockage\@Backup\Apps\Application Data ---- ok
dest: \Application
attribs: Data
so even with double quotes, the parser find a space, and so choose last chars (in my case the end of path) as attribs.
I made a few tests, always bad :
"\Carte de Stockage\@Backup\Apps\Application Data" "\Application Data" r ---> attribs are Data "r
without quotes
...
Can you fix it please?
Thanks
Click to expand...
Click to collapse
Doh!
I'll make a fix by then end of play tomorrow, providing I can re-create this first time.
Dave
Woah I really envy you all programmers I dun understand at all what you all are talking about but it seems nice for people who understand it
0v04 is up:
Change Log
0v04
- Bug fix: Line parser algorithm should handle work in all cases. (#10)
Yessss
DaveShaw said:
0v04 is up:
Change Log
0v04
- Bug fix: Line parser algorithm should handle work in all cases. (#10)
Click to expand...
Click to collapse
Yes thank you DaveShaw, it works fine now ;-)
And thanks for your speed!
Wow... I like it. I just tried it with my Diamond and it works great on entire folders. My question is:
I have a folder of ringtones on my storage card. I want to copy those to the \windows\rings folder, but it didn't seem to do it. It didn't overwrite any files in a folder that already existed.
I also want to copy the PIM.VOL from my backup to the root of the device. It also didn't work. Any suggestions?
EDIT: it's my turn to go DOH!
I think I found my error. I read the log and found I had mistyped the path. I also read back through the posts and found it can't do just a single file, only a directory. That's why the PIM.VOL file didn't get copied.
JohnBecker said:
Wow... I like it. I just tried it with my Diamond and it works great on entire folders. My question is:
I have a folder of ringtones on my storage card. I want to copy those to the \windows\rings folder, but it didn't seem to do it. It didn't overwrite any files in a folder that already existed.
I also want to copy the PIM.VOL from my backup to the root of the device. It also didn't work. Any suggestions?
EDIT: it's my turn to go DOH!
I think I found my error. I read the log and found I had mistyped the path. I also read back through the posts and found it can't do just a single file, only a directory. That's why the PIM.VOL file didn't get copied.
Click to expand...
Click to collapse
Yeah for single file's just use UC.
And for the \Rings, if it's cooked into the ROM you might not be able to overwrite the file. Nothng I can do about that
Ta
Dave
sorry guys but i dont really get this lil app much. theres not much to it and no info about how to use it? no real examples and explanations to what it does or how.
So could somebody break it down?
m00moo said:
sorry guys but i dont really get this lil app much. theres not much to it and no info about how to use it? no real examples and explanations to what it does or how.
So could somebody break it down?
Click to expand...
Click to collapse
I wrote it because when you are using Slueth's UC you can only copy files using the CPY1 and CPY2 commands.
This application allows you to copy folders as part of the UC process.
To use...
You create a config file on your card, with the source and destination folders (and any attributes you want) - See post #1.
Then you just execute the xcopyce exe in your UC SDConfig.txt file. (You must copy it to a location on your phone becase the UC EXEC: command cannot cope with spaces ) - The line to add to SDConfig.txt is in Post #1.
Ta
Dave
sorry i think i understand now.
just that upon first inspection of the atributes they seemed to be clumped up and i believed that was the whole code.
thanks for the cool handy app!
m00moo said:
sorry i think i understand now.
just that upon first inspection of the atributes they seemed to be clumped up and i believed that was the whole code.
thanks for the cool handy app!
Click to expand...
Click to collapse
I've updated the sample code to colour the comments green, to help with the reading a little
Dave

[Sous-Chef's TIPs] Love .PROVXML's? Hate Not Knowing If It Worked?

So there you are; in the heat of the kitchen, adding your favourite ROM ingredients ... pinch of this, sprinkle of that. Like all good chefs, you decide to take a taste of your preparation before serving to others - nothing is more embarrassing than a meal gone wrong.
So you try it ... wait! you say, something is not right. You're positive you added the ingredients but it's not right. Could it be that a darn .PROVXML didn't get processed in a package? Which one? Time to look at the .PROVXML and check if the entries made it ... what happens if you have a hundred or more .PROVXML's in your kitchen .\PACKAGES or .\EXT folder?
Well, here's a few quick tips for those who love/hate those .PROVXML's
Tip #1: dotFred (FdcSoft) Task Manager 3.1
dotFred Task Manager includes an option to install Provision(er) .XML files. To use it however, you need to make sure that an .XML header appears as the first line of your .PROVXML file. Additionally, you'll need to temporarily rename the .PROVXML to .XML before copying to your device for testing with dotFred Task Manager.
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Once you've confirmed that all is well with your .XML, remove the .XML header and rename the file back to .PROVXML ... you're done.
URL: http://www.dotfred.net/TaskMgr.htm
Tip #2: Log .PROVXML Processing
Another handy little trick, is to add the following code to the end of your .PROVXML file. Place the code at the end of the .PROVXML file - just before/above the </wap-provisioningdoc> statement. This way, the characteric is the last item processed if all is well with the contents of the .PROVXML file.
Place your logging registry value in the OEM registry sub-key; for example, HKLM\Software\OEM\PROVXML ... same place as the MASD sub-key where package version information usually appears. Saves having to look all over the device registry.
Code:
<wap-provisioningdoc>
...
<!-- Add Registry Entry To Log PROVXML (XDADevelopers DD.MM.YYYY) -->
<characteristic type="Registry">
<characteristic type="HKLM\Software\OEM\PROVXML">
<parm name="[COLOR=blue]<SIMPLENAME>[/COLOR]" datatype="string" value="[COLOR=blue]<PROVXMLFileName>[/COLOR]" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
<SIMPLENAME>
Simple friendly registry (REG_SZ) value name; stick with the basics: a-z, A-Z, 0-9. For example, if your .PROVXML file is entitled mxip_Package_MyApp_0_0_0_0, you could set the [SIMPLENAME] to: MyApp0000
<PROVXMLFileName>
Actual .PROVXML filename; that's what it's all about right? What's the point of adding something meaningless. For example, if your .PROVXML file is entitled mxip_Package_MyApp_0_0_0_0, you would set <PROVXMLFileName> to: mxip_Package_MyApp_0_0_0_0.provxml.
Tip #3: RAPICONFIG
Another method to test .PROVXML file is to use the RAPICONFIG utility. XDA members cruiserrr and kheechun report that RAPICONFIG is a quick (and painless) way to test .PROVXML files. Copy the RAPICONFIG (and other utilites) to your kitchen, connect your mobile device via ActiveSync, prepare an .XML file with the registry keys to upload/download, and submit the .XML via RAPICONFIG.
URL: http://forum.xda-developers.com/showthread.php?p=1899755#post1899755
URL: http://msdn.microsoft.com/en-us/library/bb737283.aspx
Tip #4: ANSI or Not To ANSI. And If Not, UTF-8 with/without Signature
Well that is the question, and frankly, i'm not sure there's a right or wrong answer. For example, some Microsoft forum/blog entries seem to elude to ANSI being the preferred choice if the .PROVXML will contain certificate information.
Other forum/blog entries and seasoned chefs will tell you to save them as UTF-8 with Unicode BOM Signature. Others yet, will recommend UTF-8 ... no signature.
So, that is the question indeed ...
Understanding Provisioning
http://msdn.microsoft.com/en-us/library/aa456234.aspx
Metabase Settings
http://msdn.microsoft.com/en-us/library/bb737493.aspx
Provisioning for Windows Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms894922.aspx
Configuration Service Provider Reference for Windows Mobile-Based Devices
http://msdn.microsoft.com/en-us/library/ms889539.aspx
Thanks for sharing, these are all good suggestions.
In my case, when I want to know if my provxml is going to work, I usually just put the file into an installable cab and run it on the phone. If setup was successful, then at least I've confirmed that the syntax was good.
You have to rename the *.provxml file to _setup.xml and then insert it into a cab with:
Code:
MAKECAB _setup.xml InstallCabFile.cab
Another tool to check syntax is the free Microsoft XML editor.
Best regards,
-boggsie
boggsie said:
Another tool to check syntax is the free Microsoft XML editor.
Click to expand...
Click to collapse
XML Notepad 2007
http://www.microsoft.com/DownLoads/...49-787d-4118-ba5f-4f30fe913628&displaylang=en
IMHO the most "easyer" way to know if the syntax is OK is to rename the provxml to .xml and double click it:
If properly written, Internet Explorer (IE) will launch and display the full text
If not, IE will display where it stopped reading (where the error is) and the provxml will not be displayed
Other important aspect is the "file operations":
A provxml will not execute a file operation on a non-existing directory (folder), so the whole provxml contents won't be executed
my 2 cents and congrats for all your great tuts hilaireg
Very, very nice info indeed. HUGE thanks for sharing these tips!
gtrab said:
Other important aspect is the "file operations":
A provxml will not execute a file operation on a non-existing directory (folder), so the whole provxml contents won't be executed
Click to expand...
Click to collapse
This is virtually always what trips me up - forgetting to make a dir before doing something.
With regards to ANSI/UTF-8 etc. I always save as UTF-8 (no signature) and don't have any issues. If I mistakenly save as something else (perhaps by copying the xml into a new file) then I have problems with it not running.
I use all the methods commented here but I am missing another one: rapiconfig.exe lets you download the registry part you want as xml and as well upload it. Combining this with ceregeditor and a dump key like described above it is easy to see if things happened. In fact, rapiconfig can download the answer to a file as well.
Very useful for the start menu, hardkeys, owner, etc.
indeed, I found that RAPICONFIG.exe is the BEST so far, really made my life much easier OP if possible please include that to the top post
It would be my pleasure to add that to the first post. I haven't personally tried this method ... would you mind writing up the steps/procedures and any tips? If you have some links, it would be helpful to have them as well in case other members need the tools.
Cheers,
hilaireg said:
It would be my pleasure to add that to the first post. I haven't personally tried this method ... would you mind writing up the steps/procedures and any tips? If you have some links, it would be helpful to have them as well in case other members need the tools.
Cheers,
Click to expand...
Click to collapse
here you will find a great post with a nice how-to-do.
http://forum.xda-developers.com/showthread.php?p=1899755#post1899755
Yup, found it via the above link as well, it contains instructions on how to extract binary data into XML/provisional XML for UC.
However if you want to test your XML/PROVXML, just use the command
rapiconfig.exe /p <file.xml>
It'll feedback if there is any error in the XML.
However to make a postivie confirmation, you still have to check your file system/registry to see if the actions are taken.
Here is the official information:
http://msdn.microsoft.com/en-us/library/bb737283.aspx
Provisioning overview and Rapi~ Utilities
What can be 'provisioned' for phones?
1 Server provisioning
2 User provisioning
3 Mobile subscriber provisioning
4 Mobile content provisioning
5 Internet access provisioning
Provisioning Mobile Devices an introduction/article about 'provisioning'.
Windows Mobile Provisioning Samples some samples provided by Microsoft
Understanding Provisioning This is the main concept
Here my RapiUtils;
- RapiAttr: Modifies a file's attributes
- RapiCopy: Copies a file between the desktop and a connected device
- RapiDir: Create or remove a directory on the device
- RapiExists: Determines if a file exists
- RapiMove: Move or delete a file on the device
- RapiProc: List and terminate processes on the device
- RapiReg: View and modify registry keys on the device
- RapiStart: Launches an executable on the device
- RapiSync: Sync files from a directory to the device
- RapiTime: View and modify a file's timestamp
- RapiTree: Produces a "dir" like output of a directory.
- RapiGrab.bat: Uses RapiCopy to take a screen shot of the device and copy it to the desktop
- BatteryMon.exe: Desktop utility to present a simple graph showing battery charge for a connected device.
- CeKeyboard2.exe: Desktop utility to copy keyboard keys from the desktop to a connected device.
.NET XML PowerToys:
Generating XML Documents from XML Schemas
The XML Diff and Patch GUI Tool
Using the XML Diff and Patch Tool in Your Applications
Using the XSD Inference Utility
XML Tools Update
Power Toys for .NET Compact Framework 3.5
&
NETCFv35.Messages.EN.wm.cab
MSXML SDK
Would it not be great when we have a Bootstrapping Server here on XDA-Developers ? Converting our _setup.xml via makecab into *.CPF (CAB Provisioning File) and upload 'm to our (future) OMA DM server <g>
Understanding Bootstrapping
Have a nice read and rapi-config-battle,
Edit:
While surfing the net I stubmled upon Mobile Profiler (freeware) and it does a nice job for me; creating on the fly wap-provisioningdocs
-=[ extract downloaded *.exe with Universal Extractor to obtain the *.cab without using ActiveSync ]=-
Mobile Profiler (slightly edited) description;
Mobile Profiler is a tool for creating and restoring system states in XML based snapshots.
It is specialized to save and restore network settings like proxy servers and connection entries. Though there is more..
Whenever you switch a phone profile, Mobile Profiler restores the assigned snapshot.
There is a stand alone mode available for users without phoneAlarm (not free) or for manual switching. \o/
Many things can be stored into a snapshot ;
system settings,
registry keys,
file operations.
The snapshots are simple XML document which can be manipulated with any unicode aware editor.
Have fun,
Senax
I also had a problem with my .provxml and sometimes I wonder if the file itself was missed.. are there any standard naming of .provxml files? I had my .provxml configuration files in "Sources\Devices\HTC Raphael\OEM Packages\HTC Raphael Packages\OperatorPkg" am using osKitchen by the way..
I really don't see any errors in my .provxml but you can take a look at it and tell me if I missed something.
-update-
oh and I got to ask, I read here somewhere in this thread that if the reg key does not yet exists, it will not read my specific reg entry? Is there anyway that I can create this key using .provxml?
Nullstring said:
I also had a problem with my .provxml and sometimes I wonder if the file itself was missed.. are there any standard naming of .provxml files?
Click to expand...
Click to collapse
Assuming you have looked at the links in Post #1 (Tip 4), I haven't found much more on the subject.
I had my .provxml configuration files in "Sources\Devices\HTC Raphael\OEM Packages\HTC Raphael Packages\OperatorPkg" am using osKitchen by the way..
I really don't see any errors in my .provxml but you can take a look at it and tell me if I missed something.
Click to expand...
Click to collapse
Other than the header not having been removed as noted in Post #1 (Tip 1), the rest of the file looks fine to me. Have you tried using FDC Task Manager to import the .PROVXML?
oh and I got to ask, I read here somewhere in this thread that if the reg key does not yet exists, it will not read my specific reg entry?
Click to expand...
Click to collapse
AFAIK, the registry key should be created automatically - providing of course that the key path is valid.
Is there anyway that I can create this key using .provxml?
Click to expand...
Click to collapse
I make use of .provxml files extensively in my Raphael Kitchen; feel free to download it and examine the operator packages.
@hilaireg
thank you for that wonderful information! After fixing these xmls in VS IDE, they finally worked.. I just removed these comments and extra blank lines and put all these reg entries in one node <characteristic type="Registry"> they all seems to work now.
1 last question. in my OperatorPkg folder, I have 10 .provxml files and they were named mxiupdate_oemoperators_###.provxml + 1 mxiupdate_OEMVERSION_###.provxml
is it ok to just add my own .provxml? If I try to name it not in standard way like my_own_settings.provxml, is that ok?
Nullstring said:
@hilaireg
thank you for that wonderful information! After fixing these xmls in VS IDE, they finally worked.. I just removed these comments and extra blank lines and put all these reg entries in one node <characteristic type="Registry"> they all seems to work now.
1 last question. in my OperatorPkg folder, I have 10 .provxml files and they were named mxiupdate_oemoperators_###.provxml + 1 mxiupdate_OEMVERSION_###.provxml
is it ok to just add my own .provxml? If I try to name it not in standard way like my_own_settings.provxml, is that ok?
Click to expand...
Click to collapse
You should be able to add your .provxml to those that appear, observe the file naming convention however. Some .provxml only run when the device goes through a full reinitialization (first-time run), others run whenever the device is reset/soft initialized.
REF: http://msdn.microsoft.com/en-us/library/bb737493.aspx
Lastly, I usually create my "operator" package which contains all of the .provxml I need.
Cheers,
Provxml sequence: 1.) mxipcold*, 2.) mxip_* 3.) mxipupdate
Basically a copy of what I just wrote to the OSB thread, however technically it belongs better here:
You know that there are not many methods to debug this early phase of boot when the provxml execute, so I supplied a dedicated trace at the end of each provxml:
Code:
<!-- trace execution begin
*** change the [B][COLOR=Red]<filename>[/COLOR][/B].traced below to the name of
*** the .provxml where you copy this at the end.
Purpose: Utilize the creation of a shortcut
to get a system timestamped artifact in the context
of the current provxml execution.
After Cold Boot (Hard Reset), you can sort the
directory \Windows\ProvXml\ by file date and
you have the sequence of .provxml execution listed.
-->
<characteristic type="FileOperation">
<characteristic type="%CE2%\ProvXmlTrace" translation="install">
<characteristic type="MakeDir" />
<characteristic type="[COLOR=Red][B]mxipupdate_windowslive_1[/B][/COLOR].traced" translation="install">
<characteristic type="Shortcut">
<parm name="Source" value="%CE2%\solitare.exe" translation="install"/>
</characteristic>
</characteristic>
</characteristic>
</characteristic>
<!-- end of trace activity -->
Result was that from all executed provxml (their names were timestamped traced in the \windows\ProvXmlTrace directory) the sequence is this:
all mxipcold* in the relative sequence of their packages.sof
mxip_* others (also mxip_cold_* which is something that the HtcInit may care about later) in the relative sequence of their packages.sof
all mxipupdate* in the relative sequence of their packages.sof
Mind that the name of the package in the name of the provxml file is the reason to pick it like above, not the directory it is stored in! So no matter where you store the *.provxml in your kitchen path, it is only the name and the highest priority match it has for execution above.
I noticed this because I had a file "mxipcold_smartfon_TB.provxml" put last in the sequence row of my packages (some Z_OEM_my settings), also had the *.DSM set correctly and likewise the packages.sof definition. However there was also a file "mxipcold_smartfon_1.provxml" which was part of the \SYS\CommonNonEA package and this was further up the list in packages.sof. Still it was not at the top of the list, where only other mxip_* and mxipupdate packages were located. So for sure it is that first come all mxipcold*, then all mxip_* and finally all mxipupdate packages. It is also sure that mxip*<packagename>*.provxml will be executed at highest place in priority no matter by which <guid>.dsm in the packages.sof it has been elevated there.
You must note that HTC (others maybe as well) have an additional method to initialize the device. You may find a driver "htcinit.dll" in the OEM drivers section which will then call a "HtcColdBoot.exe". This may have additional capabilities and put the mxip*.provxml in possibly another sequence.
Since this is part of the OEM and the native Windows mobile has their own coldboot treatment (via coldinit.exe) their worksplit and alignment requires dedicated attention if you want to keep the OEM part.
Above findings come from the pure Windows Mobile treatment (i.e. without htcinit.dll driver).
You can trace sequence with above listed method in your own environment.

easy provisioning tool

I made couple of templates and a bat for rapiconfig to pass it in.
result is you can drug&drop provisioning commands over activesync connection from pc to pda
e.g. drop "emails" file into "RapiConfig-DROP_HERE.bat", it creates xml file, edit it and put in rom or send back in pda
can do:
emails, connections, wifi & more (if you'll create another template POST IT please)
ref: http://msdn.microsoft.com/en-us/library/bb737572.aspx
edit:
sending back options:
- from PC: use the same BAT, just drop edited output.txt file and drop it into "RapiConfig-DROP_HERE.bat"
- for implementing in ROM (by cooking) you need to change format to ANSI (from UTF-8) of output file
- - same for fdc-taskman
- from PDA: I just added another BAT, "makeCAB-DROP_EDITED_OUTPUT_HERE.bat"
- - by dropping edited output.txt file into it, it will create YourXMLfile.cab file, to be executed in pda. (accepting both UTF-8 and ANSI formats, so you don't need to care)
look in post#3 for more details on possible incompatibilities
UPDATED attached file: added bat for creating cab for pda
Hi,
I allready had one IMAP4-email-Account configured and that one worked.
Well, i tried the follwing.
Downloaded and extracted provxml.zip.
Drag & droped "emails" onto "RapiConfig-DROP_HERE.bat"
I deleted my email-Account.
When i try to use the email-output.txt and rename it to email-output.xml and try to install it with DotFreds TaskManager it tells me "the xml input is invalid or malformed."
can som1 explain this?
best regards
fwt
yes. sure. change encoding to ANSI or look below for other options
thanks for pointing it out, I'll edit the post, add info about encoding.
i'll explain:
I can't say a word against fdc taskman, I love it!
Think is, "standard definition" is very wide and sometimes not precise subject.
like with registry, they should be unicode, pda version should have "REGEDIT4" header and default key should be "@" and not "default"
but resco is exporting v5 header, and some of others are exporting ANSI files, some creating "default" now, so far for keeping standard..
fdc taskman is importing ALL kind of registries "formats". that's great, but not so much with xml
theory:
xml should have header,
xml could be any format, and as MS stating for provisioning, it should be UTF-8 ref: http://msdn.microsoft.com/en-us/library/bb737422.aspx
BUT:
if you define header - it's not working
if you place UTF-8 format in ROM, (by kitchen), it's not working too
provxml though theory, needs to be ANSI without header, even against what ms is standardizing them to.
RapiConfig is accepting any encoding, and correctly creating UTF-8, but our pdas just don't like it. And fdc-taskman probably not as well.
other options:
Instead you can make a CAB file of it, that would accept both UTF-8 and ANSI
it's simple, rename xml to _setup.xml and pack with makecab.
I'll create a BAT for doing it and place in first post.
or just use the same method of dropping the output....txt into "RapiConfig-DROP_HERE.bat"
that accepts both formats too.
==
another trouble you could have with "connections" provs.
RapiConfig contains "options", provxml not.
like this:
<parm name="DestId" value="{9BAA043B-4019-6C3E-3552-1DA656689A34}" options="Telstra-mms{9BAA043B-4019-6C3E-3552-1DA656689A34}Home-mms{E482A778-1964-0A27-0AB8-7CCE196B9849}Telstra-wap{A1D5DA14-BA00-2A92-45E6-1A9EDAD2D7C5}Home-wap{18AD9FBD-F716-ACB6-FD8A-1965DB95B814}Internet{ADB0B001-10B5-3F39-27C6-9742E785FCD4}....etc....."/>
in provxml files it's without options:
<parm name="DestId" value="{9BAA043B-4019-6C3E-3552-1DA656689A34}" />
if this would make trouble with fdc porting or ROM implementing, or CABs, I didn't test.
First test with new version:
Changing email-output.txt to ANSI(Unix) with TextPad and renamed to email-output.xml => works fine with fdc Taskmanager
Account synced fine!
Account deleted again and tested with XDA_UC => nope ... didn't work
made a cab like described in first post => installed on Touch HD => works fine
great job so far.
Just one (really little) thing:
Could you please remove the "> null" behind the "pause" in your makecab batch.
Not so experienced User could get ... hm ... irritaded by "100.00% [flushing current folder]"
best regards
fwt
thanks for testing. I don't know the XDA_UC so can't say. maybe it keeps a copy in \windows folder and won't work twice with the same file. That was happening on one xml importer a have had once.
the flushing report is from makecab. it is not feeding last line, so pause would owerwrite it's output without redirecting output. But I'll make errorlevel trigger there instead. flushing folder doesn't sounds good, you are right
No Problem ... i'm happy if i can help with this.
Though i'm not really firm with XDA_UC process.
So can't really debug here
But i will test some more stuff like Active Sync.
Code:
<wap-provisioningdoc>
<characteristic-query type="Sync" recursive="true"/>
</wap-provisioningdoc>
but not today ... heading home
bye
More Provisioning Templates
Hello,
Thanks for your tool.
I was wondering if there are other templates for:
Owner Information
Windows Live Messenger
Active Sync Exchange
Facebook
Twitter
Regional Settings
Registry Options that can be set with ~Advanced Config~
It takes about 3 hours to set up my phone after a flash - time consuming controlling installation locations (most to SDCard) and manually registering all the apps I use. The roms usually have Tom's Autoinstall, but I need to have settings in xmls/cabs to be more efficient.
Thanks in advance!

HELP: How to hack a executable file

hi buddies, does anyone one know how to hack an app? for example, change a predefined (hard coded) path like "\storage card" to any other locations. I tried to use hex editor but couldn't find any paths hard coded. I know there's a program called "Olly Debugger" for Win32 which can change binary code to machine code. However it doesn't support PPC applications. Can anyone help?
Many thanks!!
If the path does not appear in the executable then it is not hard coded in the program.
Hard coded strings, string tables, static data and the like, get bundled together by the linker into a separate data segment. They would all appear in the same area within the exe.
The program is probably using FindFirstFlashCard() and FindNextFlashCard() functions to emumerate storage devices. "Storage Card" would be returned by this/these function(s) at run time.
Another reason may be that the executable has been 'signed'. In this case the code is encrypted with the certificate so the hard coded stuff cannot be seen. Altering the code here will invalidate the checksum and the operating system will refuse to run it.
hi stephj, thanks for your info! finally i can figure out the location is hard coded in a dll file instead.
btw do you know how to convert a module (in the form of folders) into a binary dll?
thanks!!
Not quite certain what you mean. A DLL file is the same structure as a .EXE except that it does not have a WinMain() function that a .EXE file has that the loader calls once it is loaded.
Once a DLL is loaded the loader can resolve the real address(es) of its exported function(s).
sorry, i was talking about the modules in rom cooking. after dumping the rom, some DLLs appear in the form of modules (which are folders). what I want to know is the ways to convert these folders into binary files.
In that case it's over to the chefs. My expertise is in the area of application development.
Thanks stephj!!
To convert module to file, look for recmod
It will give you a plain .exe/.dll you want to modify.
After you do it, restore it using reversmod

Categories

Resources