pdf icon
Category Filter

Device Owner Provisioning using Android Debug Bridge (ADB)

This method is recommended for Device Owner provisioning only when the Android device cannot be provisioned using Near-Field Communication (NFC). This Android provisioning method can also be used for enrolling devices without Google Services as Device Owner (fully managed corporate device). As the name suggests this method uses Android Debug Bridge (or ADB) to provision devices as Device Owner and is applicable for devices running 5.0 or later versions.

Note: For a device to be successfully enrolled using ADB enrollment, the device shouldn't have a passcode configured manually. Post enrollment, even if the device had a passcode configured earlier and is now removed or if the device currently has a passcode configured, the inventory actions clear/reset passcode will fail. In this case, wipe the device and enroll the device again.

Steps for provisioning USB Debugging

These are the steps you should provision in the mobile device to configure ADB enrollment:

  1. Factory reset the mobile device to be managed, if it is already in use or boot up if it is a new device.
  2. Follow the on-screen instructions to configure basic device settings and ensure you do not have any Google account logged in or syncing any data.
  3. Go to Settings > About Device, and tap on the Build Number for 7 times to enable Developer mode.
  4. Now, navigate back to Settings and select Developer Options . Then enable USB debugging.

    ADB 1

  5. Click Allowto confirm the USB Debugging pop-up appearing on the device.

    ADB 2

  6. Again navigate back to Settings and select Security. Enable Install from unknown sources (only applicable for devices with OS version lesser than or equal to 7.1.1 )
  7. Now connect your device to the Mac machine or Windows machine which is used to configure ADB Enrollment.
  8. Enable the option Transferring files on the mobile device to which the USB is connected. Then, follow the "Device Owner Provosioning Tools installation steps" to complete the enrollment.

Device Owner Provisioning Tool Installation Steps

  1. In the machine download the Device Owner provisioning tool from the following link for Windows or Mac.

    Note: The Device Owner Provisioning file should be downloaded once every 2 months to get the updated app. The updated app can be pushed to new devices or be used for future enrollments.

  2. After downloading, extract all the files in the zip file to a location on your machine.
  3. Now open the Command prompt (for a windows device) or terminal (for a Mac device).
  4. Open the zip file folder in the command prompt/terminal and execute the command makedeviceowner.bat for windows or makedeviceowner.sh for Mac OS.
  5. The ME MDM app will be installed, and the Device owner profile will be configured after the successful execution of the command. If the execution is successful, you can see a success message in the command prompt as shown below:
    • For Windows:

      ADB  3

    • For Mac:

      ADB 4

  6. Ensure the Google Play app running on the device is the latest version. You can also update the Google Play app to the latest version.
  7. Now open the ME MDM app in the mobile device and Scan QR, by navigating to Enrollment -> Android -> QR Code Enrollment in the MDM web console. Once the QR code is scanned, the device will be listed under the EMM token enrollment view.
  8. You can then assign users to the enrolled devices either individually or in bulk using a CSV file, to complete enrollment.

Steps for provisioning wireless Debugging

If USB debugging is not an option, follow these steps to enable debugging via the Wireless Debugging method:

  1. Reset the device and ensure that both the device and PC are connected to the same Wi-Fi network.
  2. Ensure that no Google account is logged in or syncing data on the device.
  3. Navigate to Settings → Developer Options → Enable Wireless Debugging. When prompted with "Allow wireless debugging on this network?", select Allow.
  4. Open Command Prompt at the location where ADB is installed.
  5. In Command Prompt, enter the following command to connect ADB via the device’s IP address:

    adb connect <ip_address>:<port>

  6. On the device, go to Pair Device with Pairing Code under the Wireless Debugging option. In Command Prompt, enter the pairing command:

    adb pair <ip_address>:<port>

    Enter the pairing code displayed on the device when prompted.

  7. To install the MDM agent, use the following command:

    adb install MDMAndroidAgent.apk

  8. After installation, set the device as admin with this ADB command:

    adb shell dpm set-device-owner com.manageengine.mdm.android/com.manageengine.mdm.framework.deviceadmin.DeviceAdminMonitor

  9. Complete the enrollment by following Device Owner Provisioning Tool Installation Steps.

Troubleshooting tips

While trying to enroll a Xiaomi device, the command makedeviceowner.bat does not get executed and displays an error.

A few Xiaomi devices cannot be enrolled using ADB enrollment method if MIUI optimization is turned on. To enroll these devices, turn off MIUI optimization by navigating to Settings ->Build number. Tap on the build number 6 to 8 times to enable Developer options and disable MIUI optimization. Perform the above mentioned steps again to successfully enroll these devices.

While performing ADB enrolment, you may encounter the message "adb: device unauthorized," indicating that the USB debugging permission was not granted.

Steps to Resolve:

Allow USB Debugging: When the prompt "Allow USB debugging?" appears on the device, ensure to tap Allow.

Re-Trigger the USB Debugging Prompt: If the prompt was missed or the device still shows unauthorized, unplug the device and then plug it back in to trigger the prompt again.

By following these steps, you should be able to successfully complete the ADB enrolment process.

 

Jump To