Skip to content

Instantly share code, notes, and snippets.

@mouseos
Last active September 23, 2025 06:27
Show Gist options
  • Save mouseos/d1902a2caf79c93d143dc4d8bce848ca to your computer and use it in GitHub Desktop.
Save mouseos/d1902a2caf79c93d143dc4d8bce848ca to your computer and use it in GitHub Desktop.
HUAWEI m-remote api解析

Huawei TV Box API 一覧

  1. アプリケーション制御

アプリ起動

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=startapp
-H "App-Name: [パッケージ名]"

アプリ制御

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=app_control
-H "App: [アプリ名]"
-H "Type: [タイプ]"
-H "Info: [情報]"

アプリ情報取得

curl -X GET http://[IPアドレス]:8080/huawei-remote?cmd=app_info
-H "App: [アプリ名]"
-H "Type: [タイプ]"

  1. キー入力

キーイベント送信

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=key_event
-H "Key-Code: [キーコード]"
-H "Action: [アクション番号]"

  1. マウス・タッチ操作

相対マウスイベント

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=mouse_event
-H "X-Axis: [X座標]"
-H "Y-Axis: [Y座標]"
-H "Action: 2"

絶対マウスイベント(単一ポイント)

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=abs_mouse_event
-H "X-Abs-Axis: [X座標]"
-H "Y-Abs-Axis: [Y座標]"
-H "Action: [アクション番号]"

絶対マウスイベント(マルチタッチ)

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=abs_mouse_event
-H "X-Abs-Axis1: [X1座標]"
-H "Y-Abs-Axis1: [Y1座標]"
-H "X-Abs-Axis2: [X2座標]"
-H "Y-Abs-Axis2: [Y2座標]"
-H "Action: [アクション番号]"

  1. テキスト入力

テキスト入力

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=text_event
-H "Input-Mode: [入力モード]"
-H "Content-Type: text/parameters"
-d "[テキスト内容]"

テキスト取得

curl -X GET http://[IPアドレス]:8080/huawei-remote?cmd=text

  1. 音量制御

音量設定

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=volume
-H "Volume: [音量レベル]"

音量取得

curl -X GET http://[IPアドレス]:8080/huawei-remote?cmd=volume

  1. システム機能

ハートビート(接続維持)

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=heartbeat
-H "Live-Time: [時間]"

リバースチャンネル設定

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=reverse_channel
-H "Ip: [IPアドレス]"
-H "Port: [ポート番号]"

システム情報監視

curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=monitor_system_info

  1. APKインストール

APKインストール

curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: [ステージ]"
-d "[APKファイルデータ]"

ステージ

  1. begin - APKファイル転送の開始
  2. middle - APKファイル転送の途中(複数回に分けて送信する場合)
  3. end - APKファイル転送の終了
  4. full - 一度に全APKファイルを送信

使用例:

小さなAPKファイルを一度に送信

curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: full"
-H "Content-Length: [ファイルサイズ]"
--data-binary @app.apk

大きなAPKファイルを分割して送信

1. 開始

curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: begin"
-H "Content-Length: [チャンクサイズ]"
--data-binary @chunk1

2. 中間(必要に応じて複数回)

curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: middle"
-H "Content-Length: [チャンクサイズ]"
--data-binary @chunk2

3. 終了

curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: end"
-H "Content-Length: [チャンクサイズ]"
--data-binary @chunk3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment