# Thiết lập nâng cao với lệnh ADB

#### Điều kiện cần

* Một laptop và Android TV của bạn được kết nối cùng **mạng Wi‑Fi**
* **Tùy chọn nhà phát triển** được bật trên TV của bạn
* **Gỡ lỗi không dây** được bật trên TV của bạn

<details>

<summary>Cách bật Tùy chọn nhà phát triển</summary>

Đi tới **Cài đặt** (biểu tượng bánh răng) → **Hệ thống** hoặc **Giới thiệu** → Tìm **bản dựng Android TV OS** hoặc **Số bản dựng** → Nhấn nhanh 7 đến 8 lần cho đến khi bạn thấy "Bạn đã là nhà phát triển!"

</details>

<figure><img src="/files/5dddeb5d1e18f75869f8c9175e5943e2d1ed46cf" alt=""><figcaption></figcaption></figure>

#### Bước 1: Bật Gỡ lỗi không dây

1. Đi tới **Cài đặt** → **Hệ thống** → **tùy chọn nhà phát triển**
2. Bật **Gỡ lỗi không dây**
3. Ghi lại **địa chỉ IP, cổng và mã ghép nối** hiển thị trên màn hình

<figure><img src="/files/ddbf604e826657b43d247aa1950df32f4f107f0a" alt=""><figcaption></figcaption></figure>

#### Bước 2: Ghép nối laptop của bạn với TV

Mở terminal trên laptop của bạn và chạy:

{% code lineNumbers="true" expandable="false" %}

```bash
adb pair IP:CỔNG
```

{% endcode %}

Ví dụ: `adb pair 192.168.1.130:37081`

Nhập mã ghép nối khi được nhắc. Sau khi ghép nối thành công, TV sẽ hiển thị một cổng kết nối mới (thường kết thúc bằng `:5555`).

#### Bước 3: Kết nối với TV

{% code lineNumbers="true" expandable="false" %}

```bash
adb connect IP:5555
```

{% endcode %}

Ví dụ: `adb connect 192.168.1.50:5555`

#### Bước 4: Đặt Buzzblender làm trình bảo vệ màn hình

Chạy các lệnh sau để bật trình bảo vệ màn hình và đặt Buzzblender làm mặc định:

{% code lineNumbers="true" expandable="false" %}

```bash
adb shell settings put secure screensaver_enabled 1
adb shell settings put secure screensaver_activate_on_sleep 1
adb shell settings put secure sleep_timeout -1
adb shell settings put secure screensaver_components com.buzzblender.tv/.playback.PlaybackDreamService
adb shell settings put system screen_off_timeout 30000
```

{% endcode %}

Mỗi lệnh làm gì:

* `screensaver_enabled 1` — Bật trình bảo vệ màn hình
* `screensaver_activate_on_sleep 1` — Kích hoạt trình bảo vệ màn hình khi thiết bị ngủ
* `sleep_timeout -1` — Tắt các giới hạn về thời gian chờ ngủ
* `screensaver_components com.buzzblender.tv/.playback.PlaybackDreamService` — Đặt Buzzblender làm trình bảo vệ màn hình mặc định (đây là cài đặt mà Google đã xóa khỏi giao diện người dùng)
* `screen_off_timeout 30000` — Đặt màn hình tắt sau 30 giây không hoạt động

#### Bước 5: Xác minh thiết lập

Để Android TV của bạn ở trạng thái nhàn rỗi trong 30 giây. Lúc này Buzzblender sẽ hiển thị nội dung của bạn làm trình bảo vệ màn hình.

Cần trợ giúp với thiết lập ADB? Gửi email <help@buzzblender.com> để lên lịch một cuộc gọi thiết lập với đội ngũ hỗ trợ.


---

# 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://buzzblender.gitbook.io/buzzblender-docs/docs-vi/thiet-lap-nang-cao-voi-lenh-adb.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.
