[App] Fake Time Server

Here are software that related with Samsung J series TVs.
Please don't create any new topic here unless you have software to post/release.
Post Reply

sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

[App] Fake Time Server

Post by sectroyer »

If you block internet access completely to your tizen tv you will block the ability for to get time from server. TV cat get time for user interface from EPG however it does NOT do that for console and other possible stuff also. Best way is to set up fake time server to have always accurate time in all places. Address of original time server is:
time.samsungcloudsolution.com
I suggest blocking all communication with this server and redirecting it to some local machine on which you have to be able to accept request:

Code: Select all

/openapi/timesync?client=TimeAgent/1.0 
You can use any language of your choosing to generate response to such request but I will post my PHP scripts.
On 32 bit system you can use:

Code: Select all

<?php
    $milliseconds = round(microtime(true) * 1000);
    $milliseconds1 = $milliseconds & 0xffffffff;
    $milliseconds2 = $milliseconds / 0x100000000;
    $mb_milliseconds = pack("LL", $milliseconds1,$milliseconds2);
    echo $mb_milliseconds;
    echo $mb_milliseconds;
?>
On 64 bit system it can be simplified to:

Code: Select all

<?php
    $milliseconds = round(microtime(true) * 1000);
    $mb_milliseconds = pack("QQ", $milliseconds,$milliseconds);
    echo $mb_milliseconds;
?>
If you decide to use Apache you will have to make it treat files without extension as PHP, you can achieve that by adding to your httpd.conf those lines:

Code: Select all

<Files *>
    ForceType application/x-httpd-php
</Files>
<Files *\.*>
    ForceType None
</Files>
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
racocvr
SamyGO Project Donor
Posts: 42
Joined: Sat Apr 04, 2015 2:15 pm

Re: [App] Fake Time Server

Post by racocvr »

Awesome!! Finally I fixed the youtube/webbrowser cert problems on my tv :D
I wish I had found this thread way earlier :D
setti
SamyGO Project Donor
Posts: 131
Joined: Sat Jan 07, 2012 11:32 am

Re: [App] Fake Time Server

Post by setti »

Do you know, how to call URL and set time manually from console?

OT: clock_settime() and settimeofday() and even builtin "date" fail with "Bad address", so I guess samsung uses something special.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Fake Time Server

Post by sectroyer »

setti wrote: Tue Jul 17, 2018 9:00 am Do you know, how to call URL and set time manually from console?
It's done AUTOMATICALLY, at least if you follow first post :) No command needed :lol:
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
setti
SamyGO Project Donor
Posts: 131
Joined: Sat Jan 07, 2012 11:32 am

Re: [App] Fake Time Server

Post by setti »

sectroyer wrote: Mon Aug 27, 2018 9:05 am
setti wrote: Tue Jul 17, 2018 9:00 am Do you know, how to call URL and set time manually from console?
It's done AUTOMATICALLY, at least if you follow first post :) No command needed :lol:
And without rebooting tv?
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Fake Time Server

Post by zoelechat »

Code: Select all

vconftool set -t int memory/menu/network/set_time 0 -f
systemctl restart vd-net-config.service
:ugeek:
I do NOT receive any PM. Please use forum.
ZGod
Posts: 82
Joined: Sat Mar 21, 2015 7:46 pm

Re: [App] Fake Time Server

Post by ZGod »

This fake time server also helps to keep the H series offline while thinking it's connected.

However some applications require not just

Code: Select all

/openapi/timesync
to work, but also

Code: Select all

/openapi/zipcode/timezoneoffset
The official source gives back a 203 with no data, I found a 200 works just as well.

Notably the Dutch NPO Start application will not run is this second URL is returning a 404.

Post Reply

Return to “[J] Software”