Skip to main content

Setting Up IPTV on an Android TV Box: A Developer's Walkthrough with ADB

Updated 7 min readMarkdown

By Frank Volkmar, setup and devices writer at IPTVZ. IPTVZ sells an IPTV service; the step-by-step guide for non-developers is our IPTV setup guide.

Typing a server URL, a username and a password with a TV remote is the slowest part of any IPTV setup. If you already have Android platform tools on your laptop, you can skip most of it. ADB (Android Debug Bridge) lets you install the player, type long strings into the TV, check the clock and grab screenshots, all from a terminal.

This walkthrough uses an Android TV or Google TV box, such as a Google TV Streamer, an onn 4K Pro or an NVIDIA Shield. If you're still choosing hardware, our comparison of the best device for IPTV covers RAM, storage and Ethernet ports.

What you need

  • An Android TV or Google TV box on the same network as your computer.
  • Android SDK Platform-Tools (adb) installed on your computer.
  • Your IPTV login: a server URL, a username and a password (Xtream Codes), or an M3U link.

Step 1: Turn on developer options and USB debugging

On the box:

  1. Open Settings > System > About.
  2. Select Android TV OS build about seven times, until it says you are a developer.
  3. Go back to Settings > System > Developer options and turn on USB debugging.
  4. Note the box's IP address under Settings > Network & Internet.

Menu names vary a little between brands. On the NVIDIA Shield, there is also a Network debugging switch in Developer options.

Step 2: Connect over the network

On most Android TV and Google TV boxes, USB debugging also allows ADB over the network on port 5555:

adb connect 192.168.1.50:5555
adb devices

The first time, the TV shows an Allow USB debugging? prompt. Tick "Always allow from this computer" and select Allow. adb devices should then list the box as device, not unauthorized.

Some newer devices use Wireless debugging with a pairing code instead. Then you run adb pair with the IP, port and code the TV shows, followed by adb connect.

Step 3: Install the player

The safest way is still Google Play on the box itself. TiviMate (developer Armobsoft FZE), Smarters Pro (Tech Smarters) and XCIPTV (OTTRUN) are all there, and Play handles updates. Check the developer name, because look-alike apps are common.

If you have an APK straight from the app developer's website, ADB installs it in one command:

adb install -r player.apk

-r reinstalls over an existing version and keeps its data. To confirm what's installed, list the third-party packages:

adb shell pm list packages -3

A note on sideloading: Google is starting to require that apps on certified Android devices come from registered developers. It starts on September 30, 2026 in Brazil, Indonesia, Singapore and Thailand, with a worldwide rollout planned from 2027 (Android developer verification). Apps from Google Play already meet the rule, which is one more reason to install from there first.

Step 4: Type the login from your keyboard

This is the part that saves the most time. Open the player and go to its login screen:

  • TiviMate: Add playlist, then Xtream Codes.
  • Smarters Pro: add a new user and choose Xtream Codes (some versions say Xtream Codes API).
  • XCIPTV: the sign-in screen asks for the username, password and server URL.

Select the first field with the remote, then send the text from your computer:

adb shell "input text 'YOUR_USERNAME'"

Move to the next field with the remote (or adb shell input keyevent 61, the Tab key) and repeat for the password and the server URL. Two things to know about input text:

  • A space has to be sent as %s. Credentials rarely contain spaces, but some playlist names do.
  • Characters like &, ? and $ mean something to the shell, and the command passes through two shells (yours and the TV's). Keep the double quotes outside and the single quotes inside, as above, so the value arrives unchanged.

Enter the server URL exactly as your welcome email shows it, including http:// and the port number if there is one. Usernames and passwords are case-sensitive. Most login errors come from one wrong character or a stray space, and pasting from the email avoids both.

Prefer Xtream Codes over an M3U link when the player offers both. Xtream Codes loads live channels, movies, series and the TV guide in one step. An M3U link loads only the channels, and the guide then needs a separate EPG link.

Step 5: Check the clock before you blame the guide

If the TV guide is a few hours off, the cause is almost always the device's clock or time zone, not the guide data. You can check both from the terminal:

adb shell date
adb shell settings get global auto_time
adb shell getprop persist.sys.timezone

auto_time should return 1 (automatic time). If the time zone is wrong, fix it under Settings > System > Date & time, then refresh the EPG in the player. In TiviMate that's Settings > EPG > Update EPG. The first guide load takes about 5 to 15 minutes with the app open.

Most buffering on Android TV boxes comes from the Wi-Fi link between the box and the router, not the stream. To see which interface the box is actually using:

adb shell ip addr show eth0
adb shell ip addr show wlan0

If eth0 has no address, the box is on Wi-Fi. A cable is the single biggest fix: the Google TV Streamer, the onn 4K Pro and the Shield all have an Ethernet port. On Wi-Fi, use 5 GHz and keep the router within a room or two of the TV. As a rule of thumb, plan on about 15 Mbps per HD stream and 25 Mbps or more for 4K.

If you want to measure the stream itself, I wrote a separate post on debugging IPTV buffering with ffprobe, curl and Python.

Step 7: Grab a screenshot for support

When something goes wrong, a screenshot of the error tells support more than a description. ADB can save one straight to your computer:

adb exec-out screencap -p > tv-error.png

Send that along with your username (never your password), the device model and the player app.

Step 8: Disconnect and switch debugging off

When you're done:

adb disconnect 192.168.1.50:5555

Then turn USB debugging off again in Developer options. Leaving network ADB on means anyone on your network could try to connect to the box.

The quick version

adb connect 192.168.1.50:5555      # accept the prompt on the TV
adb install -r player.apk          # only if the player isn't on Google Play
adb shell "input text 'YOUR_USERNAME'"
adb shell "input text 'YOUR_PASSWORD'"
adb shell "input text 'http://your-server-url:port'"
adb shell date                     # if the guide times look wrong
adb exec-out screencap -p > tv-error.png
adb disconnect 192.168.1.50:5555

None of this is required, because the same steps work with a remote and patience. But if you set up boxes for family and friends, ADB saves most of that typing. For the remote-only route on every device, see the IPTVZ setup guide. If you want to test a lineup on your own box first, the IPTVZ free trial needs no credit card and runs until midnight Amsterdam time.

About the author

  • IPTVZ is a US live TV streaming service. We write practical guides on streaming devices, player apps, EPG data and fixing buffering. More guides at https://www.iptvz.net/

No comments yet. Be the first to comment.