# การตั้งค่าขั้นสูงด้วยคำสั่ง ADB

#### ข้อกำหนดเบื้องต้น

* แล็ปท็อปและ Android TV ของคุณที่เชื่อมต่อกับ **เครือข่าย Wi‑Fi เดียวกัน**
* **ตัวเลือกสำหรับนักพัฒนา** เปิดใช้งานอยู่บนทีวีของคุณ
* **การดีบักแบบไร้สาย** เปิดใช้งานอยู่บนทีวีของคุณ

<details>

<summary>วิธีเปิดใช้งานตัวเลือกสำหรับนักพัฒนา</summary>

ไปที่ **การตั้งค่า** (ไอคอนรูปเฟือง) → **ระบบ** หรือ **เกี่ยวกับ** → ค้นหา **บิลด์ของ Android TV OS** หรือ **หมายเลขบิลด์** → คลิก 7 ถึง 8 ครั้งอย่างรวดเร็วจนกว่าคุณจะเห็น "ตอนนี้คุณเป็นนักพัฒนาแล้ว!"

</details>

<figure><img src="/files/7e8614dbf8f37087e000dcf9eb484bc63555cd7b" alt=""><figcaption></figcaption></figure>

#### ขั้นตอนที่ 1: เปิดใช้งานการดีบักแบบไร้สาย

1. ไปที่ **การตั้งค่า** → **ระบบ** → **ตัวเลือกสำหรับนักพัฒนา**
2. เปิดใช้งาน **การดีบักแบบไร้สาย**
3. จดบันทึก **ที่อยู่ IP, พอร์ต และรหัสจับคู่** ที่แสดงบนหน้าจอ

<figure><img src="/files/42c3ec6d584347ad3e4fac9a193f9301d97e18cf" alt=""><figcaption></figcaption></figure>

#### ขั้นตอนที่ 2: จับคู่แล็ปท็อปของคุณกับทีวี

เปิดเทอร์มินัลบนแล็ปท็อปของคุณแล้วรัน:

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

```bash
adb pair IP:PORT
```

{% endcode %}

ตัวอย่าง: `adb pair 192.168.1.130:37081`

ป้อนรหัสจับคู่เมื่อมีการแจ้งเตือน หลังจากจับคู่สำเร็จ ทีวีจะแสดงพอร์ตการเชื่อมต่อใหม่ (โดยปกติจะลงท้ายด้วย `:5555`).

#### ขั้นตอนที่ 3: เชื่อมต่อกับทีวี

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

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

{% endcode %}

ตัวอย่าง: `adb connect 192.168.1.50:5555`

#### ขั้นตอนที่ 4: ตั้งค่า Buzzblender เป็นโปรแกรมรักษาหน้าจอ

รันคำสั่งเหล่านี้เพื่อเปิดใช้งานโปรแกรมรักษาหน้าจอและตั้งค่า Buzzblender เป็นค่าเริ่มต้น:

{% 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 %}

แต่ละคำสั่งทำอะไร:

* `screensaver_enabled 1` — เปิดใช้งานโปรแกรมรักษาหน้าจอ
* `screensaver_activate_on_sleep 1` — เปิดใช้งานโปรแกรมรักษาหน้าจอเมื่ออุปกรณ์เข้าสู่โหมดพัก
* `sleep_timeout -1` — ปิดข้อจำกัดการหมดเวลาพักเครื่อง
* `screensaver_components com.buzzblender.tv/.playback.PlaybackDreamService` — ตั้งค่า Buzzblender เป็นโปรแกรมรักษาหน้าจอเริ่มต้น (นี่คือการตั้งค่าที่ Google นำออกจาก UI)
* `screen_off_timeout 30000` — ตั้งค่าให้หน้าจอปิดหลังจากไม่มีการใช้งาน 30 วินาที

#### ขั้นตอนที่ 5: ตรวจสอบการตั้งค่า

ปล่อยให้ Android TV ของคุณไม่มีการใช้งานเป็นเวลา 30 วินาที ตอนนี้ Buzzblender ควรแสดงเนื้อหาของคุณเป็นโปรแกรมรักษาหน้าจอแล้ว

ต้องการความช่วยเหลือในการตั้งค่า ADB ใช่ไหม? อีเมล <help@buzzblender.com> เพื่อนัดหมายการโทรตั้งค่ากับทีมสนับสนุน


---

# 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-th/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.
