> For the complete documentation index, see [llms.txt](https://titannet.gitbook.io/titan-network-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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).

# 安卓盒子安装教程

<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>](/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.md)
{% 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="/files/Fmz2rUv957wNi6EG4Z16" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/IKrfMNb2C7CjXCkMJJ31" 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 %}
