Apa itu ADB?

Android Debug Bridge — tool command-line yang bikin PC bisa:

  • List device yang connected
  • Install / uninstall app
  • Shell command di phone
  • Transfer file
  • Port forwarding untuk mirror (scrcpy)

PhoneGrid bundle adb.exe sendiri di dalam installer. Kamu tidak perlu install Android SDK manual.

Enable USB Debugging di Phone

Android 7+ (standar Google):

  1. Settings → About phone
  2. Ketuk Build number 7 kali → akan muncul "You are now a developer!"
  3. Back → Settings → System → Developer options
  4. Enable USB debugging

Xiaomi/Redmi (MIUI):

  1. Settings → About phone
  2. Ketuk MIUI version 7 kali
  3. Settings → Additional settings → Developer options
  4. Enable USB debugging
  5. Enable USB debugging (Security settings) ← penting, ini beda dari USB debugging biasa
  6. Enable Install via USB (kalau ada)

Samsung (One UI):

  1. Settings → About phone → Software information
  2. Ketuk Build number 7 kali
  3. Back → Settings → Developer options
  4. Enable USB debugging

Oppo / Vivo / Realme (ColorOS / FuntouchOS):

  1. Settings → About phone → Version
  2. Ketuk Version number 7 kali
  3. Back → Settings → System Settings → Developer options
  4. Enable USB debugging
  5. Enable Disable permission monitoring kalau mau install APK via ADB

Connect via USB

  1. Enable USB debugging (lihat atas)
  2. Set USB mode ke File Transfer (MTP) atau PTP — jangan Charging only
  3. Colok kabel USB ke PC
  4. Phone akan minta konfirmasi "Allow USB debugging from this computer?" → centang Always allowOK
  5. Buka PhoneGrid desktop → device akan muncul di halaman Devices dalam 5-10 detik

Verifikasi lewat command line

Buka Command Prompt di PC, cek device terdetect:

adb devices

Output normal:

List of devices attached
ABCD1234   device

Status:

  • device = OK, siap dipakai
  • unauthorized = phone belum confirm USB debugging dialog
  • offline = disconnect, cabut-colok ulang

Driver USB (Windows)

Sebagian HP butuh driver OEM tambahan di Windows. Cek kalau adb devices tidak detect phone meski USB debugging enabled:

Brand Driver
Samsung Samsung USB Driver
Xiaomi Mi USB Driver
Oppo/Realme Oppo USB Driver
Huawei HiSuite
Google Pixel Sudah include di Windows 10+

Universal fallback: Koush Universal ADB Driver.

Common issues

Device muncul tapi status unauthorized

Phone pernah unlock fingerprint/pin baru muncul dialog authorization. Matikan-nyalakan layar phone.

Device sering disconnect

  • Ganti kabel USB — kabel charger only (no data) tidak bisa ADB. Pakai kabel bawaan atau bermerek.
  • Port USB 2.0 kadang lebih stabil dari USB 3.0
  • Disable USB selective suspend: Control Panel → Power Options → advanced → USB settings

adb devices kosong meski device colok

  • Kill adb server: adb kill-server && adb start-server
  • Restart PhoneGrid app (tray → Keluar → buka lagi)
  • Cek Device Manager → Other devices → apakah ada "ADB Interface" tanpa driver

Multi-device setup

USB hub powered (bukan passive) untuk 5+ device. Rekomendasi:

  • Anker 10-port USB 3.0 hub powered
  • Satechi USB-C hub 7-port

Avoid: passive hub, hub travel tanpa power adapter — 5+ phone akan narik >2.5A yang bikin disconnect random.