Automated copy (restore) from SD card to the device - Windows Mobile Development and Hacking General

Hello,
I'm looking for a way that copies my backup files (these can be anything) to the device in an automated way.
Instead of copying each file manually, I would like to run a bat file or exe file that does this for me.
The problem is that windows mobile doesnt have a command line interpreter so bat files wont work.
Is there anyone that could point me to a direction how I can make this (what I need, etc...) ?
I also want to avoid using 3rd party software on my device to do this job.
Just an exe or something else that does the job.
Thanks

It really depends on what you're backing up. PIM data is good with PIM Backup (or similar).
texarcana said:
I also want to avoid using 3rd party software on my device to do this job.
Just an exe or something else that does the job.
Click to expand...
Click to collapse
Those two contradict as no such program exists natively.

ill explain some more:
what I want to backup isnt that important right now, it can be a txt file or a config file, an image, an mp3, ...
I'm more interested in a way how to do it
If S:\ is the location of my SD card and C:\ is the location of my windows mobile device then i want a script or an exe file or something that does the following (instead of having to do it manually):
copy S:\file1 to C:\
copy S:\file2 to C:\
copy S:\file3 to C:\
...

I use mortscript for backup and restore.
very useful

dan1967 said:
I use mortscript for backup and restore.
very useful
Click to expand...
Click to collapse
thx for the tip, it works great.
Even made myself a link in the startmenu, this beats using the explorer and doing everything manually

I've found my own solution to this one. It's not very exciting and it's pretty low-tech, but I keep a directory on my storage card called "Backup". Inside of it is an exact replica of my file structure I want to backup. For example: \Storage Card\Backup\Windows\BatteryStatus\. (In this case, this is where I keep my custom BS skins.) Then I go in with Total Commander, select the Backup folder, hit "copy", and the directory path pops up. I take \Storage Card\Backup\ and delete it, so I'm copying to the root of my main memory. Hit "OK" and voila! Settings restored. Primitive, I know, but it works.

Zoltair Wright,
If you want, you can take this 1 step higher in automating it with mortscript like i did. Then its only 1 click on a link in the start menu and it's done.
You can put the deleting, copying or moving in the script.
It's very easy to use and the manual explains a lot.
If you want I can attachment my tiny script as an example.
Cheers

Related

How do I change welcomehead.96.png?

I'm writing a little tool to restore my settings after a hard reset.
One of the problems I've run into is that I can't "overwrite" the splash screen image in the windows folder.
I'm using visual basic and the "file.copy" command.
Does anyone know how to overwrite this file (and probably also other files in "rom")? Would an api function to copy the file work better?
Total Commander, and MortScript, succeeds in copying another file to \windows\welcomehead.96.png, so there must be a way
B
Let me give you some hints:
1. You must edit ROM to change files.
2. Please go to URL
http://forum.xda-developers.com/viewtopic.php?t=34171
on2003 said:
Let me give you some hints:
1. You must edit ROM to change files.
2. Please go to URL
http://forum.xda-developers.com/viewtopic.php?t=34171
Click to expand...
Click to collapse
OK. I'll Rephrase my question:
I want to write a program to copy the file:
\storage card\welcomehead.96.png
to:
\windows\welcomehead.96.png
on a WM5 device. I'm not interested in editing the rom.
I know it's possible to write a program that can copy the file, since both total commander for PPC can do it and MortScript can do it.
It does not work when using "file.copy" in visual basic. So i'm asking if anyone knows if there's an API function I can use to do it, or if there is some other way to do it.
"Cooking a new rom" is not an option for me. Because:
I want to be able to use whatever rom i want, and I am making a tool which i can run to do the following after a hard reset (or rom upgrade):
- copy files (typically shortcuts to progs intalled on the storage card, files in my documents etc.) from the storage card to the device
- set registry entries the way I want them
- install the cab files I want "automatically"
I've got it all sorted, except that it bombs when i try to copy the file "welcomehead.96.png" to the windows folder.
B
bredita said:
on2003 said:
Let me give you some hints:
1. You must edit ROM to change files.
2. Please go to URL
http://forum.xda-developers.com/viewtopic.php?t=34171
Click to expand...
Click to collapse
OK. I'll Rephrase my question:
I want to write a program to copy the file:
\storage card\welcomehead.96.png
to:
\windows\welcomehead.96.png
on a WM5 device. I'm not interested in editing the rom.
I know it's possible to write a program that can copy the file, since both total commander for PPC can do it and MortScript can do it.
It does not work when using "file.copy" in visual basic. So i'm asking if anyone knows if there's an API function I can use to do it, or if there is some other way to do it.
"Cooking a new rom" is not an option for me. Because:
I want to be able to use whatever rom i want, and I am making a tool which i can run to do the following after a hard reset (or rom upgrade):
- copy files (typically shortcuts to progs intalled on the storage card, files in my documents etc.) from the storage card to the device
- set registry entries the way I want them
- install the cab files I want "automatically"
I've got it all sorted, except that it bombs when i try to copy the file "welcomehead.96.png" to the windows folder.
B
Click to expand...
Click to collapse
You just have to overwrite the existing file...
1. Open the file
2. Write data
3. Close
Cheers,
.Fred
You just have to overwrite the existing file...
1. Open the file
2. Write data
3. Close
[/quote]
Thank you very much for your reply. I'll try that
B

Memory savings!!

UPX rules! This was mentioned off-handedly in a thread a day or so ago -- http://forum.xda-developers.com/viewtopic.php?t=51984 -- and it is simply amazing! It packs exe and dll files at about 1/3 the size, plus they run faster. More information here in Universal forum -- http://forum.xda-developers.com/viewtopic.php?t=49990&highlight=upx
Here is how I found it works.
1. Unzip the program on your desktop computer, someplace simple to find (like "c:\upx")
2. Copy the exe and dll files from your ppc over to your desktop into that same folder. (I backed up AND saved backup copies of the files before going on.)
3. Go to Run and type cmd to open a command window. Use cd to navigate to the folder ("cd .." until you get to root, then "cd upx" or whatever directory you used.)
4. type "upx some.exe --brute" and magically the file reduces size by about 2/3! Amazing! Same name as before but smaller.
5. Copy the new files back to your ppc, same folder as before.
NOTES:
1. You may have to stop a program before you can copy back (e.g., VoiceCommand) or disable if it's a Today plug-in (e.g., PocketBreeze).
2. Only do this with programs you installed. If you compact a program in ROM, you will save nothing.
That's it! I'm no uber-geek, so if I can do it, so can you. But I thought the step-by-step might be helpful to other mere mortals.
Looks cool, but I have 2 gigs storage space so I won't be running low anytime soon.
mattucd said:
Looks cool, but I have 2 gigs storage space so I won't be running low anytime soon.
Click to expand...
Click to collapse
Agree... I only did this with programs that I installed into main memory.
I am glad someone noticed my previous post! lol
I have pretty much all my exe's on my main memory and storage card compressed - but use upx compress your_program.exe command as file will open faster than with the brute command.
I use it to speed my device up and save memory - try it definite speed increases esp on the large files.
A word of warning though backup all you storage card and programs on main memory occ an exe or dll compression results in the file not working so has to be replaced with the original. (this happens more frequently with the dll's and thats why i decided to leave the dll compression well alone for now)
meschle said:
I am glad someone noticed my previous post! lol
... but use upx compress your_program.exe command as file will open faster than with the brute command.
Click to expand...
Click to collapse
Yeah, some people read all the way to the end of a thread.
Could you explain the exact syntax you use? Possibly:
upx --compress your_program.exe ?
Or what?
Yes ok if the program was called explorer.exe
From the command prompt: upx compress explorer.exe
simple as that 8)
LOVE THIS PROGRAM!!!! This thing works great! LuXx
wgary said:
I Agree... I only did this with programs that I installed into main memory.
Click to expand...
Click to collapse
Quick question...How can we move an EXE files under the windows programs in the main memory to the UPX ...\folder in the desktop computer?
leeky said:
wgary said:
I Agree... I only did this with programs that I installed into main memory.
Click to expand...
Click to collapse
Quick question...How can we move an EXE files under the windows programs in the main memory to the UPX ...\folder in the desktop computer?
Click to expand...
Click to collapse
In the ActiveSync on your PC, hit the Explore button with opens it into a File Explorer window. Then you can drill down to /Windows, copy the files, and paste them into the UPX folder. Don't forget to backup!
Also note improved syntax in previous post:
"upx compress program_name.exe"
leeky said:
wgary said:
I Agree... I only did this with programs that I installed into main memory.
Click to expand...
Click to collapse
Quick question...How can we move an EXE files under the windows programs in the main memory to the UPX ...\folder in the desktop computer?
Click to expand...
Click to collapse
In the ActiveSync on your PC, hit the Explore button with opens it into a File Explorer window. Then you can drill down to /Windows, copy the files, and paste them into the UPX folder. Don't forget to backup!
Also note improved syntax in previous post:
"upx compress program_name.exe"
wgary said:
In the ActiveSync on your PC, hit the Explore button with opens it into a File Explorer window. Then you can drill down to /Windows, copy the files, and paste them into the UPX folder. Don't forget to backup!
Also note improved syntax in previous post:
"upx compress program_name.exe"
Click to expand...
Click to collapse
I did as what you mentioned but it won't let me paste because of the write protect file system (the one under the my device\windows\......there are several EXE files I would like to compress it such as. excel.exe and camera.exe.....but no luck
leeky said:
wgary said:
In the ActiveSync on your PC, hit the Explore button with opens it into a File Explorer window. Then you can drill down to /Windows, copy the files, and paste them into the UPX folder. Don't forget to backup!
Also note improved syntax in previous post:
"upx compress program_name.exe"
Click to expand...
Click to collapse
I did as what you mentioned but it won't let me paste because of the write protect file system (the one under the my device\windows\......there are several EXE files I would like to compress it such as. excel.exe and camera.exe.....but no luck
Click to expand...
Click to collapse
Those are in ROM so this really won't help. Just works with apps you install.
I just used UPX on a whole load of programs and dll files and saved a whole chunk of space!
For users that have not given this a go yet, it is important to make a backup of the file you are about to compress! Even though they might compress successfully and still appear to run, you may encounter some oddities. For example, I just shrunk down the registry viewing/editing plugin for Resco Explorer and whilst I can still edit it etc I found that some of the dialog boxes are missing some caption text

real simple request for all developers out there...

So i fall a little short in developing, and was wondering if someone could make a quick exe... Here is what i am looking for: I need a simple exe to run off of my wm6 phone that will copy the file PalmMsgV001 from the Windows directory to my storage card in a folder with the current date.. to be more specific something like this:
copy \Windows\PalmMsgV001 to \Storage Card\Back_up\Palm_back\110807 (the date using the format 11/08/07)
Maybe you could make it customizable for other people as well... but im just looking for a quick exe to throw on my card that will make it real easy to back it up
shogunmark said:
So i fall a little short in developing, and was wondering if someone could make a quick exe... Here is what i am looking for: I need a simple exe to run off of my wm6 phone that will copy the file PalmMsgV001 from the Windows directory to my storage card in a folder with the current date.. to be more specific something like this:
copy \Windows\PalmMsgV001 to \Storage Card\Back_up\Palm_back\110807 (the date using the format 11/08/07)
Maybe you could make it customizable for other people as well... but im just looking for a quick exe to throw on my card that will make it real easy to back it up
Click to expand...
Click to collapse
And how much do you pay for it?
Here it is...
shogunmark said:
So i fall a little short in developing, and was wondering if someone could make a quick exe... Here is what i am looking for: I need a simple exe to run off of my wm6 phone that will copy the file PalmMsgV001 from the Windows directory to my storage card in a folder with the current date.. to be more specific something like this:
copy \Windows\PalmMsgV001 to \Storage Card\Back_up\Palm_back\110807 (the date using the format 11/08/07)
Maybe you could make it customizable for other people as well... but im just looking for a quick exe to throw on my card that will make it real easy to back it up
Click to expand...
Click to collapse
Here it is...
The applications is a command line application an works with 2 paramenters. 1º is the full path of the file or files patter that want to copy, in your case "\Windows\PalmMsgV001", other examples could be "\Test\log*" or "\*.txt". 2º is the full path of the destination directory without the date directory, in your case "\Storage Card\Back_up\Palm_back".
In the attached zip I include the application (CopyBackUp.exe) and the shortcut (.lnk) with the parameters required for your case ('CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back_up\Palm_back"').
Just extract the .exe to the root folder ("\") and the .lnk wherever you want (ie. "\Windows\Start Menu").
Any small donation would be appreciated.
Enjoy...
finthamoussu said:
Here it is...
The applications is a command line application an works with 2 paramenters. 1º is the full path of the file or files patter that want to copy, in your case "\Windows\PalmMsgV001", other examples could be "\Test\log*" or "\*.txt". 2º is the full path of the destination directory without the date directory, in your case "\Storage Card\Back_up\Palm_back".
In the attached zip I include the application (CopyBackUp.exe) and the shortcut (.lnk) with the parameters required for your case ('CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back_up\Palm_back"').
Just extract the .exe to the root folder ("\") and the .lnk wherever you want (ie. "\Windows\Start Menu").
Any small donation would be appreciated.
Enjoy...
Click to expand...
Click to collapse
This worked perfectly.. and am more than happy to kick you a small donation!!! pm me and let me know where to send it!
and also as i am looking at the shortcut, it appears that in theory you could make this little exe copy whatever you want, just would have to edit the short cut.. interesting...
shogunmark said:
and also as i am looking at the shortcut, it appears that in theory you could make this little exe copy whatever you want, just would have to edit the short cut.. interesting...
Click to expand...
Click to collapse
Yes, it tried to make it a bit more generic that what you were asking for, so maybe it could be usefull to somebody else
CopyBackUp V1.1
Attached is the new version of the application.
The changes are:
The first 2 parameters still being the same.
The next parameters are optional, and works as follow:
New commands:
·-kb[List of processes to Kill Before the backup is made]
Kills the specified list of processes before the backup
·-rb[List of processes to Run Before the backup is made]
Runs the specified list of processes after the backup
·-ka[List of processes to Kill After the backup is made]
Kills the specified list of processes before the backup
·-ra[List of processes to Run After the backup is made]
Runs the specified list of processes after the backup
·-noui
Runs the application without showing windows messages (only “Invalid Arguments” is showed)
These commands can be used multiple times, are case insensitive, and before backup commands and after backup commands are executed as they appears.
Sample:
copybackup.exe “/Directory with spaces/*.log” /Test –rb /test/test.exe /test2.exe –ka test2.exe –kb aaa.exe –NoUI –ra “/dir dir/bb.exe” –KA b.exe
This will
1.1. Run /test/test.exe
2.2. Run /test2.exe
3.3. Kill aaa.exe
4.4. Perform the backup of “/Directory with spaces/*.log” to /Test/[Date]
5.5. Kill test2.exe
6.6. Run “/dir dir/bb.exe”
7.7. Kill b.exe
All this without Windows UI messages
The application will fail only if some of the processes to run is not found, It won’t fail it some process to kill is not found.
Enjoy.
well i did find error.. maybe..
If i use:
\CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back up\Palmbackup"
Then it does as mentioned before...
If i manually kill messagingapp.exe first and use this then it works, it will copy the file and run the app:
\CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back up\Palmbackup" -ra messagingapp.exe
But if i leave messagingapp.exe running it will not kill it or copy the file, just throws up an error box that says "error":
\CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back up\Palmbackup" -kb messagingapp.exe
and i did verify that the process is running
shogunmark:
Are you sure that have extracted both files in the same directory?
This problem looks like copybackup.exe is not finding in the same directory OpenNETCF.dll.
This dll is needed when you use -kb or -ka, as is used to enumerate running processes.
I have made the test copybackup.exe /*.log /test -kb iexplore.exe and it works perfectly (Kills Internet Explorer before)
Can you cheek this?
Cheers
Hi finthamoussu,
Your application sounds really cool. I can appreciate the running processes fuctionality as that is a little bit tricky in .net. Good work!
Regards,
Slither2006.
I think this is a really useful app. Forgive my ignorance but where do you run the exe on the PC or on the device?
If on the device do we need to copy OpenNETCF.dll there as well? Which folder?
Thanks
gekkkko said:
I think this is a really useful app. Forgive my ignorance but where do you run the exe on the PC or on the device?
If on the device do we need to copy OpenNETCF.dll there as well? Which folder?
Thanks
Click to expand...
Click to collapse
Hi, you need to copy both files to the device (to any folder you want).
An to use it just call the exe with the parameters you need (look at previous post).
Enjoy

Simple and small Reboot/Soft-reset program

Heres a very simple and very small program I made with MortScript. I call it QuickReboot 1.0. It will ask you if you whant to soft-reset your phone. It works best if you map it to a hardware button, well, It does for me.
READ! VERY IMPORATANT HOW TO USE: Unzip the zip file and move the file "QuickReboot" to the My device folder (The root of your device) Then click on it. It will then make a shortcut to itslef in the programs folder. Then use it whenever you need to soft-reset. TO UNINSTALL IT: Open your file explorer and goto /Windows/start-menu/Programs and delete it from that folder. Then its completely gone from your device
IF YOU TAP ON THE FILE WHEN ITS NOT IN THE "My device" FOLDER, IT CANNOT MAKE A COPY TO "Programs" FOLDER!
Requirements: Mortscript 4.0
(You need MortScript 4.0 to use QuickReboot)
If you don't have mortScript 4.0 download here: http://www.sto-helit.de/downloads/mortscript/MortScript-4.0.zip
Free and NOT SPACE-TAKING
Cool, im gonna try it on my TP. thx
thanks and correction
first of all thanks! that's exactly what i was looking for.
second, i had to edit your code a little because the copying didnt work. your path was ".../start-menu/..." and should have been ".../start menu/..."

[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