My patches of SynCE software

SynCE hackers issues and patches

SynCE installation and context

Revisions of this document: from April, 2006 to May 28, 2006.

You want to install SynCE? This is not the right page, this one may help you.


I will use upload to speak about network flows from the computer to the smartphone, and download for network flows from the smartphone to the computer.

My computer is configured on the « Europe/Paris » timezone (same thing for its BIOS clock), the smartphone uses the same timezone.

I will speak about the « 2418 » SVN-snapshot version of librra, and speak about patches against this version. In case the next release of the next SVN snapshot would be too different from this one to apply the patches, you can download the 2418 SVN snapshot.

Problems and solutions

Calendar appointment timestamps / accessing device timezone

Description of the problem

When creating an appointment on the smartphone, then downloading and importing the appointment into Evolution, the appointment timestamp is 9 hours early.

When running multisync or other programs that have to read the smartphone timezone (such as synce-registry or rra-timezone), there is an error message telling that it failed to get a registry value and fell back to the default timezone.

Technical explanations

When trying to open the registry key HKLM/Time/TimeZoneInformation, the software returns a default error message saying « Failed to get size of value ‘HKEY_LOCAL_MACHINE\Time\TimeZoneInformation’: Unknown error ». In fact, the « unknown error » is the error code 5. It means, as defined in « Winerror.h »: #define ERROR_ACCESS_DENIED 5L. In a WinCE documentation from Microsoft on MSDN, it is written that « Windows CE automatically assigns the key a default security descriptor » when creating new keys.

The « Time » key might have some security attributes different from the default ones. I have not found any information about other security attributes or how to specify any login/pass before reading the registry.

I have a « regedit.exe » provided by PHM (version 0.70) that runs locally on the smartphone and that si able to access the Time registry key and value. If needed, the software is also provided here.


The solution is temporary.
As the local timezone cannot be retrieved, the « librra/lib/registry.c » falls back to the default value, the « US Pacific » timezone.
With the « regedit.exe » software I mentionned, I have read the « Europe/Paris » timezone and have hardcoded it as the new default timezone.
I have made a patch written against the « 2418 » SVN-snapshot version of librra, available here.

Appointment notes

Description of the problem

When an appointment with notes is uploaded, in some cases it cannot be seen on the smartphone.

Technical explanations

The notes of a given appointment are stored in a blob structure that is built character by character, each one UTF8-encoded. This means that the structure of the blob is coded on 16 bits (2 bytes).
The smartphone seems to need a 32 bits structure (4 bytes).

When the size (number of characters) of the blob is odd, the next information in the appointment structure cannot be read. And the next information is… the timestamp of the appointment…
This can be seen by uploading an odd-size-blob appointment and then downloading it: the pieces of information concerning the date and time of this appointment have disappeared.


When the size (number of characters) of the blob is odd, the software automatically adds a character at the end of the stream, the ETX (End Of Text) one (character 0x03). So the size of the blob is even, the structure is coded on 32 bits and the appointment can be correctly read by the smartphone. The patch is included in « 2418 » SVN-snapshot version of librra.

Contact notes

Description of the problem

When inserting notes in the appropriate field of a contact on the smartphone, these notes are not synchronized on the computer.

Technical explanations

The blob structure in contacts is not synchronized between the computer and the smarphone. This structure is carefully ignored.


This behaviour has been modified in the « 2418 » SVN-snapshot version of librra. But it is still buggy: if the blob is a null-terminated string on the smartphone, the structure will not be synchronized and an error telling « Note is not an ASCII string » will be raised. Please apply this patch to correct this behaviour.

Special characters in contact notes

Description of the problem

A note created on the smartphone, and containing the « ; » character, will be downloaded but partially printed by Evolution: only the part of the note before the « ; » character will be displayed (but the whole data is stored).

Technical explanations




Laissez un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *