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):
- Settings → About phone
- Ketuk Build number 7 kali → akan muncul "You are now a developer!"
- Back → Settings → System → Developer options
- Enable USB debugging
Xiaomi/Redmi (MIUI):
- Settings → About phone
- Ketuk MIUI version 7 kali
- Settings → Additional settings → Developer options
- Enable USB debugging
- Enable USB debugging (Security settings) ← penting, ini beda dari USB debugging biasa
- Enable Install via USB (kalau ada)
Samsung (One UI):
- Settings → About phone → Software information
- Ketuk Build number 7 kali
- Back → Settings → Developer options
- Enable USB debugging
Oppo / Vivo / Realme (ColorOS / FuntouchOS):
- Settings → About phone → Version
- Ketuk Version number 7 kali
- Back → Settings → System Settings → Developer options
- Enable USB debugging
- Enable Disable permission monitoring kalau mau install APK via ADB
Connect via USB
- Enable USB debugging (lihat atas)
- Set USB mode ke File Transfer (MTP) atau PTP — jangan Charging only
- Colok kabel USB ke PC
- Phone akan minta konfirmasi "Allow USB debugging from this computer?" → centang Always allow → OK
- 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 dipakaiunauthorized= phone belum confirm USB debugging dialogoffline= 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.