Our device based on windows ce6.0. .net compact framework version 3.5.
App A: updateservice(write by c#,can work on .compact framework 3.5)
App B: updatemanager(console application write by c or c++, use wince6.0 api)
Inter communication method(msg queue)
use app A(A) download new app B(NB)update orignal app B(OB),and backup orignal app B(OB) to app B1(BB)
1. (A) access resetful services from a server to get (OB)'s RSA public key and signature of (OB)(sha1 hash encrypt by RSA private key)
2. Check (OB) is modified or [url removed, login to view] (OB) is original one,execute (OB).
3. Press "U" in (OB)'s console, (OB) use msg queue tell A enter update state.
4. (A) access restful services from a server to get the updatefile urls([url removed, login to view])or(https://[url removed, login to view]).
5. (A) accesss the server to get signature of [url removed, login to view](sha1 hash encrypt by the same RSA private key)
6. (A) check if the [url removed, login to view] is original one.([url removed, login to view] contains two files,(NB) and (NB)'s hash file(sha1))
7. (A) upcompress [url removed, login to view],use (NB)'s hash file to check if the (NB) is correct.
8. (A) send close msg to (NB).
9. When (NB) is closed,(A) backup (OB) to (BB),change (OB) folder to other name, and change (NB) folder names to the(OB).
10. (A) Run (NB),(NB) send msg to (A),to tell update successful.
11. After step [url removed, login to view] are two B(NB and BB),one A,and two B's signature on device.
12. (A) will track both(BB) and (NB),if press "P" in (NB),(A) will close (NB) and exchange folder name between (NB) and (BB),than start(BB).
13. if press "N" in (BB),(A) will close (BB) and exchange folder name between (NB) and (BB),then start(NB)
14. if press "U" in either (BB) and (NB), goto 1 to process new [url removed, login to view] delete the (B) which is not running after download and check the new (B).
1. (A) should send msg to (B) to show update state.ex. download progress,etc.
2. (A) always use the same path to start OB NB and BB.