Android TV / Google TV provisioning via ADB when standard methods are blocked
Android
Some Android TV and Google TV devices block standard provisioning methods like afw#esper and the Esper Device Provisioner (EDP). If you're unable to provision your device through the normal channels, you can manually set the device owner using Android Debug Bridge (ADB).
Before you begin
Make sure you have:
- ADB enabled on your device. On your TV, go to Settings and tap the device IP address multiple times to enable ADB for 5 minutes.
- ADB installed on your computer. See Installing the Android Debug Bridge (ADB) Tool.
Step 1: Connect to your device via ADB
Open a terminal or command prompt on your computer and run:
adb connect <device-ip>:5555 Replace <device-ip> with your device's IP address (shown in Settings).
Step 2: Check for secondary user accounts
Run the following command to see all user accounts on the device:
adb shell pm list users You'll see output similar to:
Users:
UserInfo{0:Owner:4c13} running
UserInfo{10:new_user:1010} Device Owner can only be set if the only user account is the Owner (ID 0). Any secondary user accounts (ID ≠ 0) must be removed.
Step 3: Remove secondary user accounts
For each secondary user ID shown in the previous step, run:
adb shell pm remove-user <user-id> For example, if the secondary user ID is 10:
adb shell pm remove-user 10 You should see: Success: removed user
Step 4: Remove any active Google Account
On your TV, navigate to Settings and sign out of any active Google Account. Then verify it's removed by running:
adb shell dumpsys account Look for confirmation that no accounts remain. The output should show zero accounts for the Owner user.
Step 5: Set the device owner
Run the following command to set the Esper Esper Agent as the device owner:
adb shell dpm set-device-owner com.example.app/com.shoonyaos.shoonyadpc.receivers.AdminReceiver You should see: Success: Device owner set to...
Step 6: Re-add your Google Account (if needed)
If your TV requires a Google Account to function, sign back in on the TV UI.
Step 7: Verify provisioning
Check your Esper Console to confirm the device now appears under Devices & Groups with an active, provisioned status.
Troubleshooting
Command still fails after removing secondary users and Google Account:
- Run
adb shell dumpsys accountagain to check for additional accounts. All accounts across all users must be cleared.
ADB connection is refused:
- The 5-minute ADB window may have expired. Go back to Settings on your TV and tap the device IP address multiple times again to re-enable ADB.
Your device has a USB port:
- Try connecting via USB ADB instead of Wi-Fi ADB if the Wi-Fi method doesn't work.
OEM-specific restrictions:
Some TV manufacturers implement additional restrictions that may prevent Device Owner assignment. If the dpm set-device-owner command fails with an error specific to your device or OEM, gather the error output and your device model/firmware version before contacting support.
Important notes
- Android TV and Google TV devices are not officially validated by Esper. Provisioning behavior varies by manufacturer.
- Some TV devices create secondary user accounts automatically during setup. Always run
adb shell pm list usersbefore attempting Device Owner assignment. - Some devices require a Google Account to function after provisioning. Remove the account only for the provisioning step, then re-add it immediately after.
Still need help?
If you've followed these steps and your device still won't provision, contact Esper Support. Include the error message from the dpm set-device-owner command, your device model, and firmware version.
Please sign in to leave a comment.
Comments
0 comments