[XAP] NTP Time Synchronization for interopunlocked Samsung phones

Search This thread

dada.81

Senior Member
Sep 18, 2007
56
10
Because my GSM network's automatic time is somehow set wrong, the set automatic time+date doesn't work for me, so this is a quite useful app for me, it can get various NTP server times and synchronize the phone's time and date to it.
It can currently sync with multiple NTP servers, I tried to add as many as I could find, although the default Russian NTP server one works fine most of the time.
Since another person did most of the programming, and not me, it will be updated if needed, but that update might not be immediate...please add any comments bellow...second post is reserved for change log descriptions. Feel free to add your insight, along with any comments, they're all valuable.
TIA

p.s.
As of yet this can't be published to windows phone store because it uses INTEROPSERVICES capability (among other things), if anything about that changes you will be notified immediately with the store link, also you'll be notified if this ever starts working on other manufacturer's phones....until then please make sure your phone is developer unlocked to deploy/sideload it...and that it is interopunlocked to work.

p.p.s.
Last, but not least, thanks to GDTD and dimoniche.
 

Attachments

  • Synchronize.xap
    270.7 KB · Views: 248
Last edited:

fadenfisch95

Senior Member
Mar 28, 2012
71
7
Freiburg
wow

I was somehow expecting some ugly but functional UI, but this certainly is awesome, and it works flawless!!

and the UI is well done!!
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Any chance you can post the source? There's a capability (not INTEROPSERVICES) that specifically enables setting the time; it might be better to use that instead.
 

sensboston

Recognized Developer
Nov 18, 2009
2,165
814
Boston, MA
Any chance you can post the source? There's a capability (not INTEROPSERVICES) that specifically enables setting the time; it might be better to use that instead.

Could you please provide this capability (for setting time)? I've tried to use kernel's SetSystemTime (with GetProcAddress trick) but it always returns 0 (i.e. BOOL FALSE).
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
You probably want ID_CAP_BUILTIN_SETTIME. Will probably require capability-unlock, but should let you use the Win32 APIs.

By the way, no need to mess with GetProcAddress. You can get the function prototype (from MSDN or from the header files) and link against the relevant library directly (may need to use DLL2LIB to extract the link library from the DLL).
 

sensboston

Recognized Developer
Nov 18, 2009
2,165
814
Boston, MA
You probably want ID_CAP_BUILTIN_SETTIME. Will probably require capability-unlock, but should let you use the Win32 APIs.

I've got a build error: Error 1 The 'Name' attribute is invalid - The value 'ID_CAP_BUILTIN_SETTIME' is invalid according to its datatype 'String' - The Enumeration constraint failed.

By the way, no need to mess with GetProcAddress. You can get the function prototype (from MSDN or from the header files) and link against the relevant library directly (may need to use DLL2LIB to extract the link library from the DLL).

App build by this way will never pass marketplace certification.
 
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Well, not any more than a third-party app using ID_CAP_INTEROPSERVICES (or, probably, ID_CAP_BUILTIN_SETTIME) would, no... Unless you have a reason to try and be sneaky about what the app is doing, I find my approach to be more readable and straightforward. However, it's true that if you're trying to pull a fast one, it probably won't work because the import will appear in the PE data and that's easy to find.
 

sensboston

Recognized Developer
Nov 18, 2009
2,165
814
Boston, MA
However, it's true that if you're trying to pull a fast one, it probably won't work because the import will appear in the PE data and that's easy to find.

Hmm... I believe we've already discussed how that stuff works (as far as I remember, I've sent you a source code). There is no imported function names in the import section, everything loaded dynamically (except one call). And - "yes" - it works perfect for store certification (just check current number of "volume controllers" at the store)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Because my GSM network's automatic time is somehow set wrong, the set automatic time+date doesn't work for me, so this is a quite useful app for me, it can get various NTP server times and synchronize the phone's time and date to it.
    It can currently sync with multiple NTP servers, I tried to add as many as I could find, although the default Russian NTP server one works fine most of the time.
    Since another person did most of the programming, and not me, it will be updated if needed, but that update might not be immediate...please add any comments bellow...second post is reserved for change log descriptions. Feel free to add your insight, along with any comments, they're all valuable.
    TIA

    p.s.
    As of yet this can't be published to windows phone store because it uses INTEROPSERVICES capability (among other things), if anything about that changes you will be notified immediately with the store link, also you'll be notified if this ever starts working on other manufacturer's phones....until then please make sure your phone is developer unlocked to deploy/sideload it...and that it is interopunlocked to work.

    p.p.s.
    Last, but not least, thanks to GDTD and dimoniche.