(Maybe) UC v3.0 - Get the BEST from user customization! - Windows Mobile Development and Hacking General

Ok, i was bored about rewriting sdconfig.txt everytime i changed the romlanguage, so i decided to make something that will avoid this, and will avoid to write the sdconfig.txt too
What are the main goals of my project?
Install everything you want without careing about romlanguage
automatize every process
How it works?
Simple. Put your cabs/exes/provxml/xml to import/run in your storage card folder "FB_Install"
Ok. You said that I can install exes, but if i need to add arguments to the execution of the file?
Simple again. Create a file (as an example, if your exe is "myexe.exe") naming myexe.arguments. in it write your arguments. You can use the arguments only on exes.
Well, and if i want to skip some files?
Just create (as an example, if your file is "mycab.cab") a mycab.skip file. This works with all types listed here (cabs, xml,provxml,exes)
Well, i need to hide the customization while I install a cab. How to do that?
Again simple. If your cab is mycab.cab, create a file with name mycab.hide
And if i want to don't reset at end?
Create a file with name "NoResetAtEnd"
Ok, i have that folder but right now i don't want to install anything. how to do that?
Create a file with name "SkipCustomization"
Ok. That's nice. But how i can add my own config codes as i done on UCv2?
Create a file "AddToConfig.txt" and add there your config codes. this will be appended after the other config codes generated by the program.
I want to create some shortcuts. How to do that?
Create a Shortcuts.txt containing the shortcuts to create. You have some IDs:
%SD%
%PROGRAMS_STARTMENU%
%PROGRAM_FILES%
%STARTUP%
%MYDOCUMENTS%
This will allow you to create an universal shortcuts.txt without careing about language.
Each line contains a shortcute to create. Example line:
%PROGRAMS_STARTMENU%\Test.lnk:%SD%\myprogram.exe
this will create a "Test.lnk" in \windows\start menu\programs folder pointing to \Storage card\myprogram.exe (that for wwe).
I want to copy some files in the windows folder. How?
Create a folder in FB_Install called "CopyInWindowsFolder". all files there will be copied to the windows folder. You can do that for Programs,Favorites,Fonts,Startup,Program files folders creating folders:
CopyInWindowsFolder
CopyInProgramsFolder
CopyInProgramFilesFolder
CopyInFavoritesFolder
CopyInFontsFolder
CopyInStartupFolder
I want to install some cabs to storage card instead of internal storage. how?
Just create (as an example, if your file is "mycab.cab") a mycab.ToSD file.
I will include that feature on my future ROMs, but if someone is interested i can release it here.
EDIT: yes i know that noonski done something similar but i was searching about something integrated

Nice idea. Good luck.
One thing though. There might be a clutter of files created but users which can get confusing? How about just parsing one file with all directions?

rjmjr69 said:
Nice idea. Good luck.
One thing though. There might be a clutter of files created but users which can get confusing? How about just parsing one file with all directions?
Click to expand...
Click to collapse
thanks. added other features on first post.

Maybe I missed it but is there anyway to automate .cabs to be installed on storage card?

MrDSL said:
Maybe I missed it but is there anyway to automate .cabs to be installed on storage card?
Click to expand...
Click to collapse
i'm working on that too

michyprima said:
i'm working on that too
Click to expand...
Click to collapse
If you can get that to work then it would be awesome..So far theres no automated option that works to install on storage card..

MrDSL said:
If you can get that to work then it would be awesome..So far theres no automated option that works to install on storage card..
Click to expand...
Click to collapse
Well, i can say i now i got it to work. Requires a bit of work but it works. Well, visual studio is EXTREMELY powerful

Looks really good, I really like to try this UC

This is also a nice tool

finally got it to work right.
Now it can install CABs to storage card without problems

I want that in my ROMs too. Can you share it here?

solved problems on installing cabs too. The installation dll will NOT be executed so you won't need to care about user interaction while installing

Definatly interested in checking this out since it can install to storage card.
hope u make it available..

MrDSL said:
Definatly interested in checking this out since it can install to storage card.
hope u make it available..
Click to expand...
Click to collapse
well that's something for cooks not for users (it needs to be cooked in to work) so if i release it you can't use it at least when someone use it in his rom...

To me it looks like MrDSL is a cook. The ROM linked in his signature is made by him.
Are there any news? Will you release it here soon?

A powerfull alternative;
Will it get released? I'm eager to test it Virtually in an Embedded WM6 environment;
Windows (Embedded) CE/WM6 PowerToy: DiskPrep;
http://forum.xda-developers.com/showthread.php?t=655377
I'm glad though that User Customizer DevPrep (CPY2 Storage Card possible) saved my day(s) until now!
Soon most readers from this thread too IMNSHO,
Senax

Related

New Soft! ConfigCreator & Restorator

Wazzzzzzzzaaa???
This is my first C# util!
It facilitates ExtRom update process. All you need to do is to put your cab files to Ext and run this utility, then the utility will create Config.txt at Ext with all cabs specified as "CAB: path2cab". If you need to get your original Config, then check ConfigOld at Ext
C# Programmers let's unite!!! ))
ps: the utility is not verbose one, so you won't see any messages & lame stuff. If you see something, then there is a problem
that's good boy! will try it l8r..
THANKS!
Man, wher z feedback?? Did u try it?
Yo,
boobee said:
that's good boy! will try it l8r..
THANKS!
Click to expand...
Click to collapse
Boy, hope you finaally tried it! And try this one also. This is my 2nd C# util
Shortly what it does:
UnZips your files with consecutive registry values (reg V4) import and splash writing
It means that you can zip all your files to one file called Setup.zip and place it anywhere (storage/ext). After hard reset, the utility is called and it extracts all your files and restores your favorite registry settings (saved to Setup.reg) and writes your splash.
btw: read za manual !
ps: the concept is the same, if u see somethin' then there is a trouble
Re: Man, wher z feedback?? Did u try it?
Attention!
The file was re-uploaded, so there mustn't be any CRC errors now
System Requirements
Regarding system requirements, the program needs old version of ER\Autorun.exe that understands ER\Config.txt
Program was not tested on XDA1! It was partially tested (w/o hard-resets on XDA2 / 1.72TM
Version 1.1
Wazzza!
Here is a new version of Restorator utility. The new features are:
+ now it deletes content of \My Documents;\Windows\Start Menu;\Windows\Startup folders (as people wanted
+ TimeZone offset is not resetted anymore
Note:
Make sure you have prepared your customized Start Menu (!!!) and Startup (!!!) folders, otherwise you won't be able to see Programs after hard-resetting your device. Please, check the attached sample to prevent yourself from having problems with this utility or use version 1.0 that don't delete anything
Umm... could anyone translate this into English for me?
I don't even understand the title of the thread.
In another thread, SP says that one of these downloads will retrieve data back on hard resets. Sounds like a useful tool, if only I understood what the hell these posts mean. :lol:
For Ben
sublimatica said:
Umm... could anyone translate this into English for me?
Click to expand...
Click to collapse
Here we go...
(assuming that you downloaded 'RestoreItV1_1_PPC.ARMV4.CAB' & installed it to your device)
This program is designed to restore your files, folders and registry settings from a ZIP-format archive and it can also write some splash screens
For this purpose, you need to make a ZIP-format archive with files & folders you want to get restored after hard-reset. Just run your favorite pocket zip archiver (for instance PocketRAR) and archive those files & folders that you want to see after hard-resetting device. Name your archive "Setup.zip" and place it to one of the following places: storage, storage card or extended rom.
Before doing further instruction make sure you have unlocked your ExtendedROM using ExtUnlocker.
If your rom is unlocked try to run the utility from \Storage\RestoreIt. If you had no messages after running it, then the utility installed itself successively. And your files & folders placed to 'Setup.zip' will be restored on next hard-resets.
If you're interested in restoring registry settings, then you need to get pocket registry editors that support exporting/saving to .reg files. After saving your favorite registry settings you will need to combine them to one .reg file and name it 'Setup.reg'. Then, you will need to place it to your archive's root folder (aka '\') So, you will have a file 'Setup.reg' placed to the root folder of your 'Setup.zip'. That's all folks
I strongly recommend you to see sample 'setup.zip' & 'manual.txt'
DON'T FORGET TO PUT YOUR CURRENT '\WINDOWS\STARTUP' & '\WINDOWS\START MENU' FOLDERS TO YOUR SETUP.ZIP!!!
You're welcome to ask me questions anytime!
Aaah, OK. That makes more sense
Sounds like a handy little tool then. Might have a play later.
Thanks, SP!
RAR-support
Is there anyone who is interested in rar-support for restorator?
Attention: Restorator v1.0 & 1.1
Attention: Restorator v1.0 & 1.1 are originally supported by I-Mate 1.72! All you need to do here is to use Extended ROM unlocker prior to running the utility
Feedback
Any feedback so far?
SP,
Restorator seems like a winner!!! I have been hitting my head on the rocks for a while trying to script a recovery using nscriptm as a scripting tool to call cab files which I keep on a storage card. Looks like using your tool a lot of the tedious scripting can be simplified by simply copying the files where they need to go. The challenge is knowing exactly what to copy & where... Is it possible to add the ability to call CAB files to your already excellent utility?
I am imagining putting all the CAB files in say a folder like \CABs in the Setup.zip and then having Restorator calling them one by one after finishing off with all else that it does. Can this be done? Additionally can you add ability to call registry imports at two points? You may wish to call registry import at the beginning and once more at the end after all cab file execution has been completed. This would be useful to restore application settings etc which the cab execution would overwrite to default. You would obviously need to keep two .reg files in the zip file. Does this make sense?
Thanks once again for all your efforts. Regards
Hi Mate
k_kirk said:
SP,
Thanks once again for all your efforts. Regards
Click to expand...
Click to collapse
Thanks for your motivating feedback.
I'm planning to put your features in 3 to 5 days...(hope to get some free time on these days).
And more ideas and recommendations are welcome!!!
SP
SP, thanks for continuing to work on this utility. I am waiting eagerly for your next update. I will set it up and test it with a hard reset so we can see real outcome. Let me know when ready please. Thanks
Re: Hi Mate
SP said:
k_kirk said:
SP,
Thanks once again for all your efforts. Regards
Click to expand...
Click to collapse
Thanks for your motivating feedback.
I'm planning to put your features in 3 to 5 days...(hope to get some free time on these days).
And more ideas and recommendations are welcome!!!
SP
Click to expand...
Click to collapse
Hi SP, this utility sounds great. Does it work with the XDA I as well????
Re: Hi Mate
Hi SP, this utility sounds great. Does it work with the XDA I as well????
Click to expand...
Click to collapse
Unfortunately I don't have an XDA 1 device at my disposal and I'm unfamiliar with its tech info.
What happens when your xda1 is hard resetted? Does it install cab files? or does it run any configuration software?
If there is a such software (on XDA2 it is autorun.exe placed at ExtendedROM), then you must specify in the runner (which starts on hard-resets) the call to the restorator utility
Looking forward to assist you in porting restorator for XDA1 devices
Cheers
Hi SP. Just dropping by. Any news on new version of Restorator? Cheers.
Restorator V1.2
k_kirk said:
Hi SP. Just dropping by. Any news on new version of Restorator? Cheers.
Click to expand...
Click to collapse
Sorry for the delay...
I'm having lack of time now, thus I couldn't test it very well . Just let me know if you found some bugs...
Now you can create "\CABS" folder and place your cabs there. They will be processed after extraction and before registry import. So, you don't need to have two .reg files then.
I'm looking forward to your new ideas!
ps: another attachment is a set of registry settings splitted by .reg files. I'm using them to get my setup.reg. Just change what you need, delete some of them and run "make.bat". It will create setup.reg with all your settings.
btw, check out "Usher_-_Yeah_[44k].wma" & "Maroon5_-_This_Love_[64k].wma". Home-made ringtones ;-)))
for those who hadn't used Restorator before. !!! DON'T FORGET TO PUT YOUR "START MENU" & "STARTUP" FOLDERS TO THE SETUP.ZIP !!! AND READ DA MANUAL!!!
Cheers
SP,
I tried the Restore-It utility today and found that the earlier functionality of copying files & importing registry etc from setup.zip works quite well.
The \CABS folder was also restored onto my device so I guess thats an indication that my setup.zip file was contructed properly. I am sad to report that none of my cab files were triggered by Restore-It though. I think there is a small bug thats holding back this behaviour.
Your kind assistance to check & correct this will be most appreciated.
Thanks & Best Regards

ROM Chefs: SDAutoRun gives customziation to everybody!

User Customization is a config.txt file that's located on an SD card which can install cab & xml files located there too! Think about it: this gives anyone who loads your rom the ability to automatically install their preferred apps/settings as part of customization. Here's how to make your next ROM UC capable:
Cook the attached SDAutoRun.exe into \windows
if AutoRun.exe isn't already in \windows then place a copy there too. Note: some devices don't have a compatible AutoRun.exe. If you have issues, try the attached version.
Replace the "RST: Reset" line in config.txt with "EXEC:\windows\SDAutoRun.exe"
That's it! SDAutoRun will do the final reset unless it encounters a file called SDConfig.txt in the root directory of the storage card. If it sees this file, it will restart autorun and install cabs/configure settings from SDConfig.txt which can point to files that are also located on the SD card.
What's important is this: If every chef uses this system then ROM junkies will be able to freely move between ROMs. If you decide to include this in your next cooked ROM, then make sure you indicate that it's UC capable. I'd really like to make this a standard because it will greatly ease the time consuming task of re-installing apps/settings.
UC v2.0 is now Live!
Changelog
Works with non-WWE ROMs & Internal Storage Roms. SDAutoRun uses the registry to determine the default name for the Storage Card now. For newer devices, this key might be missing altogether so just cook it in. The "Folder" value points to the actual location that contains sdconfig.txt. Here's the key:
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]
"Folder"="Storage Card"
Automatically corrects SDConfig.txt formatting errors. Extra/missing tabs, spaces, newline characters etc are corrected before passing to autorun.exe.
New string value "SDAutoRunVersion" created in HKLM\comm contains "2.0". This will help debug SDConfig.txt file issues in the user thread.
SDAutorun v2.0 is fully compatible with all SDConfig.txt files created to date. Additionally, there now shouldn't be a config file users can throw at it that it won't re-format to the following template:
Commands will be left justified into the first 5 characters and space filled
Parameters will be left justified to the 6th character and trailing whitespace will be removed
Lines that don't contain a command will not be passed to autorun. Note: To determine validity, I only check for a ":" in postion 4 or 5 here to allow for future command expansion.
if no valid commands are encountered, then a file containing only "RST: Reset" will be created
Assumptions
SDAutoRun is not signed so security must be relaxed in HKLM\Security\Policies\Polices by setting the value 0000101a to a 1.
SDConfig.txt cannot be Unicode.
Here's a link to the User's side of ROM customization:
ROM Flashing Junkies: User Customization is here!
If you build a UC capable ROM, be sure to link to the above thread. Also shoot me a PM and I'll add your ROM to the UC capable list.
The key here is that UC is an automated, unattended configuration. Setting it up is done out of the Hard Reset window and once its on your SD card, it works any time you hard reset. Automated is good because it allows mass customization from a business standpoint too. Any business using a UC capable ROM can set up a single "ROM customization" SD card then give it to their IT staff for the daily provisioning of company software/branding on new devices. Your UC capable ROMs have business appeal now!
We are also working on tools that will simplify the XML/SDConfig.txt file creation process. Several good ones have already surfaced in the Users thread.
Useful Stuff
OEM Package for Kaiser
I think this is/will be a great standard! Well done Sleuth for initiating this.
Genius idea.
Good news: doedoe is looking at building a provisioning tool! Now we have two developers working on this. We can sure use more help though. See the user thread for more info!
Good But What S About Cab Wich Prompt For Choosing Languages Or Some Parameters To Be Installed ?
UC
Very nice.
For flashing junkies it's necassary yes, after each flash all your favorit apps auto installed is awsom, nice one Sleuth
a request
can someone make it for all devices/ for example wizard? that will be awesome
Hehe many many thanks.
I tried to get this working with the standard AutoRun from SD but i couln't get it working.
Screw Extended Rom completly.
Great Work.
Making A bookmark.
character said:
can someone make it for all devices/ for example wizard? that will be awesome
Click to expand...
Click to collapse
ROM chefs should be able to use UC on any ROM. Post a link on your favorite ROM Chef's thread if you want to see UC.
SETOUF said:
Good But What S About Cab Wich Prompt For Choosing Languages Or Some Parameters To Be Installed ?
Click to expand...
Click to collapse
Those will need to be researched by the community. Post findings in the user thread (see page 1 for the link)
Awesome application.. so simple I'm amazed it took this long for someone to think of it!
I've cooked it into my ROM.. but I haven't released it so it cant really count as a UC compliant ROM..
It's definitely useful though and I'd love to see others using it. Thanks Sleuth
Already Found in Kin0kin ROMS
Great idea; however Kin0kin released a couple of roms some time ago that do this plus his final WM6 rom is also capable of auto install of applications off a storage card in this way.
WB
And why not change the reg
HKLM\Comm
\Extended_ROM\autorun.exe
and
\Extended_ROM\config.txt
into
\Storage Card\autorun.exe
and
\Storage Card\config.txt
Most ELF roms don't use Ext rom Auto installs any ways.
I still think this is a good cause because he's trying to get more people into doing this.
Instead of one or a few cooks integrating this.
Sleuth255 said:
sorry. AutoRun, by HTC design, cannot install apps to your storage card.
Click to expand...
Click to collapse
Well it shouldn't be hard to patch cab files hardcoded to a path on SD Card. (once i have found all my software back) But not something for a regular user nope.
Sorry to hear that Limitation still exists, seeing your actually using the Original Autorun.
I was allready removing this from my Roms.
Noonski said:
And why not change the reg
HKLM\Comm
\Extended_ROM\autorun.exe
and
\Extended_ROM\config.txt
into
\Storage Card\autorun.exe
and
\Storage Card\config.txt
Click to expand...
Click to collapse
that's pretty much what SDAutoRun does. It reconfigures the reg settings as you indicate and re-runs autorun. First however, it changes SDconfig.txt referenced cabs to RO since on a kaiser at least, the reg settings to prevent post installation CAB removal are ignored by AutoRun. Also, if no SDConfig.txt exists or there is no SD card installed, then it generates a quick one line config.txt containg the RST: command then re-runs autorun. On a Kaiser at least, the RST: command also re-activates the radio first. Without it, the device comes up with the radio disabled. I figured this scheme would maintain compatibility across all devices.
The standard is the important thing though as you indicate. You don't need to incorporate SDAutoRun in the manner I suggest. Whatever scheme works best for you is fine as long as it meets the following specifications:
user config occurs after all other autorun config
if SDConfig.txt is found on the storage card, set up the registry and re-run autorun
if SDConfig.txt is missing or there is no storage card installed then perform the final RST:
don't remove CABS from the storage card after installation.
I just thought my little 31K pgm was the easiset way to accomplish this. On deck is a way to do this even if the user renames the storage card...
Well looks like you can ad me to the list after monday.
I'm going to strip The new 6. rom to the bone and make some custom cabs hardcoded to SD card installation for the stripped Apps that can work from SD.
Cool... shoot me the link to your support thread when you do & I'll put it up on pg 1 of the UC user thread.
Regedit setting
Sleuth255 said:
HKLM\Security\Policies\Polices by setting the value 0000101C to a 1.
Click to expand...
Click to collapse
Can someone tell me what's "a 1"?
??[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"0000101C"=dword:a 1??
or
??[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"0000101C"=dword:a1??
Cheers
Strange that it's contain hardcoded paths ...! The name of my Storage card is Speicherkarte and so it's useless for me!
Probably a dumb question but where would I put this file in the base kit I have. I have a base kit for wm6.1 on titan. Ide love to cook up a rom but I dont know where this file goes.
smarvest said:
Can someone tell me what's "a 1"?
??[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"0000101C"=dword:a 1??
or
??[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"0000101C"=dword:a1??
Cheers
Click to expand...
Click to collapse
set the value "000101c" to a 1 ie:
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"0000101C"=dword:1

small utility: cab batch install (a batch installer) with source

Introdution:
This small app will help you out when you have a bunch of cab files to install after flashing the new rom.
How to use:
1. Select or input a directory that contains a bunch of cab files.
2. Generate the list file that is [INSERT SELECTED DIRECTORY]\batch-list.txt. You can manually edit this file to select which to install.
3. Batch install. It will promot you if you really want to install that file.
Problems:
1. The small utility can not silently install cab files.
Todo:
1. More UI friendly to select the files.
Note:
I am rather new at windows mobile programming. I have learned it from scratch. The whole program uses pure C and winapi, no managed code, no MFC/ATL.
Acknowledge:
Thanks legedug for packaging the cab file.
Copyleft:
The source code is available, anyone can modify it and redistribute it. But you should contain at least a piece of my name in it and should distribute with full source code.
reserved for future.
Or no future.
thank you very much for this tool
Will try it! This will be super good as my P3600i constantly needs a hard reset due to all available roms are for P3600. I'll let you know how this go! Thanks
This will differentiate itself from other similar programs (TierAutoinstall) if it can popup when dialogs are displayed after installs on some cabs.
Tested. I really like it!
No bug so far and here are my findings and suggestions:
1. Yes we need silent installation
2. Pick a directory: this need to pick up sub-directories. My cabs saved in "Storage Card/PDA SW/Common". It won't pick up cab file in "Common" directory.
3. Some cab files require restart - If I choose restart now, it won't resume batch install. (I can choose not to restart now to by-pass it)
jackkkkk said:
Tested. I really like it!
No bug so far and here are my findings and suggestions:
1. Yes we need silent installation
2. Pick a directory: this need to pick up sub-directories. My cabs saved in "Storage Card/PDA SW/Common". It won't pick up cab file in "Common" directory.
3. Some cab files require restart - If I choose restart now, it won't resume batch install. (I can choose not to restart now to by-pass it)
Click to expand...
Click to collapse
Ok, you can manually input the directory. I do not know how to invoke folder selection dialog. If anyone know , please help me.
Nice!! Wish I would have seen it a couple of hours ago before I reflashed for WM 6.1
stanglifemike said:
Nice!! Wish I would have seen it a couple of hours ago before I reflashed for WM 6.1
Click to expand...
Click to collapse
You can try it next time
helloworld1 - this app is shining jewel in dull xdadev world.
kudos.
just improve it a bit(exit option, folder select dialog..)
nothin said:
helloworld1 - this app is shining jewel in dull xdadev world.
kudos.
just improve it a bit(exit option, folder select dialog..)
Click to expand...
Click to collapse
Thanks for your kudos. I will continue develop this little app making it better and easier to use.
First trying, put on \Storage Card\Program Files\CabbatchInstall and make it shortcut to \windows\Start Menu\Programs; it works
So I make it on cab file to put the programs such as above:
legedug said:
First trying, put on \Storage Card\Program Files\CabbatchInstall and make it shortcut to \windows\Start Menu\Programs; it works
So I make it on cab file to put the programs such as above:
Click to expand...
Click to collapse
Ok, thanks ,I will cab it next time.
I would welcome if this would install silently...otherwise its great because its so simple - no hassle like with sashimi, which is great, but too much work for the first time!
thanks man, this is actually exactly what i needed
im actually gonna flash today so I will your app a run and see how it works
however I have seen other tools like this or there about here on xda which use a combination of code and mort script for the silent install part
quick feedback ..the exit function don't work
absorber786 said:
im actually gonna flash today so I will your app a run and see how it works
however I have seen other tools like this or there about here on xda which use a combination of code and mort script for the silent install part
quick feedback ..the exit function don't work
Click to expand...
Click to collapse
Yes, I forget to add it. There is a big OK button to do that.
I fail to make upgrade recently because I don't have visual studio 2008 as in the lab before.
This one is written in pure C. So It can run without any additions.
laser21 said:
I would welcome if this would install silently...otherwise its great because its so simple - no hassle like with sashimi, which is great, but too much work for the first time!
Click to expand...
Click to collapse
It can not install things very silently. Because you have to select where to install.
My ambition plan is to parse the XML manually and let it really silent.
Now I don't have a Windows OS and Visual Studio. I will delay upgrade this software.
I have released the source, it is welcome for anyone to help.
Ok so i have tried it a couple of times..and after using the tool from v3patel(see my sig) im sorry.....
v3patel's is mortscript; quick and already allows for a silent install. However, my suggestion fro you to get the silent install working is to have a look at the command he uses in his script and see you can replicate it for your tool....
If it works, i will be more than to hard-reset my device to test...(and it better work lol)
helloworld1
excuse me;
can this be used to install all ones cab file apps etc, after a system hard reset if all cabs are say kept in a pacific folder for that purpose.
thanks

[Q] automatically generate .dat file from a folder structure

Hi, I have a folder with a couple of folders in it that each contain a whole lot of files. I want to cook this folder (with its subfolders) in a rom and place it in the device root folder.
I wonder if there is a utility that can automatically generate a app.dat file from this folder?
Why not Zip it up with an unkown extension, then unzip with Mort (can handle unkown zip extensions).
Using initflashfiles file operations slows up filesystem.
(using unkown filetypes and folders does not)
Sorry if i sound like a broken record to some.
appelflap said:
Hi, I have a folder with a couple of folders in it that each contain a whole lot of files. I want to cook this folder (with its subfolders) in a rom and place it in the device root folder.
I wonder if there is a utility that can automatically generate a app.dat file from this folder?
Click to expand...
Click to collapse
you could make a cab with wince cab mgr(it supports drag n drop of folders) then convert the cab to ext pkg or run it in customization.
twopumpchump said:
you could make a cab with wince cab mgr(it supports drag n drop of folders) then convert the cab to ext pkg or run it in customization.
Click to expand...
Click to collapse
Brilliant! Thanks
twopumpchump said:
you could make a cab with wince cab mgr(it supports drag n drop of folders) then convert the cab to ext pkg or run it in customization.
Click to expand...
Click to collapse
For a more Freeware solution (but without the easier Drag and Drop support)
http://forum.xda-developers.com/showthread.php?t=530710
Extenddir Cab Maker.
Noonski said:
For a more Freeware solution (but without the easier Drag and Drop support)
http://forum.xda-developers.com/showthread.php?t=530710
Extenddir Cab Maker.
Click to expand...
Click to collapse
Thanks, fortunately wince cab maker has a generous trial period. For that one time I have to put all copilot map files in a cab, it is the best option. Thanks anyway
Cabs suck, they're a pain in the butt to make and take forever to install. Just do what Noonski said and make a zip file. They install in seconds, whereas big cabs can take minutes. Here's the basic format I use; this zip file goes to the device root, which is what you want (you need the right # of \'s to get it to work). First, I have a zip file named 'root.zip'. Then, I name the mortscript Unziproot.mscr. Here's the script:
Code:
UnZipALL("\Windows\root.zip","\\")
To get it to execute, I add this to an add2config.txt file:
Code:
EXEC:\WINDOWS\Unziproot.mscr
Zip files are a helluva lot easier to make than cabs; I do it all the time with total commander on the device, and it takes just a few seconds. They're trivial to edit, too. I've attached a zip file that has the add2config.txt, the mortscript, and also a simple mortscript package that works well. Seriously, just listen to Noonski.
Edit: Make sure the mortscript doesn't have any spaces in it. If you name it "Unzip root.mscr", it won't run during customization (been there, done that, lol).
Hey Noonski.. how about we make a script, or an executable that we can plug in a kitchen batch file right before IMGFS gets created, that can look at at an initflashfiles.dat, analyze it, line by line, then create a zip with all the files its supposed to move then copy an almost blank initflashfiles.dat back in the "dump" directory. We could even do this in mort for windows!
NRGZ28 said:
Hey Noonski.. how about we make a script, or an executable that we can plug in a kitchen batch file right before IMGFS gets created, that can look at at an initflashfiles.dat, analyze it, line by line, then create a zip with all the files its supposed to move then copy an almost blank initflashfiles.dat back in the "dump" directory. We could even do this in mort for windows!
Click to expand...
Click to collapse
TPC mentioned doing something like that in the extendir thread. I will say this, I've tried to install my entire start menu with a zip file, and the bugger wouldn't work. The script worked fine after bootup, but it wouldn't run during customization. I don't know what the deal was. I only tried it a couple of times, though, but I don't think that I just did something really dumb.
Farmer Ted said:
TPC mentioned doing something like that in the extendir thread. I will say this, I've tried to install my entire start menu with a zip file, and the bugger wouldn't work. The script worked fine after bootup, but it wouldn't run during customization. I don't know what the deal was. I only tried it a couple of times, though, but I don't think that I just did something really dumb.
Click to expand...
Click to collapse
That should be an easy thing to fix...
yeah i have actually made zips for every file that goes somewhere besides windows, you wont believe the amount of space this saves and how much faster your rom is it is alot of work, one way that makes it a lil easier is to make a list of all the files that are in your zips then have your .bat delete them from dump before imgfsfromdump.exe runs in kitchen....but we could do it better and easier im sure if we just all put our heads together
Wow good idea, that's taking it into a whole new level, automating it.
It's about time this method creeped it's way from the method of a few to something that everyone can take advantage of.
It's one of the most underused methods for a bit more speed, instead of improving filesystem cache settings, reducing the stress on the file system.
(totally made the above up, I just threw a few interesting words i have been reading here and there, before people start thinking I actually understand the file system at a low level) I just know from experience and just doing it that there's advantages.
It's batching beyond my expertise (low level but creative ).
But i'm pretty sure there's a few good men for the job.
HowdyKeith and RoryB come to mind when it comes to Mort Syntax and reading values from files.
Their Batching knowledge should also be good.
But if this is do-able, then why not also not try to get rid of .provxml files to, and speed up the first boot time. Provxml is the second killer of speedy first boots.
Noonski said:
Wow good idea, that's taking it into a whole new level, automating it.
It's about time this method creeped it's way from the method of a few to something that everyone can take advantage of.
It's one of the most underused methods for a bit more speed, instead of improving filesystem cache settings, reducing the stress on the file system.
(totally made the above up, I just threw a few interesting words i have been reading here and there, before people start thinking I actually understand the file system at a low level) I just know from experience and just doing it that there's advantages.
It's batching beyond my expertise (low level but creative ).
But i'm pretty sure there's a few good men for the job.
HowdyKeith and RoryB come to mind when it comes to Mort Syntax and reading values from files.
Their Batching knowledge should also be good.
But if this is do-able, then why not also not try to get rid of .provxml files to, and speed up the first boot time. Provxml is the second killer of speedy first boots.
Click to expand...
Click to collapse
it would be awesome to have a tool that reads initflashfiles.dat from dump, puts all the files that go in other folders besides windows in a zip file also would be nice to be able to select a list of files to go into extendir\windir as well.
Noonski said:
Why not Zip it up with an unkown extension, then unzip with Mort (can handle unkown zip extensions).
Using initflashfiles file operations slows up filesystem.
(using unkown filetypes and folders does not)
Sorry if i sound like a broken record to some.
Click to expand...
Click to collapse
Hi Noonski, I think these are really great ideas. One question about your comment on iniflashfiles slowing down the system, are you referring to the startup time on first boot? Because I fail to see where the speed would be effected in general terms as the only function of the iniflashfiles is to specify where files get placed other than windows. Once they are moved in to the correct places the files is useless. So I don't see how the speed could be any different than with a zip other than the customization time being reduced. Of course I could be wrong. lol
Meant it more in the way that you then do not actually need that file to be in Rom, and therefore in the Windows folder. That's where i meant the most gain was.
Not sure if there's any other extra difference between a file that has been copied from Windows to a sub-folder or an extracted one, other then that it won't be read only and not present in Windows.
Well if you have a zip file with folders and files inside that folders
and you make a script that copies these folders to the corresponding dirs on the device you accomplish what you are asking here isn't?
twopumpchump said:
it would be awesome to have a tool that reads initflashfiles.dat from dump, puts all the files that go in other folders besides windows in a zip file also would be nice to be able to select a list of files to go into extendir\windir as well.
Click to expand...
Click to collapse
Hmmm if every file in a rom was moved without leaving a copy on the windows root I wonder how many files would be eliminated. Im guessing quite a few. Im thinking the only way this would work would be for a mod to be made for EVK allowing all the initflashfiles.dat info and app.dat info to be compiled and a zip created from them.( Not sure a simple zip could properly place that many files?) Then the files placed inside the zip would need to be deleted before the rom is compiled. Theoretically I think its possible.
@L26
Yeah your right. However I think the biggest thing to look at is there a easier way than doing it all by hand It would take forever to take every file moved by the .dat files and make a zip. Not to mention updating the files for new versions would be a PITA
aruppenthal said:
Hmmm if every file in a rom was moved without leaving a copy on the windows root I wonder how many files would be eliminated. Im guessing quite a few. Im thinking the only way this would work would be for a mod to be made for EVK allowing all the initflashfiles.dat info and app.dat info to be compiled and a zip created from them.( Not sure a simple zip could properly place that many files?) Then the files placed inside the zip would need to be deleted before the rom is compiled. Theoretically I think its possible.
Click to expand...
Click to collapse
amazing, check my post and scripts in this same forum ... I was trying to do the same (only with shortcuts for now): cook shortcuts without leaving double files in windows folder, so I remove all shortcuts from the kitchen and once cooked I create the provxml with mortscript reading an ini file and inject the provxml files to the kitchen and the cook again. Of course I only include files present in the ROM. How can I avoid cooking twice?. the script also zips and copies all the files that will be needed for the scripts that run at first boot, including the files only if the modules are in the kitchen.
May be a mod in EVK to runwait scripts before creating the nbh could open a lot of new ways of cooking without using windows directory.
@noonski, do you care taking a look at my script building the provxml file? I am pretty sure you will have lots of suggestions on how to progress further.
cruiserrr said:
amazing, check my post and scripts in this same forum ... I was trying to do the same (only with shortcuts for now): cook shortcuts without leaving double files in windows folder, so I remove all shortcuts from the kitchen and once cooked I create the provxml with mortscript reading an ini file and inject the provxml files to the kitchen and the cook again. Of course I only include files present in the ROM. How can I avoid cooking twice?. the script also zips and copies all the files that will be needed for the scripts that run at first boot, including the files only if the modules are in the kitchen.
May be a mod in EVK to runwait scripts before creating the nbh could open a lot of new ways of cooking without using windows directory.
@noonski, do you care taking a look at my script building the provxml file? I am pretty sure you will have lots of suggestions on how to progress further.
Click to expand...
Click to collapse
isnt the simplest way just to go to your windows folder on your phone and copy Start Menu folder to your pc, create a list of the files that are in that folder and use .bat to delete them while cooking, zip that folder up and put it in kitchen or sdcard and use .mscr to unzip to windows directory at first boot? you only have to cook once this way
twopumpchump said:
isnt the simplest way just to go to your windows folder on your phone and copy Start Menu folder to your pc, create a list of the files that are in that folder and use .bat to delete them while cooking, zip that folder up and put it in kitchen or sdcard and use .mscr to unzip to windows directory at first boot? you only have to cook once this way
Click to expand...
Click to collapse
well, do not want to go offtopic of this post. The idea is to cook automatically with no errors. My method cooks only what is needed without putting files to windows folder. Basically I only have to run twice when changing modules included. If it is only about changing icons, order, etc I simply run the script and cook. If it is about customization I would certainly do like you say (I have done it many times in the past). If it is about cooking should be more automated. Is complex to build but now I only define the INI files parameters: icon, parameter, folder, order... (I have not touched the mortscript since I completed it). Anyway, my building method as its own post. I just found similar ideas behind in this thread and tought they could converge.

[Solved][Q] EXT packages + app.dat = duplicates of files in \windows\

I tried to keep the title as descriptive and short as possible, I hope it makes sense
I picked up the kitchen of nhathoa (a retired Topaz cook) hoping to get it customized to make it exactly the way I want but I'm running into some issues.
Long story short, I'm using Ervius Visual Kitchen (1.8.2) and I noticed that the EXT packages I added end up leaving two copies of the files, a copy under \windows\ and another one in the places I specified using app.dat using:
Code:
Directory("\Program Files\bla\"):-File("bla.exe","\Windows\bla.exe")
Is there some way to get rid of the copy under \Windows\ ??
I know that I could simply leave everything there and discard the app.dat files but I would really prefer having everything organized properly (I have a bit of an OCD when it comes to organizing everything neatly ).
I'm pretty sure that this is a rather simple and noobish issue but I couldn't find anything relevant by searching and I took a look at some ext packages by various cooks and noticed the same behaviour.
MusikMonk said:
I tried to keep the title as descriptive and short as possible, I hope it makes sense
I picked up the kitchen of nhathoa (a retired Topaz cook) hoping to get it customized to make it exactly the way I want but I'm running into some issues.
Long story short, I'm using Ervius Visual Kitchen (1.8.2) and I noticed that the EXT packages I added end up leaving two copies of the files, a copy under \windows\ and another one in the places I specified using app.dat using:
Code:
Directory("\Program Files\bla\"):-File("bla.exe","\Windows\bla.exe")
Is there some way to get rid of the copy under \Windows\ ??
I know that I could simply leave everything there and discard the app.dat files but I would really prefer having everything organized properly (I have a bit of an OCD when it comes to organizing everything neatly ).
I'm pretty sure that this is a rather simple and noobish issue but I couldn't find anything relevant by searching and I took a look at some ext packages by various cooks and noticed the same behaviour.
Click to expand...
Click to collapse
No, it's call Read-Only-Memory (ROM) and is the reason you can hard-reset your phone. Every file you cook into the ROM is in \windows. Two ways I know of to reduce the amount of files would be to zip them and have a mortscript unzip them to the proper location during customization or cook in a cab containing all of the files and have it run during customization.
That makes a lot of sense, I really feel ashamed that I didn't figure it out earlier
EXT packages seemed easier than bothering to read about customization but I guess it's time to start reading about this kind of stuff.
Thread marked as solved.
Thanks for the quick reply!
Yup, files in rom are in rom forever, or until you flash again, lol. The trick is to just run bla.exe from \windows. I would say that 90% of the time, bla.exe runs just fine out of the windows directory (especially if it's the only file in the package). When people create cabs, they naturally install the app in \program files, but in general apps don't need to be in a specific folder. If there are other files present, usually an .exe will search within its own folder for those files. So, if you just cook everything straight into windows, you'll be good to go. It's easy enough to test: just move all the files from program files to windows after installing a cab, fix the shortcut in the start menu, and then try to run the app. It's always a good idea to do a soft reset and try again (found this out the hard way many times). The one thing you have to watch out for is settings files, like .dat files. These files frequently have to be archived (not read-only). Particularly with apps that use net 3.5, if there's a setting file that is read-only, the app won't boot and you'll get an error message. The fix is to name the file settings-1.txt (or whatever) and have an app.dat rename it to settings.txt (and keep it in \windows).
Also, remember to fix the shortcut path in the start menu, and examine the registry entries to see if there are any paths for files present-you may need to change them to point to \windows (this could also be true in settings files).
mwalt2 said:
No, it's call Read-Only-Memory (ROM) and is the reason you can hard-reset your phone. Every file you cook into the ROM is in \windows. Two ways I know of to reduce the amount of files would be to zip them and have a mortscript unzip them to the proper location during customization or cook in a cab containing all of the files and have it run during customization.
Click to expand...
Click to collapse
This actually made me think a little bit. When you think about read only, I always thing can't delete or overwrite. Obviously I can run a cab and replace a file that is located in the \Windows directory, that leads me to believe there is a way to delete a file or maybe even replaced with an empty file of the same name.
You can over-write a rom file, but the rom file is still there. The file system just flags it somehow or another and tells the device to ignore it and instead use the new file.
TMartin03 said:
This actually made me think a little bit. When you think about read only, I always thing can't delete or overwrite. Obviously I can run a cab and replace a file that is located in the \Windows directory, that leads me to believe there is a way to delete a file or maybe even replaced with an empty file of the same name.
Click to expand...
Click to collapse
The new file you copy over goes into the "user" partition of the file system and windows knows to use that file instead. Once you delete this newly copied file from \windows, the old one from the ROM will take its place back in the filesystem.
Farmer Ted said:
Yup, files in rom are in rom forever, or until you flash again, lol. The trick is to just run bla.exe from \windows. I would say that 90% of the time, bla.exe runs just fine out of the windows directory (especially if it's the only file in the package). When people create cabs, they naturally install the app in \program files, but in general apps don't need to be in a specific folder. If there are other files present, usually an .exe will search within its own folder for those files. So, if you just cook everything straight into windows, you'll be good to go. It's easy enough to test: just move all the files from program files to windows after installing a cab, fix the shortcut in the start menu, and then try to run the app. It's always a good idea to do a soft reset and try again (found this out the hard way many times). The one thing you have to watch out for is settings files, like .dat files. These files frequently have to be archived (not read-only). Particularly with apps that use net 3.5, if there's a setting file that is read-only, the app won't boot and you'll get an error message. The fix is to name the file settings-1.txt (or whatever) and have an app.dat rename it to settings.txt (and keep it in \windows).
Also, remember to fix the shortcut path in the start menu, and examine the registry entries to see if there are any paths for files present-you may need to change them to point to \windows (this could also be true in settings files).
Click to expand...
Click to collapse
First of all, a small question about the underlined part, just to make sure that I got it right: it won't be exactly a rename just a copy with a different name, correct?
Some of the apps I use need a specific directory structure for the resources and files they use, so just dumping them in one big folder won't work.
Another possible issue that I think I'll run into is having two files sharing a generic name (let's say settings.xml) while each belongs to a different app. I didn't personally encounter such a situation just yet but my packages are still a work in progress and I did see a post or two about this while searching.
I was still hoping there would be a simple way to arrange the files in folders while keeping them under \windows\ but I can't find such a method either. Doesn't seem like I have other options than to decided on a firstboot customization method: Runcc, autorun, xda_uc or something that I haven't read about yet...
"Runcc" is currently used in the base kitchen so that gives it an edge right now.
Edit:
Remembered that I had another question, and it's probably not worth a new thread.
I was looking at how to manually create .lnk files and I noticed something that I didn't understand and couldn't find info about.
For example:
Code:
21#"\Windows\MSDict.htm"
What exactly does the "21" refer to?? I tried changing it randomly to other values a couple of times and it didn't effect anything.
NRGZ28 said:
The new file you copy over goes into the "user" partition of the file system and windows knows to use that file instead. Once you delete this newly copied file from \windows, the old one from the ROM will take its place back in the filesystem.
Click to expand...
Click to collapse
Ok now that makes a lot of sense. I guess I'm just use to Android and being able to see that separate partition. Thanks for the explanation.
That sort of leaves me to another question. Can't someone develop a way to overwrite directly to the "system" partition? It would almost be like a root/superuser for WinMo.
Sent from my HTC Evo 4G!
MusikMonk said:
First of all, a small question about the underlined part, just to make sure that I got it right: it won't be exactly a rename just a copy with a different name, correct?
Click to expand...
Click to collapse
Yup, that's correct. Another approach is to take all similar files that go into windows and stick them in a zip file that unzips to the windows directory. I do that in a few cases (power radio comes to mind; it has an ini file). What I do in most cases though is use a backup/restore mortscript. The backup copies all settings files (and similar things) on my device to my sd card. During customization, the restore copies them back. It's convenient for apps where I change the settings a lot and I don't want to have to constantly fuss with the packages.
Some of the apps I use need a specific directory structure for the resources and files they use, so just dumping them in one big folder won't work.
Click to expand...
Click to collapse
What you do in that case is move the sub-folders into windows. In this case, I'll use a zip file to unzip those folders into windows. Using app.dat files to copy large numbers of files blows. It increases the rom file count as well as the storage used. A zip file is a single file, and usually it saves space.
Another possible issue that I think I'll run into is having two files sharing a generic name (let's say settings.xml) while each belongs to a different app. I didn't personally encounter such a situation just yet but my packages are still a work in progress and I did see a post or two about this while searching.
Click to expand...
Click to collapse
In that case, you're screwed unless there's a registry key that lets you change the name. I've run into a few complications; tcpmp and OMarket both use a common.dll. My solution was to buy Core Player, lol.
I was still hoping there would be a simple way to arrange the files in folders while keeping them under \windows\ but I can't find such a method either. Doesn't seem like I have other options than to decided on a firstboot customization method: Runcc, autorun, xda_uc or something that I haven't read about yet...
"Runcc" is currently used in the base kitchen so that gives it an edge right now.
Click to expand...
Click to collapse
Using cabs or zip files is the way to go if you want to copy large folders in one shot (with a mortscript; you can also un-rar rar files, but I don't know how. Yet, lol). Zips are easier to make and edit than cabs, but you need to have mortscript cooked in and know how to write the simple script (aka cut-and-paste).
Edit:
Remembered that I had another question, and it's probably not worth a new thread.
I was looking at how to manually create .lnk files and I noticed something that I didn't understand and couldn't find info about.
For example:
Code:
21#"\Windows\MSDict.htm"
What exactly does the "21" refer to?? I tried changing it randomly to other values a couple of times and it didn't effect anything.
Click to expand...
Click to collapse
The 21 is the number of bytes after the #. It doesn't matter. I usually just change the first number to 1. It works fine. Counting bytes blows.
That was extremely helpful. Too bad these boards don't use a rep system
Farmer Ted said:
Yup, that's correct. Another approach is to take all similar files that go into windows and stick them in a zip file that unzips to the windows directory.
Click to expand...
Click to collapse
Well, if I'm going to follow this method, and it seems like I am, I don't see why I would still have to limit myself to the \windows folder. I can just put everything the way I originally wanted to do. I only looked at arranging files under \windows when I found out that there's no way to get rid of the duplicates.
Farmer Ted said:
Using cabs or zip files is the way to go if you want to copy large folders in one shot (with a mortscript; you can also un-rar rar files, but I don't know how. Yet, lol). Zips are easier to make and edit than cabs, but you need to have mortscript cooked in and know how to write the simple script (aka cut-and-paste).
Click to expand...
Click to collapse
I haven't tried writing mortscripts yet but I've seen enough to figure out the basic and notice how easy it is. I'm gonna check how usable is the WM version of 7zip, as long as it accepts arguments combining it with mortscript will be easy and perfect for me.
7z archives can get smaller in size than half of the zip archives for the same files. And cabs are too annoying to work with and keep updated later on.
Only issue remaining now is checking whether I should put the archived files under \windows or use the sdcard for customization. I'm leaning toward the first but I'll have to wait and see how much memory I would be sacrificing that way.
Farmer Ted said:
The 21 is the number of bytes after the #. It doesn't matter. I usually just change the first number to 1. It works fine. Counting bytes blows.
Click to expand...
Click to collapse
Ah! I thought about counting bytes/characters and noticed that it works sometimes. But I thought it was a coincidence after I experimented in changing the value and noticed that it wasn't always the right count in the .lnk files that I found.
[rant]
Nice, I was messing around with some packages to free up ram and storage and I seem to have ended up with a rather b0rked up xTask. And then there's still convincing Resco Explorer that the registry add-in IS in fact there.
Figuring out the causes should keep me happily busy for a while (and probably heavily pissed for another while afterwards).
[/rant]
Edit:
Just for the record, I ended up using xda_uc it's a lot easier than doing things manually. Although it would help if there was some kind of documentation available, took me a while to understand what .xda, xdai, xdas & .xdaz files are supposed to be.
hi by the way is it possible to convert ext packages of QVGA phones to one another?

Categories

Resources