How to create a new test?
=========================

1.  Create a new directory like nokia_xyz/
2.  Copy test.c from another directory to this directory
3.  Modify it accordingly (e.g. name and syncml-ds-tool config)
4.  Sniff an appropriate communication from syncml-ds-tool

WARNING: Do not use a mobile which is in practical use for this.
WARNING: Why you MUST NOT do this?
WARNING: First you can compromize real person with such sniffed
WARNING: communication by publishing there contact data via
WARNING: synchronized vCards.
WARNING: Second you can forget to replace a real IMEI with a
WARNING: dummy IMEI like IMEI:123456789012345.

5.  Copy all (sent|received)-*.(xml|wbxml) file produced by SYNCML_LOG
    into the new directory.
6.  Check the XML files if there is any private data inside.
    If you find any private data then stop here and remove the
    complete directory and start again. This is critical to protect
    your and your contacts privacy.
7.  Replace your IMEI with IMEI:123456789012345 in all files.
    There are two ways how to do this:
    7.1. Sed - the easy way
        sed  -r -e "s/IMEI:[0-9]{15}/IMEI:123456789012345/g" \
          < received-1.wbxml > rec1.wbxml
        The small script remove_IMEI.sh can do this job for you.
        You have to call it in the directory where all the XML and
        WBXML files are.
    7.2. Manual - the hard way
        7.2.1. Edit all XML files and replace all IMEI:[0-9]{15} with
           IMEI:123456789012345. Every IMEI is 15 characters long.
           We do not validate the IMEI. Only the length is important.
        7.2.2. Edit all WBXML files and replace the IMEI. See above for
           an example. You can use hexedit for this.
             - khexedit *.wbxml
             - Edit --> Replace
                 Search:  Regular Text: IMEI:...
                 Replace: Regular Text: IMEI:123456789012345
8.  Run "grep IMEI:x" where x is the first digit of your IMEI.
    If grep finds a match then please remove all files and start from
    scratch. Privacy protection has priority.
9.  Edit CMakeLists.txt in tests/ and add your new test. Please see
    other ADD_MOBILE_TEST entries for an example.

That's it. If you have any further question then please contact us at
opensync-devel@lists.sf.net or IRC channel #opensync.

If you think this is too complicated then please send your dumps to us
and we will do this for you. This is the most secure way because we
check too that you don't try to publish your private data by accident.

2008-Sep-05
Michael Bell
