Tech-Life Nirvana

SendReceiveAll : Utility for syncing all email accounts in Windows Mobile in one tap!

by Sumit Bhardwaj on Jul.27, 2009, under Cellphones & PDAs

How many times it happened to you, that you are on a limited data plan, have set those 6 email accounts of yours on manual update and then feel tired of clicking send/receive button every time you want to synchronize your mail? And that too 6 times? If you can relate with me, SendReceiveAll is the utility for you.

This small no-gui program when run, will sync all your email accounts without requiring any further action on your part. It needs .NET framework 3.5 installed on the device to work.

I wrote this utility in just 5 mins but it has got quiet a fan following on XDA developers thread : http://forum.xda-developers.com/showthread.php?t=501254

The utility can be downloaded from the same thread :)

2 Comments :, , , more...

Porting a Windows Mobile device XIP

by Sumit Bhardwaj on Jun.26, 2009, under Cellphones & PDAs

Hi Folks!

The first step to port a Windows Mobile ROM to a device is porting its XIP and making it compatible to the device we want to run it on. So here is one of the methods that i use for porting XIP.

Note: I call the XIP that came with the factory ROM of your device as Original XIP or Base XIP and the target xip that you want to port to your device as Donor XIP.

1. Dump both the xips using dumprom.exe, the version which is 32 kb in size.

2. Rename the folders as OriginalXIP, DonorXIP and create one more copy of the OriginalXIP folder as PortedXIP.

3. From Donor XIP, take the following files :

busenum.dll
cachefilt.dll
certmod.dll
coredll.dll
crypt32.dll
device.exe
devmgr.dll
diskcache.dll
fatfsd.dll
fatutil.dll
filesys.exe
fsdmgr.dll
fsreplxfilt.dll
imgfs.dll
initvmmap.exe
mencfilt.dll
mspart.dll
pm.dll
regenum.dll
723fb954-d931-4348-b672-82a188e587b5.dsm
723fb954-d931-4348-b672-82a188e587b5.rgu
d92a4f0a-378a-4482-8fd3-bd127a05e4de.dsm
boot_ms.rgu
mxip_lang.vol
sysroots.p7b

Delete these files and folders in the PortedXIP folder and copy the new versions from the Donor XIP folder. In this way, we replaced the Windows Mobile OS specific core files from new ones in our XIP. The rest of the files in the XIP are OEM/Device specific and are never changed.

In this way we have our PortedXIP folder ready with new OS. Now we need to adjust the addresses of the DLLs, which are in form of modules (the folders with .dll extension) in the XIP so that they can be read by the Gene Bootloader during OS boot. The Bootloader on the devices only reads these OS files from Specific addresses and these differ from phone to phone. So thats why we need to do this address relocation process.

4. Now we can delete the DonorXIP folder since its work is done. Open the OriginalXIP and PortedXIP folders, hold ctrl and click there window buttons on the taskbar to select both of them and then click “Show Windows Side by Side” or “Tile Vertically” command depending on your OS. The WIndows should be arranged half and half on screen.
One more utility that we need is mreloc.exe Open two instances of Mreloc and put in front of every window.

5. Click the “Choose Module” button in Mreloc in front of PortedXIP folder, browse to the PortedXIP folder and select the first module, ie. busenum.dll. Similarly in the second Mreloc window in front of OriginalXIP folder, browse to OriginalXIP folder and select the busenum.dll module.

Now every module has 2 addresses that are editable: “e32_vbase” in “e32″ section in mreloc and “o32_realaddr” in “o32 total” section. We have to take addresses from the OriginalXIP’s mreloc and copy these to the corrosponding textboxes in PortedXIP’s Mreloc and click the “Do It” button.

Now Mreloc is not well written so there is some catch. To copy you can simply right click on the text box and text will be selected automatically. Just click copy to copy address to clipboard. But even after copying the text, the Do It button wont enable. To enable it, go to any textbox in donor xip, which has different content then before, erase a character and retype it. This will enable the “Do It” button.

5. Repeat this process with all the modules to relocate them. This will complete the porting process.

6. Now to rebuilt this portedXIP folder into an xip.bin file, we need a few things. When you dumped the Original XIP, you will get a file called ROMHDR.bin, this is needed now. Apart from that we need buildxip.exe and .VM and .ROM folders from our Donor SYS.

7. Make a new folder with name “ROM” and put the PortedXIP folder, buildxip.exe as well as romhdr.bin inside it. Make another folder besides the ROM folder and call it “Dump”. Inside it create another folder called “Dump” and put the .VM and .ROM files in it.

8. We are ready, open a console (cmd.exe) and navigate to your ROM folder. Run buildxip.exe, it should run without errors and you will get a file named out.bin which can be renamed to xip.bin

Congratulations, you have just ported an XIP! This is now ready to be injected into a ROM to make it work on your device. :)

4 Comments :, , , more...

Troubleshooting Pen-Drive Viruses while working in Windows

by Sumit Bhardwaj on Aug.29, 2008, under Personal Computing

Hello Folks!

A lot of us use Windows for our day to day work and many of us are still using Windows XP on our systems for various personal reasons. One of the major nuisanses while working with Windows XP systems are the Pen Drive based viruses which are common today like salt and pepper in food :D . The payload of these can be as simple as some disabled settings of your computer just to annoy you or can be as serious as stealing data and formatting drives. Unfortunately, the mechanism they use is the Autorun facility of Windows because of which our CDs start running automatically on inserting. Since this mechanism is enabled, by default for all removable drives in Windows, so your USB keys are no exception.

The way this is done is by adding a small text file on the target drive called Autorun.inf. This file is present on all CDs, DVDs etc which autorun by themselves. Mostly this file contains 2 lines like this:

[autorun]
open=virus.exe

The .exe extension can also be replaced by .com, .bat, .cmd, .vbs and .js. All of these files are of executable nature, ie they can be run as a program. Some of the viruses also add menu entries in the right click menu of your USB drive which is also possible using entries in this file, but i wont go into details as its irrelevent here.

By default, if an autorun.inf file is present, the first entry in it is made the default item to run when the user double clicks on the drive’s icon. So even if autorun doesn’t runs, whenever the user double clicks the drive icon, the virus gets executed. Once its executed, it generally copies itself to the system areas and adds it to the autorun list of software and runs automatically at system start. These viruses also add them to the Desktop.ini file of folders which is used to keep customization settings for a folder. By doing that they enable themselves to launch even when any folder is double clicked.

Whew! So what we can do to prevent them? See, there are 3 things that everyone should do, specially after you clean install your system :

1. Download and install TweakUI utility from Microsoft.com and disable all kind of autorun options in it. More cautious users can also disable the displaying of Drive Letters above your CD/DVD ROMs in my computer. They can open their pen drives by directly entering its drive letter (which is almost always next to your last CD/DVDROMs drive letter ) into the address bar. You can also create a batch file with just one line in it :
start explorer.exe <driveletter>:

Replace <driveletter> with your USB drives’s drive letter.

2) You can make Windows prompt you each time for an action. To do this :
Right click on the Device then choose  Properties> Autoplay. Check the radio button which says “Prompt me each time to choose an action”. Done! This will stop Windows from blindly running <whatever>.

This is specially useful for people who cannot keep shift pressed while plugging in the device. (Like in case of a desktop in which the USB ports are at the back of the cabinet.

3) If you got a pen drive and wanna check out if its infected and to clean the virus:
   a) Hold shift while connecting the pen drive.

    b) Do not double click the icon of pen drive in my computer. Open it by entering its drive letter in the address bar.

    c)Enable hidden files and Protected Operating System files viewing from Tools-> Folder Options menu of Windows Explorer. You’ll find these settings on the second tab in the dialog box that opens.

    d)Now delete any file with the name autorun.inf and before deleting open it and see if it contains any filenames that end with .exe, .com , .bat, .cmd, .vbs and .js. If there are any names in the autorun.inf file then search for them and delete them too.

This should get your drive free from most of the pen drive based viruses. 

Happy Computing!

Leave a Comment :, , , , more...

The problem of Chkdsk (Checkdisk) running every time the system starts

by Sumit Bhardwaj on Aug.29, 2008, under Personal Computing

Hi Everybody,

Sometimes it happens that disk check always starts to check the file system on one or more drives for consistency. If any key is pressed, the disk checking is aborted. Actually this is because some data structure of the drive or some file is corrupted which can not be recovered and check disk is always run at Windows startup. Or sometimes it may take several hours for disk checking to scan all the drives.  Also, you may not be able to defragment your drive since its always marked dirty. So disabling it or postponing disk check is better. There are several methods to disable disk checking at Windows startup. Two of them are given below:

Method 1: Using CHKNTFS utility
————————————

CHKNTFS is a utility by Microsoft, available on Windows XP and Vista, that can be used to disable disk checking on certain drives at Windows startup. To use this utility go to Start –> Run –> cmd. (On Vista, use an admin console)

Now for example, If you want to disable check disk on C: drive, use the following command on command prompt:
chkntfs /X C:

If you want to disable check disk on two or more drives, just keep on adding the drives:
chkntfs /X C: D: E:

This will disable check disk on C, D and E drives.

If you want to restore what you have done, that is, enable automatic disk checking on all the drives again, just run the following command:
chkntfs /D

This will restore all the drives to automatic disk checkup.

Method 2: Using Registry
—————————-
To disable automatic disk checking at Windows startup through registry, go to the following registry key:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager

In the right hand pane, double click BootExecute.

The default value of the key is autocheck autochk *

* means every drive is checked for consistency. Just add /K:C at the end before *. /K switch will disable autocheck on C: drive at Windows startup. So the final value should look like this:
autocheck autochk /k:C *

If you want to add more drives, the key should look like this: (disabling C and D drives)
autocheck autochk *

This will solve your problem temporarily. However, The best advice i can give you is that, if possible, move your data to a different drive and then format this drive using quick format and then recopy data so that the disk’s data structures become consistent again.

And do not forget to re-enable chkdsk after you are done. Its there for your own good :)

Happy Computing!

Leave a Comment :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...