# 安卓盒子安装教程

<mark style="color:red;">**请注意: 需要有root权限**</mark>

{% hint style="success" %}
高收益攻略：

1. 新上机的节点有3-7天部署期，请耐心等待，之后收益将逐渐稳定。
2. 请保持设备24小时在线，尤其是晚高峰（18:00-24:00）时段。
3. 请确保节点的Agent状态和服务状态均为正常，若出现异常请及时联系客服。

[<mark style="color:blue;">→点击查看更多攻略</mark>](https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/chang-jian-wen-ti/xin-jie-dian-shang-ji-gong-le-cong-cheng-gong-yun-xing-dao-shou-yi-ti-sheng)
{% endhint %}

{% stepper %}
{% step %}

## 准备工作

* 在电脑上准备 ADB 工具
  * Windows：下载并安装 Android SDK Platform Tools
  * 确保已将 adb 添加到系统环境变量
* 下载 Titan Agent

  * 在电脑上下载：

  <https://pcdn.titannet.io/test4/bin/agent-android.zip>

{% endstep %}

{% step %}

## 获取Key

1. 打开浏览器访问：

{% embed url="<https://test4.titannet.io>" %}

2. 登录您的Titan账户
3. 找到并复制您的密钥（Key）

<figure><img src="https://3822791205-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrZQtAKIIsvAQP0E9RumD%2Fuploads%2FOUd7mpGJG2sBXns1UIEC%2Fimage.png?alt=media&#x26;token=470f4ff5-38d3-4422-a2b5-2a3802a6f80c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3822791205-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrZQtAKIIsvAQP0E9RumD%2Fuploads%2FPeRccf0C0ujPkYTGBxft%2Fimage.png?alt=media&#x26;token=b95a117d-2fee-47e9-b60e-88a125f5b61f" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

## 安装步骤

1. 连接设备

```bash
# 通过 USB 连接安卓盒子
# 检查设备连接状态
adb devices

# 进入 adb shell
adb shell

# 获取 root 权限
su
```

2. 传输文件

```bash
# 将文件从电脑传输到安卓盒子
adb push agent-android.zip /sdcard/Download/

# 在 adb shell 中创建目录并解压
mkdir -p /data/.titannet
cp /sdcard/Download/agent-android.zip /data/.titannet/
cd /data/.titannet
unzip agent-android.zip
```

3. 设置权限

```bash
# 设置可执行权限
chmod +x /data/.titannet/agent
```

4. 后台启动Titan Agent

```bash
# 使用 nohup 命令实现后台运行
nohup /data/.titannet/agent --working-dir=/data/.titannet \
                           --server-url=https://test4-api.titannet.io \
                           --key=YOUR_KEY_HERE > /dev/null 2>&1 &

# 验证进程是否在运行
ps | grep agent
```

如果需要停止 Agent：

```bash
# 查找进程 ID
ps | grep agent

# 停止进程
kill <进程ID>

```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/titan-agent-an-zhuang-jiao-cheng/android-she-bei-yi-dong-duan-an-zhuang/an-zhuo-he-zi-an-zhuang-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
