Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,702 Members 45,456 Now Online
XDA Developers Android and Mobile Development Forum

[XAP] NTP Time Synchronization for interopunlocked Samsung phones

Tip us?
 
dada.81
Old
(Last edited by dada.81; 5th March 2014 at 08:39 PM.)
#1  
Member - OP
Thanks Meter 9
Posts: 53
Join Date: Sep 2007
Default [XAP] NTP Time Synchronization for interopunlocked Samsung phones

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.
Attached Files
File Type: xap Synchronize.xap - [Click for QR Code] (270.7 KB, 106 views)
The Following 6 Users Say Thank You to dada.81 For This Useful Post: [ Click to Expand ]
 
dada.81
Old
#2  
Member - OP
Thanks Meter 9
Posts: 53
Join Date: Sep 2007
post rsrvd
 
fadenfisch95
Old
#3  
Member
Thanks Meter 6
Posts: 62
Join Date: Mar 2012
Location: Rheinland Pfalz
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
Old
#4  
Recognized Developer
Thanks Meter 2,699
Posts: 5,682
Join Date: Jan 2011
Location: 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.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
 
sensboston
Old
#5  
Recognized Developer
Thanks Meter 425
Posts: 1,489
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by GoodDayToDie View Post
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
Old
#6  
Recognized Developer
Thanks Meter 2,699
Posts: 5,682
Join Date: Jan 2011
Location: 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).
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
 
sensboston
Old
(Last edited by sensboston; 10th March 2014 at 07:11 PM.)
#7  
Recognized Developer
Thanks Meter 425
Posts: 1,489
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by GoodDayToDie View Post
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.

Quote:
Originally Posted by GoodDayToDie View Post
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.
 
GoodDayToDie
Old
#8  
Recognized Developer
Thanks Meter 2,699
Posts: 5,682
Join Date: Jan 2011
Location: 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.
Win8/Windows RT projects:
List of desktop apps for hacked RT devices

WP8 projects:
Native Access WebServer and Libraries
WP8 Interop Unlocks
Storage Cleanup tool

WP7 projects:
XapHandler, Root Webserver, OEM Marketplace XAPs, Bookmarklets collection (Find On Page), Interop-unlock hacks.


Do not private message me with questions that should have been posted on the forum! Not only are you wasting your time - I'm not going to bother writing an answer to such a question for only one person - but I will probably block you from PMing me in the future as well.
 
sensboston
Old
#9  
Recognized Developer
Thanks Meter 425
Posts: 1,489
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by GoodDayToDie View Post
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)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes