Page 1 of 4

STREAMING!!!!!!! *READ*

Posted: Sun Sep 09, 2012 10:51 am
by arris69
someone playing around with this "feature"?

(replace 192.168.1.50 with your tv's ip)
here you can fetch some "publickey" (crypted session key????)

Code: Select all

curl -H "Accept-Encoding: aes128" http://192.168.1.50:55001/connect
but es series (es8080) crashes if i try to start the CloneView:

Code: Select all

curl -D - -H 'SOAPACTION: "urn:samsung.com:service:MainTVAgent2:1#StartCloneView"' -H 'Content-Type: text/xml;charset="utf-8"' -d '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:StartCloneView xmlns:u="urn:samsung.com:service:MainTVAgent2:1"><ForcedFlag>Normal</ForcedFlag></u:StartCloneView></s:Body></s:Envelope>' http://192.168.1.50:7676/smp_8_
original request form galaxy s2 don't crash the tv but also not working....

Code: Select all

POST /smp_8_ HTTP/1.0
HOST: 192.168.1.50:7676
CONTENT-LENGTH: 273
CONTENT-TYPE: text/xml;charset="utf-8"
USER-AGENT: DLNADOC/1.50 SEC_HHP_GT-I9100/1.0
SOAPACTION: "urn:samsung.com:service:MainTVAgent2:1#StartCloneView"

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:StartCloneView xmlns:u
="urn:samsung.com:service:MainTVAgent2:1"><ForcedFlag>Normal</ForcedFlag></u:StartCloneView></s:Body></s:Envelope>
edit: sometimes get answer from tv:

Code: Select all

HTTP/1.1 200 OK
Content-Length: 338
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: UPnP/1.0
Connection: close

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:StartCloneViewResponse xmlns:u="urn:samsung.com:service:MainTVAgent2:1"><Result>NOTOK_InvalidDevice</Result></u:StartCloneViewResponse>
</s:Body>
</s:Envelope>
but think computer is correct authentifcated as described in viewtopic.php?f=12&t=1792 (its also visible in tv's allowed device list)
let me know if you have some hints.

thnx.
arris

Re: STREAMING!!!!!!! *READ*

Posted: Sat Sep 15, 2012 9:44 am
by arris69
arris69 wrote:...

can you pls. upload the captured data (full dump [tcpdump -s0] from start of the app until first media frame is shown on phone/tab)

thnx
arris
ok, figured out why my phone not had dualview, carrier branded firmware don't works had to flash the phone with dbt firmware -> got network traffic -> key formats identified -> maybe authentification and command sequence too (not 100% sure for now :-)).

primary goal:
need to get the authentification to turn on dualview without phone/tab
secondary goal:
decrypt the stream (or if possible start it unencrypted) from liveStream/1

Re: STREAMING!!!!!!! *READ*

Posted: Sun Sep 16, 2012 10:22 am
by SupportDenmark
ilkera wrote:well it seems to be a great application. why can't we use it on any Android device ?
Can only be used so far for Galaxy SII, Galaxy SII and Galaxy Tablet 5.0 wifi..
the p?roblem with larger screens as the tab 5.0 is rendering problem dual view..

One can just hope soon but Samsung hmm lol

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 1:41 pm
by nobody
arris69 wrote:
arris69 wrote:...

can you pls. upload the captured data (full dump [tcpdump -s0] from start of the app until first media frame is shown on phone/tab)

thnx
arris
ok, figured out why my phone not had dualview, carrier branded firmware don't works had to flash the phone with dbt firmware -> got network traffic -> key formats identified -> maybe authentification and command sequence too (not 100% sure for now :-)).

primary goal:
need to get the authentification to turn on dualview without phone/tab
secondary goal:
decrypt the stream (or if possible start it unencrypted) from liveStream/1
Could you please upload the captured data (full dump [tcpdump -s0] from start of the app until first media frame is shown ???

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 2:46 pm
by arris69
nobody wrote:...

Could you please upload the captured data (full dump [tcpdump -s0] from start of the app until first media frame is shown ???
problem children:
data in packs nr. 61 and 174 (phones pubkey modulus or something crypted/signed data????)
stream request (GET /liveStream/1) was betw. packs 245 and 246.

phone had adress 192.168.1.211 tv 192.168.1.50

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 3:29 pm
by nobody
hmm thanks... could you try that on a D8000 ?

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 3:41 pm
by arris69
nobody wrote:hmm thanks... could you try that on a D8000 ?
don't have d-series device, but if someone has phone/tab what supports dualview and a d-series tv, tcpdump is in the samygo rooting widget (extensions pack)

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 3:59 pm
by nobody
Hmm on my D8000 I keep getting NOTOK_InvalidDevice as response to StartCloneView :(

Also it seems some key exchange takes place:

mobile sends:

Code: Select all

GET /connect HTTP/1.1
Connection: interactive
Accept-Encoding:aes128
Tv answers:

Code: Select all

HTTP/1.1 210 PUBLICKEY
Date: Thu, 01 Jan 1970 00:30:56 GMT
Server: Samsung/1.0
Content-Type: text/html
Encoding: aes128
Content-Length: 138
Connection: close
Last-Modified: Thu, 01 Jan 1970 00:30:56 GMT
0.........K)........br..yQ...._..(...e.P.p.GF|-Og...fg.0f~....8.Y...R..>-by.K.......}37...GI.M\..'.f..Eo..........s........_..yx)..\; ....
Then Mobile sends:

Code: Select all

AES128KEY / HTTP/1.1
Connection: interactive
Key-Size: 128
....M...E..u.s.N.}...Rq.....:....P..t5..?Aek'd...
..^68GUT.mqa>v&..v...q..V..XJ<..4-.`......m......x{..q...+.}+J.>...0v.@O..Q...
IMHO, mobile sends something using the public session key. After that "authentication" everything should work.
To find out what it sends, we should reverse the android app.

Another chance is that they just exchange public keys.
That would be even better because we could generate an aes128 key locally and use the public key as the answer to the TV aes128 key.
So we could decrypt what the tv sends to us at a later time using the private key we have.

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 4:11 pm
by nobody
arris: what happens if you try the same I tried but without the connect?

Do you get the invalid device error too?

Re: STREAMING!!!!!!! *READ*

Posted: Thu Sep 20, 2012 4:53 pm
by arris69
nobody wrote:arris: what happens if you try the same I tried but without the connect?

Do you get the invalid device error too?
no, but tv shuts down. same as when i try to send smthing to port 50000 in paket 61, then tv shuts down after it serve pubkey in get connect