All Projects → happyleavesaoc → Python Firetv

happyleavesaoc / Python Firetv

Licence: mit

Programming Languages

python
139335 projects - #7 most used programming language
python2
120 projects

Labels

Projects that are alternatives of or similar to Python Firetv

Airfrozengranter
AirFrozen
Stars: ✭ 52 (-63.38%)
Mutual labels:  adb
Adb root
Magisk Module that allows you to run "adb root".
Stars: ✭ 97 (-31.69%)
Mutual labels:  adb
Droidcast
An experimental demo for capturing and displaying screenshot of an Android device without ROOT permission.
Stars: ✭ 116 (-18.31%)
Mutual labels:  adb
Python Androidtv
Communicate with an Android TV or Fire TV device via ADB over a network.
Stars: ✭ 58 (-59.15%)
Mutual labels:  adb
Rootless Logcat
Android Logcat app without Root
Stars: ✭ 85 (-40.14%)
Mutual labels:  adb
Millionhero
速度快、准确易用-支持各平台的答题助手-图形界面-多权重答案推荐-自动百度高亮答案
Stars: ✭ 106 (-25.35%)
Mutual labels:  adb
Ghost
Ghost Framework is an Android post-exploitation framework that exploits the Android Debug Bridge to remotely access an Android device. Ghost Framework gives you the power and convenience of remote Android device administration.
Stars: ✭ 992 (+598.59%)
Mutual labels:  adb
Apk Utilities
🛠 Tools and scripts to manipulate Android APKs
Stars: ✭ 134 (-5.63%)
Mutual labels:  adb
Logcatch
android adb logcat viewer for Linux/Mac/Windows
Stars: ✭ 95 (-33.1%)
Mutual labels:  adb
Auto add wechat friends py
微信添加好友 批量发送添加请求 脚本 python
Stars: ✭ 112 (-21.13%)
Mutual labels:  adb
Hjmirror
Mirroring you droid device screen to Windows, MacOS and Linux.
Stars: ✭ 67 (-52.82%)
Mutual labels:  adb
Debloat Samsung Android
ADB commands to aggressively de-bloat Samsung Android Phones without root. Make Samsung One UI closer to stock Android.
Stars: ✭ 79 (-44.37%)
Mutual labels:  adb
Uber Adb Tools
A tool that enables advanced features through adb installing and uninstalling apps like wildcards and multi device support. Useful if you want to clean your test device from all company apks or install a lot of apks in one go. Written in Java so it should run on your platform.
Stars: ✭ 106 (-25.35%)
Mutual labels:  adb
Addon Adb
Android Debug Bridge - Home Assistant Community Add-ons
Stars: ✭ 58 (-59.15%)
Mutual labels:  adb
Phonesploit
A tool for remote ADB exploitation in Python3 for all Machines.
Stars: ✭ 122 (-14.08%)
Mutual labels:  adb
Android Dev Bookmarks
Android Dev Bookmarks(ADB) - Android 开发者的浏览器书签 For CN-Dev now | 历史更新文章戳这里:https://rocko.xyz/categories/Android-Dev-Bookmarks/ | 订阅: https://tinyletter.com/Rocko | 站点主页:
Stars: ✭ 1,041 (+633.1%)
Mutual labels:  adb
Adbserver
Adb Server for Espresso tests
Stars: ✭ 105 (-26.06%)
Mutual labels:  adb
Rogcat
A `adb logcat` wrapper
Stars: ✭ 137 (-3.52%)
Mutual labels:  adb
Adam
Coroutine-friendly Android Debug Bridge client written in Kotlin
Stars: ✭ 129 (-9.15%)
Mutual labels:  adb
Androidcontrol
超强群控,可以实时查看和控制安卓手机的安卓远程控制软件,致力于完成一个高端的安卓群控软件 可以群控,录制运行脚本等等功能......
Stars: ✭ 1,576 (+1009.86%)
Mutual labels:  adb

python-firetv

firetv is a Python 2 and 3 package that provides state information and some control of an Amazon Fire TV device over a network. This is achieved via ADB, so therefore requires ADB Debugging to be turned on. It includes firetv-server, an HTTP server to facilitate RESTful access to configured devices.

Installation

Install the package using the command:

pip install firetv

If you want the HTTP server component installed as a script, use:

pip install firetv[firetv-server]

NOTE: You may need to install the following ADB dependencies via your package manager:

  • with apt-get: swig libssl-dev python-dev libusb-1.0-0
  • with yum: swig openssl-devel python-devel libusbx-devel

Server

To run the server when installed as a script:

firetv-server

If you want to set a default Amazon Fire TV device:

firetv-server -d X.X.X.X:5555

If you want to run on a port other than 5556:

firetv-server -p XXXX

systemd

Copy the firetv.service file to /etc/systemd/system/. Modify the ExecStart path and arguments as necessary.

systemctl enable firetv.service  # Enable on boot
systemctl start firetv.service   # Start server
systemctl stop firetv.service    # Stop server

Persistence

To store multiple Amazon Fire TV devices persistent, you can load a yaml config file: firetv-server -c some/config/file.yaml

The config file has to be in the following format:

devices:
  sleepingroom:
    host: 192.168.0.13:5555
  livingroom:
    host: 192.168.0.16:5555

Note: If you use -d and -c option together you must not name one of the devices in config file default or give one of the devices the same host as in -d option.

Routes

All routes return JSON.

  • GET /devices/list (list all registered devices and state)
  • GET /devices/connect/<device_id> (force connection attempt)
  • GET /devices/state/<device_id> (return state)
  • GET /devices/action/<device_id>/<action_id> (request action)
  • GET /devices/<device_id>/apps/running (return running user apps)
  • GET /devices/<device_id>/apps/<app_id>/start (start an app)
  • GET /devices/<device_id>/apps/<app_id>/stop (stop an app)
  • GET /devices/<device_id>/apps/<app_id>/state (check app state)
  • GET /devices/<device_id>/apps/state/<app_id> (check app state, deprecated format)
  • POST /devices/add (see below)

Add A Device

If you use the -d option, the specified device is added automatically with the device identifier default. If you want to add further devices, or don't want to use the command line option for the initial device, use the POST /devices/add route. The device identifier can be any string meaningful to you, matching [-\w] (any alphanumeric character, plus -).

POST JSON in the following format with the HTTP header Content-Type: application/json:

{
  "device_id": "<your_device_id>",
  "host": "<address>:<port>"
}

Features

firetv can detect device state and issue a number of actions. It can also get the running state of user apps.

Detected States

  • off (TV screen is dark)
  • standby (standard UI is active - not apps)
  • idle (screen saver is active)
  • play (video is playing)
  • pause (video is paused)
  • disconnected (can't communicate with device)

Actions

  • turn_on (turn on the device, showing the UI on screen)
  • turn_off (turn off the device, screen goes dark)
  • home (emulate Home button)
  • media_play_pause (emulate Play/Pause button)
  • media_play (simulate Play button)
  • media_pause (simulate Pause button)
  • media_next (emulate Fast-Forward button)
  • media_previous (emulate Rewind button)
  • volume_up (raise volume)
  • volume_down (lower volume)

Apps

  • GET /devices/<device_id>/apps/running
  • /devices/<device_id>/apps/state/<app_id>
  • /devices/<device_id>/apps/<app_id>/state

app_id can be anything from a single word, e.g. 'netflix' or the full package name, e.g. com.netflix.ninja

You can start or stop an app with the following commands:

  • GET /devices/<device_id>/apps/<app_id>/start
  • GET /devices/<device_id>/apps/<app_id>/stop

app_id must be a package name, e.g. org.xbmc.kodi or com.netflix.ninja

Contribution

This package does not fully exploit the potential of ADB access to Amazon Fire TV devices, and lacks some robustness. Contributions are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].