Probable way to force an OTA Update

Search This thread

Hagn99

New member
Feb 9, 2015
3
12
Hello,

I recently needed to force an update to my Chromecast but couldn't find any way how to do it.
I'm sorry if it has been already posted here but Google couldn't find anything about it.

Most of you probably know the HTTP interface to various Chromecast settings, but it seems like nobody has found the way how to force it to check for an update.
Normally you can request a restart by sending a POST message like this:
Code:
curl -X POST -H "Content-Type: application/json" -d '{"params": "now"}' http://<chromecastIp>:8008/setup/reboot -v

If you want it to actively check for an update and download it you have to send the following (notice the "ota foreground"):
Code:
curl -X POST -H "Content-Type: application/json" -d '{"params": "ota foreground"}' http://<chromecastIp>:8008/setup/reboot -v

attachment.php


If there's an update available it should shortly start to increase the percentage of the download, otherwise it will just stay at 0%.
The download itself took probably half an hour to complete for me.
When the download is finished it is necessary to force a reboot with the first command.

PS: That's where I found out about it: https://chromium.googlesource.com/c...st/+/master/server/cros/sonic_client_utils.py

Greetings

Hagn
 

Attachments

  • 2wbc2uyu25.jpg
    2wbc2uyu25.jpg
    73.2 KB · Views: 30,486
Last edited:

tharmor

Senior Member
Jun 18, 2013
911
178
Hello,

I recently needed to force an update to my Chromecast but couldn't find any way how to do it.
I'm sorry if it has been already posted here but Google couldn't find anything about it.

Most of you probably know the HTTP interface to various Chromecast settings, but it seems like nobody has found the way how to force it to check for an update.
Normally you can request a restart by sending a POST message like this:
Code:
curl -X POST -H "Content-Type: application/json" -d '{"params": "now"}' http://<chromecastIp>:8008/setup/reboot -v

If you want it to actively check for an update and download it you have to send the following (notice the "ota foreground"):
Code:
curl -X POST -H "Content-Type: application/json" -d '{"params": "ota foreground"}' http://<chromecastIp>:8008/setup/reboot -v

attachment.php


If there's an update available it should shortly start to increase the percentage of the download, otherwise it will just stay at 0%.
The download itself took probably half an hour to complete for me.
When the download is finished it is necessary to force a reboot with the first command.

PS: That's where I found out about it: https://chromium.googlesource.com/c...st/+/master/server/cros/sonic_client_utils.py

Greetings

Hagn

How do i run these commands ?
 

Hagn99

New member
Feb 9, 2015
3
12
How do i run these commands ?
You need some way to send HTTP POST requests with a body. My example uses the curl command which should be already available in most Linux environments.
Under Windows you need to download it first. You can find some precompiled binaries here: curl.haxx.se/download.html
 

CoolApps

Senior Member
May 12, 2011
3,386
611
Starting from line 199 has the commands for this, such as setting a OTA flag and update & factory reset.
 

VivaErBetis

Senior Member
Nov 26, 2006
1,157
926
Madrid (Spain)
Today I read that there were a new update for chromecast and test this method and it works like a charm. Upgraded from 26653 to 27946 at first try.

As stated in OP it takes a lot of time to download, and seems to be stuck at 100% but I don't need to manually reboot, I just wait several minutes and it was auto rebooted and everything was fine.

Code:
$ curl -X POST -H "Content-Type: application/json" -d '{"params": "ota foreground"}' http://192.168.1.15:8008/setup/reboot -v
* Hostname was NOT found in DNS cache
*   Trying 192.168.1.15...
* Connected to 192.168.1.15 (192.168.1.15) port 8008 (#0)
> POST /setup/reboot HTTP/1.1
> User-Agent: curl/7.37.1
> Host: 192.168.1.15:8008
> Accept: */*
> Content-Type: application/json
> Content-Length: 28
> 
* upload completely sent off: 28 out of 28 bytes
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers:Content-Type
< Cache-Control:no-cache
< Content-Length:0
< 
* Connection #0 to host 192.168.1.15 left intact
 
Last edited:
  • Like
Reactions: Hagn99

bozzykid

Senior Member
May 1, 2011
2,050
622
I'm having problems running this command. I always get a HTTP Bad Request error. Anyone know how to fix it?

Code:
curl -X POST -H "Content-Type: application/json" -d '{"params":"ota foreground"}' http://192.168.2.96:8008/setup/reboot -v
*   Trying 192.168.2.96...
* Connected to 192.168.2.96 (192.168.2.96) port 8008 (#0)
> POST /setup/reboot HTTP/1.1
> User-Agent: curl/7.41.0
> Host: 192.168.2.96:8008
> Accept: */*
> Content-Type: application/json
> Content-Length: 25
>
* upload completely sent off: 25 out of 25 bytes
< HTTP/1.1 400 Bad Request
< Access-Control-Allow-Headers:Content-Type
< Cache-Control:no-cache
< Content-Length:0
<
* Connection #0 to host 192.168.2.96 left intact
 

VivaErBetis

Senior Member
Nov 26, 2006
1,157
926
Madrid (Spain)
I'm having problems running this command. I always get a HTTP Bad Request error. Anyone know how to fix it?
In your curl execution it's only sending 25 bytes of data:
Code:
> Content-Length: 25
>
* upload completely sent off: 25 out of 25 bytes

In my execution it's sending 28 bytes of data:
Code:
> Content-Length: 28
> 
* upload completely sent off: 28 out of 28 bytes

There are 28 bytes in the command {"params": "ota foreground"}.

Firstly try the command with an space after ”params”:

If it doesn't work try to run it under bash (if you are using another shell).

The other difference is the curl version. I'm using 7.37.1 while you are using a newer one, 7.41.0.

Hope it helps.
 

vincentcox

Member
Mar 21, 2015
5
0
CURL Settings 720p

Hi there,

ontopic: Your commands run great :)
Just copy and paste in the mac terminal and it works. Of course change your Ip address ;)

a little bit oftopic:
Is it possible to set the output of the chromecast to 720p via curl POST?

If so, then this could be the end of my long search-trip on the internet :p

Kind regards,

Vincent
 
Last edited:

vincentcox

Member
Mar 21, 2015
5
0
not working anymore

Hi there,

Previously it worked, but now I can't update:
27946 -> May 8, 2015 (Cast SDK release 2.6.1)

Any ideas?
 

Hagn99

New member
Feb 9, 2015
3
12
Hi there,

Previously it worked, but now I can't update:
27946 -> May 8, 2015 (Cast SDK release 2.6.1)

Any ideas?

Are you sure there is any newer version than 27946? I don't know if the SDK is always directly linked to a Chromecast update.
My Chromecast is currently also at 27946 and the update screen comes up just like before. It just can't find any update.
 

herandy

Senior Member
Sep 6, 2010
184
64
Scottsdale
I'm having problems running this command. I always get a HTTP Bad Request error. Anyone know how to fix it?

Code:
curl -X POST -H "Content-Type: application/json" -d '{"params":"ota foreground"}' http://192.168.2.96:8008/setup/reboot -v
*   Trying 192.168.2.96...
* Connected to 192.168.2.96 (192.168.2.96) port 8008 (#0)
> POST /setup/reboot HTTP/1.1
> User-Agent: curl/7.41.0
> Host: 192.168.2.96:8008
> Accept: */*
> Content-Type: application/json
> Content-Length: 25
>
* upload completely sent off: 25 out of 25 bytes
< HTTP/1.1 400 Bad Request
< Access-Control-Allow-Headers:Content-Type
< Cache-Control:no-cache
< Content-Length:0
<
* Connection #0 to host 192.168.2.96 left intact
I had a problem just like this but fortunately I was able to fix it myself. I was using curl for windows and it gave me this exact error. You'll have to use cygwin with curl :D
 

theliquid

Senior Member
Jul 11, 2010
335
139
Vienna
I issued the command and it was stuck at 0%. But after a reboot I got the latest update (31432). So it seems to still work.
 

Droehnemeier

Senior Member
Oct 17, 2013
280
84
Isn't it easier to restart by chromecast-app? I do so... after reboot ota gets installed automaticly..

written in stone
 

MS_Dark

New member
Mar 9, 2011
1
0
chromecast die after force update

Hi ,
yesterday i test this command , its start from 34% after 100% just wait about 30 minute (to auto reboot), then i run force reboot command.
after reboot it's show installing 10% 20% .... 100% after reboot it goes to black screen,
i tried connecting it to power multiple times, when I do the light goes red light.
i try to factory reset by holding button about 25+ second but nothing happened,
When plugged into the TV all it ever shows is either a pure black screen, or a black screen with Chromecast ... at the bottom.

any solution :( ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Hello,

    I recently needed to force an update to my Chromecast but couldn't find any way how to do it.
    I'm sorry if it has been already posted here but Google couldn't find anything about it.

    Most of you probably know the HTTP interface to various Chromecast settings, but it seems like nobody has found the way how to force it to check for an update.
    Normally you can request a restart by sending a POST message like this:
    Code:
    curl -X POST -H "Content-Type: application/json" -d '{"params": "now"}' http://<chromecastIp>:8008/setup/reboot -v

    If you want it to actively check for an update and download it you have to send the following (notice the "ota foreground"):
    Code:
    curl -X POST -H "Content-Type: application/json" -d '{"params": "ota foreground"}' http://<chromecastIp>:8008/setup/reboot -v

    attachment.php


    If there's an update available it should shortly start to increase the percentage of the download, otherwise it will just stay at 0%.
    The download itself took probably half an hour to complete for me.
    When the download is finished it is necessary to force a reboot with the first command.

    PS: That's where I found out about it: https://chromium.googlesource.com/c...st/+/master/server/cros/sonic_client_utils.py

    Greetings

    Hagn
    4
    Is there a step by step on how to do this on a Windows computer?

    Install "Git for Windows" then use the "Git Bash" program that came with Git.
    Paste : curl -X POST -H "Content-Type: application/json" -d '{"params": "ota foreground"}' http://192.168.1.15:8008/setup/reboot -v
    but replace the 192.168.1.15 with the IP of your Chromecast.
    you should then see your Chromecast screen change to the update screen
    1
    Today I read that there were a new update for chromecast and test this method and it works like a charm. Upgraded from 26653 to 27946 at first try.

    As stated in OP it takes a lot of time to download, and seems to be stuck at 100% but I don't need to manually reboot, I just wait several minutes and it was auto rebooted and everything was fine.

    Code:
    $ curl -X POST -H "Content-Type: application/json" -d '{"params": "ota foreground"}' http://192.168.1.15:8008/setup/reboot -v
    * Hostname was NOT found in DNS cache
    *   Trying 192.168.1.15...
    * Connected to 192.168.1.15 (192.168.1.15) port 8008 (#0)
    > POST /setup/reboot HTTP/1.1
    > User-Agent: curl/7.37.1
    > Host: 192.168.1.15:8008
    > Accept: */*
    > Content-Type: application/json
    > Content-Length: 28
    > 
    * upload completely sent off: 28 out of 28 bytes
    < HTTP/1.1 200 OK
    < Access-Control-Allow-Headers:Content-Type
    < Cache-Control:no-cache
    < Content-Length:0
    < 
    * Connection #0 to host 192.168.1.15 left intact