I was wondering if it was possible to upload the zip file of a channel to a roku device using a terminal. It seems like it should be possible because there is a plugin available for Eclipse, but my goal is to not use Eclipse if possible. Any help would be appreciated.
3 Answers
Why, yes - build & deploy to Roku device is quick and easy, so even a makefile feels like overdoing it. Here is a script i was using for Mac OSX:
#!/bin/bash
#ROKU_DEV_TARGET=192.168.1.25 # Roku 2XS
ROKU_DEV_TARGET=192.168.1.28 # put YOUR roku IP here
# wake up/interrupt Roku - workaround for fw5.4 crash
curl -sS -d '' http://$ROKU_DEV_TARGET:8060/keypress/Home
curl -sS -d '' http://$ROKU_DEV_TARGET:8060/keypress/Home
# build. zip _must_ change for Roku to accept re-deploy (grr!)
cd -- "$(dirname "$0")"
touch timestamp
zip -FS -9 -r bundle * -x run extras
# deploy
curl -f -sS --user rokudev:nuisance --anyauth -F "mysubmit=Install" -F "archive=@bundle.zip" -F "passwd=" http://$ROKU_DEV_TARGET/plugin_install \
| python -c 'import sys, re; print "\n".join(re.findall("<font color=\"red\">(.*?)</font>", sys.stdin.read(), re.DOTALL))'
I'd store it as a script file named run
(marked as executable with chmod +x run
; see https://stackoverflow.com/a/29710607/226086 for more, like "why not .sh", which was my initial inclination), so that can start it with double-click from Finder too. Or from TextWrangler with cmd-R, as was my case.
PS. i was not even copying the same run
file to every project but linking to it - but i forgot if it was soft-link or hard-link that worked with a newer TextWrangler.

- 28,347
- 6
- 48
- 67
-
1if you get 401 error should replace "nuisance" with your own password – Benjamin Jimenez Sep 06 '19 at 16:03
You can certainly use a terminal if your machine and the Roku are on the same wireless network.
- Enable Developer mode on your Roku, press: Home 3 times, Up 2, Right, Left, Right, Left, Right. That will bring up a developers screen where you can see your IP address and can set a password.
- In your ENV path (.bash_profile or whatever), create a ROKU_DEV_TARGET and USERPASS variable. Set the IP address of the Roku to the ROKU_DEV_TARGET and the password to USERPASS. make sure you reload your terminal window so these env variables are available. Test by typing
ECHO $ROKU_DEV_TARGET
and you should see your IP address there. - Next, you need a makefile. You can use the one provided by Roku. Download the Roku SDK and check out the examples/source/app.mk. You can see it uses the variables we've set above.
- Copy the app.mk file into your repo, then browse to that directory in your Terminal. run
make install
and it should be able to install to your roku.
NOTE: You may have to mess with the DISTREL, COMMONREL, SOURCEREL paths in the app.mk depending on the setup of your repo.
Helpful hint: in another terminal window, type telnet $ROKU_DEV_TARGET 8085
to see the console logging from the roku.
Good luck!

- 2,890
- 6
- 33
- 46
Roku might have changed authorization and uses Digest Auth now.
You need to pass various authorization headers for it work successfully.
You need to add Digest Username
, Realm
, nounce
, uri
, qop
, nc
, cnounce
and response
.
Script to upload a zip file to Roku -
curl -i -H 'Authorization:Digest username="...", realm="...", nonce="...", uri="/plugin_install", qop=auth, nc=, cnonce="", response="..."' --form archive=@example.zip --form "mysubmit=Install" "http://IP/plugin_install"

- 20,585
- 22
- 95
- 108

- 129
- 1
- 1
- 4