MSCEInf version 2.1 (Update) - Windows Mobile Development and Hacking General

MSCEINf update is only for those who want to use the program in Command Mode for making batch tasks.
Contributions of version 2.1
· MSCEInf Version 2.1 adds ability to extract in command mode CAB files in a folder preserving subfolders names.
Syntax is a bit rigid with a keyword extract (separed by a space) after CAB name. This keyword allows creation of INF file and files extraction (with correct names) while preserving subfolders names.
A second parameter optional is folder name where to extract files. If omitted, folder name will be :
"c:\ExtractDir".
Program creates the folder if it does not exist.
For example write like here (do not forget to separe each parameters by a space and put path in double quotes) :
msceinf "C:\Users\Benoit\Documents\a.cab" extract​and files are extracted in folder "c:\ExtractDir".
or give folder name where to extract :
msceinf "C:\Users\Benoit\Documents\a.cab" extract "C:\Users\Benoit\Documents\My extracted files"​and files are extracted in folder "C:\Users\Benoit\Documents\My extracted files".
Link to the 6 localized versions (include english) : http://www.codeppc.com/telechargements/msceinf/msceinf.htm
.

WOW...great work benthon..it will become handy in making OEMS while cooking

Related

CrunchIT Method

A Type of COMPRESS EXTENDED ROM that uses the SelF eXtracting Archive (SFX), done thru a Zip Program(Pocket Rar, Winzip, or Winrar), Zip it then Make a SFX with Nsctech CrunchIT 5.0, then add the XdA2JoJo.v3.0.1t.CAB in config.txt to automatically execute the ExtROM.exe and extract the files to TEMP folder, the files will be executed by autorun and needed to specify the \TEMP\ as the path, after installing all program files, it will remove the cab files in the TEMP folder with wei's Fast Cleanup 1.3
.. for more details about the CrunchIT Method Click Here

CAB_merge

XDA - Merge CABs
[Sorry for my english]
Works OK on BlueAngel.
I have 18 CABs in \Extended_ROM. They occupies 11.468.528 bytes. They can be merged into single CAB. It's size is 9.284.964 bytes.
Requirements:
- perl on windows [it will not work on unix nor linux sorry]
- cabwiz from Micro$oft
- some basic knowledge if command line, perl and cabwiz
- thinking
- "WinCE CAB Manager" will be very usefull.
- CABs to merge
---------
How to?
---------
Create clean directory.
---------
Create subdirectory ( I'm using .\[SCRIPT] ) and put there files:
CAB_merge.pl
CeSetup.dll
CheckFile.exe
Setup.DLL
Setup.DLL, CeSetup.dll and CheckFile.exe you can extract from any CAB from the \Extended_ROM
---------
Extract your CABs. One CAB == one directory. Be careful with "WinCE CAB Manager" - you will probably get directory named "Customization Tools". Rename them.
The result should look this:
+--[SCRIPT]
+--Album_BlueAngelAKU26_Generic_WWE_RC20
| +--[INSTALLDIR]
| +--[START MENU]
| | \--[PROGRAMS]
| \--[WINDOWS]
+--Album_EnableStreaming
| +--Windows
| \--[INSTALLDIR]
+--BandSel_BAWWE_140921.sa
| +--Windows
| \--[INSTALLDIR]
etc.
Don't worry if you got subdirs like "Windows" and "[WINDOWS]". Doesn't matter.
Look at attached file example_Tree.txt. May be it can help.
---------
Look for directories named "Temp". Read corresponding ..\Windows\_MoveFileList.txt and move files to their original locations. For example: move Temp\_HTCCamera.dll into ..\Windows\_HTCCamera.dll. (!) Don't remove underlines from name.
---------
Try to find duplicates. Decide, which one is too old (look at the time stamps or file-version - rigt_click/properties/version). Don't delete the old one - simply rename and put '~' on the beginning of the name. For example ~Album.exe. Such files will be ignored. If you can't find duplicates - don't worry. CAB_merge.pl will show you.
---------
Find files, which are not needed. For example "WESTTEK Native Office
Viewers.ppt" or "WESTTEK-Product Info.pdf" from ClearVUE. Rename them - put ~'s on the beginning of the name.
---------
Look at *.LNK. They will be imported as shortcuts, not files. If you wish
to have LNK files - edit them. For example Abum.lnk containing string:
20#"\Windows\Album.exe"
put 999 instead of the number:
999#"\Windows\Album.exe"
You will have to modify LNK files, if target file does not exist within the CAB.
---------
Look for files CM_Entries.xml. If you dont have any CM_Entries.xml, skip this step. Probably the best version of CM_Entries.xml can be found in your XDA in the \windows directory. Rename all CM_Entries.xml to ~CM_Entries.xml - they will be ignored. Create directory .\My_CM_Entries\Windows and copy here
CM_Entries.xml from your device. Maybe wiki can help.
---------
Some rules:
Files:
[INSTALLDIR]\CeSetup.DLL
Setup.DLL
[WINDOWS]\CheckFile.exe
[WINDOWS]\Customize.lst
[WINDOWS]\_MoveFileList.txt
will be ignored.
Files:
~*.*
*.BAK
will be ignored.
Files
_*.*
will got destination \Temp and will be listed in [WINDOWS]\_MoveFileList.txt. CeSetup.DLL will move them into appropriate directories, even if they are in use or locked. You will have to reboot your XDA.
File
\Windows\Platformxxx.reg or
[WINDOWS]\Platformxxx.reg
will be imported
File
*.inf
Registry and shortcuts will be imported. Other sections - copyFiles, Version, CeDevice will be ignored
Files
*.lnk
will be imported if possible.
---------
Execute: perl [SCRIPT]\CAB_merge.pl.
If nothing fails - you will get BA.INF in the current directory. In some cases, you will get Customize.lst, Platformxxx.reg _MoveFileList.txt too.
Execute: Cabwiz BA.inf /err CabWizErr.txt /cpu arm
If nothing fails - you will get BA.arm.cab
Read file CabWizErr.txt - check all warnings.
Look at BA.arm.cab. Check everything.
If everything looks ok, copy BA.arm.cab into your device.
Reset the device.
Try to install BA.arm.cab
If you get any message, that fil cann't be copied - skip them, go back to your source files and rename file - add underline's at the beginning. Remake everything:
perl .\[SCRIPT]\CAB_merge.pl
Cabwiz BA.inf /err CabWizErr.txt /cpu arm
copy
restart
install
and so on.
If everything looks ok: modify CAB_merge.pl modify line
$main::cpFileFlag = 0x00000001;
to have
$main::cpFileFlag = 0x00000002;
and remake CAB:
perl .\[SCRIPT]\CAB_merge.pl
Cabwiz BA.inf /err CabWizErr.txt /cpu arm
Your CAB is ready. Replace source CABs from \Extended_ROM with reult of your effort. Remember to modify \Extended_ROM\config.txt.
Need customization? Look at the begining of CAB_merge.pl
Good luck.

Build Cab File of an app

Hey Guys!
How can i Build a cab for my programs in vs2005 or have i to use another tool to do this?
thanks SciLor
WinCe cab manager does the job.
its not free though.
but its worth it
isnt there another tool i can use?
look in the Visual studio's help file on making an installer..i cant remember now but i did create a cab once..btw which version of VS do u use
This is from My VS 2008 Pro Documentation
This section describes creating CAB files for distributing ATL and MFC controls over the Internet. If you need more information about CAB files, see the Cabinet File Reference in the Windows SDK documentation (in MSDN Library/Setup and System Administration/Setup/Setup API/Overview/Cabinet Files).
To create a CAB file:
Create an INF file.
Run the CABARC utility.
Creating an INF File
The INF file is a text file that specifies the files (such as DLLs or other OCXs) that need to be present or downloaded for your control to run. An INF file allows you to bundle all the needed files in one compressed CAB file. By default, files with the same version numbers as existing files on the user's hard disk will not be downloaded. For more information about INF files and their options, including how to create platform-independent INF files, see About INF Files and Using INF Files in the Windows SDK documentation (in MSDN Library/Setup and System Administration/Setup/Setup API/Overview/Setup Applications).
As an example, the following INF will be used to create a CAB file for the ATL Polygon control. You can build POLYGON.DLL by downloading the ATL POLYGON sample files from the Visual C++ CD and building a MinSize version. If you build a MinSize version of the Polygon control, you need one additional DLL, ATL.DLL. Since ATL.DLL needs to be registered before POLYGON.DLL, put the ATL.DLL first in the INF file:
Copy Code
; Sample INF file for POLYGON.DLL
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
polygon.dll=polygon.dll
atl.dll=atl.dll
; needed DLL
[atl.dll]
file-win32-x86=thiscab
FileVersion=2,00,0,7024
DestDir=11
RegisterServer=yes
[polygon.dll]
file-win32-x86=thiscab
clsid={4CBBC676-507F-11D0-B98B-000000000000}
FileVersion=1,0,0,1
RegisterServer=yes
; end of INF file
This INF specifies that ATL.DLL with the given version needs to be installed on the system. If ATL.DLL doesn't exist already on the system, it will be downloaded from the CAB file created with this INF. "thiscab" is a keyword meaning the CAB containing this INF. You can also download a needed DLL from an HTTP location by specifying an absolute or relative path, for example:
Copy Code
file-win32-x86=http://example.microsoft.com/mydir/NEEDED.DLL
The keyword "file-win32-x86" identifies the platform as x86 specific.
You can get the version number of a file by clicking the right mouse button on the file in Windows Explorer. Select Properties from the list that appears, then select the Version tab on the dialog box that appears. You will sometimes need to insert an extra 0 in the file version. For example, the version number for the ATL.DLL is shown as 2.00.7024 in the dialog box. This becomes 2, 00, 0, 7024 in the INF file.
The "DestDir" is where the directory where the file will be loaded: 11 specifies the system directory WINDOWS/SYSTEM or WINNT/SYSTEM32; 10 specifies the windows directory, WINDOWS or WINNT. If no DestDir is specified (typical case), code is installed in the fixed OCCACHE directory.
The "clsid" is the CLSID of the control to be installed.
Once you have created an INF file, run the CABARC utility (available in the Mssdk\Bin directory) to create the CAB file. You should run CABARC in the directory that contains your source files. On the command line, put the source files in the order they appear in the INF and the INF file last. For example, to make a CAB file for the Polygon control from the INF above, use the following command:
Copy Code
C:\MSSDK\BIN\CABARC -s 6144 POLYGON.CAB ATL.DLL POLYGON.DLL POLYGON.INF
The POLYGON.CAB file contains a compressed version of ATL.DLL and POLYGON.DLL along with the information needed to extract them in the POLYGON.INF file.
For an example of how to parse and extract component files from CAB files, see the CabView sample in the MSDN Online Code Center at http://msdn.microsoft.com/visualc/downloads/samples.asp (select the CabView link).
The DLL files you need to include with an MFC control are MSVCRT.DLL, MFC42.DLL, and OLEPRO32.DLL.
Running the CABARC Utility
The CABARC utility is available in the Mssdk\Bin directory. For example:
Copy Code
C:\MSSDK\BIN\CABARC -s 6144 n MYCTL.CAB NEEDED1.DLL NEEDED2.DLL MYCTL.OCX MYCTL.INF
CABARC creates a CAB file called MYCTL.CAB.
You should run CABARC in the directory that contains your source files (the INF, OCX, and DLL files). The files to be archived in the CAB file should be listed on the command line in the same order they are listed in the INF file. In the example above, the INF file should list NEEDED1.DLL first, then NEEDED2.DLL, and then MYCTL.OCX.
The -s option reserves space in the cabinet for code signing. The n command specifies that you want to create a CAB file. For a list of CABARC commands and options, type CABARC alone on the command line:
Copy Code
C:\MSSDK\BIN\CABARC
Click to expand...
Click to collapse
I found an older version of this online:
http://www.aperitto.com/content/view/14/159/
I have version 2.0 and it works great without registering the copy. Look into it
I can't find the original setup I used... sorry, I will keep looking... but I've heard good things about SPB's installatation creator
http://www.spbsoftwarehouse.com/products/ezsetup/index.html?en
It is easy with VS 2008 there you can create a CAB Builder

HOWTO: Get callstack for the threads in system calls - utilites

Hi!
There is utils for dump all threads call stack in application and for analyse it.
Dghsdb.exe – dump ulit. Use executable file name (name.exe) for command line parameter.
DumpParser.exe – run this util on desctop. Before it copy this util to directory with your winmobile app.
3 parameters:
1. Executable file name (name.exe or “name_part1 name_part2.exe”)
2. Dump file full path
3. Pdb file path (without file name).
DumpParser.exe name.exe c:\dump_file.txt D:\MyProject\Debug
See console for result

Issue - Files over-written when creating a ROM

When I'm cooking multiple applications in to my ROM, I have an issue where different applications have the same file name and over-write each other.
For instance,
when cooking in G-Alarm and Opera Mobile they both have image files called something like "nextbutton.png."
So it seems that one of them over writes the image file of the other, which results in one using the image file of the other.
Is there an easy way to fix this?
found the answer!
http://forum.xda-developers.com/showthread.php?t=530710
I don't know if anyone finds this interesting.. But if you are cooking in a lot of EXT packages, chances are you're going to over write several files with common names.. (they all get put in the \Windows\ directory..).
Heres a simple little solution:
(make a batch file and paste this in it)
::for /f "tokens=*" %%a in ('dir /b /a-d') do rename "%%a" "ab0_%%a"
for %%a in (*) do rename "%%a" "ab0_%%a"
Click to expand...
Click to collapse
Paste this in the files directory of your EXT package. It will add a prefix to your files.
Then simply edit the app.dat file in your EXT package with any text editor that has "search and replace" and search for "\Windows\" and replace with "\Windows\ab0_" where ab0 - is the prefix you added to your files.
You'll need to manually edit any lines where \Windows\ was in the destination path, and not the source path. Generally these are a couple lines at the end of your app.dat file.
Hope this helps someone else!

Categories

Resources