Category filter

Grant Permissions for Hexnode Apps using Android Debug Bridge (ADB)

To grant system-level permissions to Hexnode MDM without manual user intervention, use the Android Debug Bridge (ADB). This is primarily required for permissions like Usage Stats, Write Settings, and Draw Over Other Apps on devices where the MDM cannot grant them automatically. The core command structure is:

Prerequisites

Before executing ADB commands, prepare the target Android device:

  1. Enable Developer Mode: Go to Settings > About phone > Software information. Tap on Build number 7 times.
  2. Enable USB Debugging: Go to Settings > Developer options and toggle on USB debugging.
  3. Setup Host Computer: Install ADB on your computer.
  4. Physical Connection: Connect the device to the PC via a high-quality USB cable.

Step 1: Install Hexnode and Assign Device Owner

  1. Download the Hexnode UEM app and place it in your computer’s ADB folder.
  2. Open Command Prompt (Windows) or Terminal (Mac/Linux) and navigate to the ADB folder.
  3. Start the ADB server:
  4. Connect the Android device to the computer via USB.
  5. Install the app:
  6. Set as Device Owner: This command grants Hexnode full control over the device.
  7. Note:


    If you only need to set the Hexnode UEM app as the Device Admin, use adb shell dpm set-active-admin com.hexnode.hexnodemdm/com.hexnode.mdm.receivers.HexnodeDeviceAdminReceiver instead).

Step 2: Grant Permissions via ADB

Once the app is installed, use the following commands to automatically grant necessary permissions.

Note:


The commands below use the package name com.hexnode.hexnodemdm. If you are using the Hexnode For Work app, replace this with com.hexnode.mdm.work.

  1. Enable Usage Access

    Allows Hexnode to track app usage data.

  2. Enable Draw Over Apps

    Required for kiosk mode and remote view features.

  3. Write System Settings

    Allows Hexnode to modify system configurations (e.g., brightness, volume).

  4. Notification Access

    Allows Hexnode to read or dismiss notifications.

    For Android 10 and above:

    For Android versions below 10:

  5. Allow App Installation

    Permissions to silently install enterprise apps.

  6. Disable Battery Optimization

    Ensures the Hexnode app runs in the background without being killed by the OS.

  7. Manage All Files (Android 11+)

    Grants full access to device storage.

Frequently Asked Questions (FAQs)

Q1: Can I use these commands for the “Hexnode For Work” app?

Yes. However, you must replace the package identifier in the commands.

  • Standard App: com.hexnode.hexnodemdm
  • Work App: com.hexnode.mdm.work

Example: adb shell appops set com.hexnode.mdm.work WRITE_SETTINGS allow

Q2: Will the user still need to manually grant any permissions?

Yes. Even after running these commands, the user may still need to manually grant permissions for App Logs and activate the Password Token inside the app to complete full enrollment.

Troubleshooting Common ADB Errors

If you encounter issues while running the commands above, refer to the specific errors below.

1. Error: device not found or unauthorized

Description: The computer cannot communicate with the Android device.

Possible Cause: USB Debugging is not enabled, the USB cable is faulty, or you haven’t accepted the RSA fingerprint prompt on the device screen.

Solution: Check Developer Options to ensure USB debugging is ON. Unplug and replug the device, and watch the phone screen to tap “Allow” on the “Allow USB debugging?” prompt.

Enrolling Devices