# Caster - Roku Devs

This entire framework wanted to be built around Google and Roku devices in the same way the research paper was. This section will explain to you how you can go from controlling a Roku device to starting applications on the device!

> Note: A very interesting thing about this section is that it is byfar the largest section out of all of them. Now, this is where it also starts to get interesting. Roku has more commands due to the ease of abuse not just within their APIs but within protocols and systems like ECP (External Control Protocol) - that being said, this section will be designed a bit differently. **Instead of just giving you examples, we decided to just explain the commands in the list and link the YouTube video to this!**

## Caster - Roku Section

<figure><img src="https://3631540137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN446vsAcgRhUQmWQjww9%2Fuploads%2FRyw0EPB0Nf9Xcaj0bPoX%2FScreenshot%20at%202023-10-09%2010-01-01.png?alt=media&#x26;token=67247360-b53d-4d89-8301-ad6ef41d2631" alt=""><figcaption></figcaption></figure>

In order to explain this menu, each "sub point" will have its own unique section and will also be using some example screenshots.

### Roku - \`roku-remote\`

This command is actually pretty unique. Because we are able to abuse ECP on multiple devices at once, we can also revert the functionality of the protocol and use it for an **unofficial** remote for a RokuTV device!&#x20;

When you enter this command into the console, you are immediately thrown into the console where you can type "help" and get a list of commands. Below are the commands in basic.

* up -> Move the cursor on the TV up
* down -> Move the cursor on the TV down
* left -> Move the cursor on the TV left
* right -> Move the cursor on the TV right&#x20;
* back -> Go back from the most recent step you made
* home -> Go to the home screen
* options -> Will take you to the options screen
* vup -> volume up
* vdown -> volume down
* mute -> will mute the volume
* select/ok -> will mimic the 'ok' control on  the remote

> Note: It is important that you understand the server might return a `404` . This is because ECP is not universal on every single Roku device in the same state and there is no version detection system built into Caster for this `yet`

### Roku - \`roku-activeapp\`

For further manipulation of the device, say actually starting an application, you need to ensure that the application is off before turning it on. To do this, Caster has a command called `activeapp.`

This will get the current application from the Roku device and will also get you its state ( if there is one ).

### Roku - \`roku-getrawapps\`

There is another option in Caster for Roku devices called `roku-getapps` which will grab all the applications on the device by name. The issue? If you really want to shut down or start an application even go as far as installing one, you need the application ID.&#x20;

Sadly, due to formatting issues, the table can not grab the IDS of the applications when using the standard  `getapps`  . That being said, the current option `getrawapps` will directly grab and parse the raw XML response from the server with all current applications on the device.

> Note: Skipping `roku-getapps` is justified due to the fact that we pretty much covered what they both do in one section

### Roku  - \`roku-devinfo\`

This will simply just get the device information and print it in a wonderful table for you to use!

### Roku -  \`roku-dialinfo\`&#x20;

Similar to **devinfo**, this command will retrieve all of the SSDP/SCP dial information from the device's server. This can help with further enumeration of the device especially for endpoint discovery.

### Roku - \`roku-searchquery\`

This amazing command is quite funny but actually quite intuitive.&#x20;

When entering this command, you are allowed to type whatever you want and search it up on the device using the device's native search bar for applications, movies, shows, etc! The cool part about this is you can use some characters to actually slap some things in there that Roku does not like haha!

### Roku - \`startapp\`

If you saw the command to grab applications, this is where that will become helpful.

Basically, this command will start an application based on the unique ID that is given to it. Again, this is why using commands to grab application information on the device is important.

## `Other Unique Sides`

I felt that this section needed its own system. So, I just decided to film a few YouTube videos for you and get to working on that so you guys can watch it!

> **1 (Abusing Roku Devices With Caster):** <https://www.youtube.com/watch?v=Tye8FD7aAgM&list=PLjdGpZIIr-0gtGn8ERB1V53pXGzg9QBy-&index=2>

> **2 (Automating Roku KeyPresses With Files):** <https://www.youtube.com/watch?v=AHarr-wtxrc&list=PLjdGpZIIr-0gtGn8ERB1V53pXGzg9QBy-&index=3>

&#x20;
