Enroll devices manually

Enroll devices manually


The instructions below are for installing Manager app on a device that doesn't support QR code based installation. The installation method requires technical knowledge of using Command Prompt and Shell scripting. 

Pre-requisites
  1. Remove all the Accounts on the device by going to Settings -> Accounts on the device
  2. Remove all Google accounts from the device from Settings -> Google Accounts / Accounts
  3. Take a backup in case you do not want to lose data from the device.
  4. Download and install Platform Tools from Android Developers website depending on Windows, Mac or Linux platforms

We recommend using a spare device before installing on many devices. There are always chances of failure given the nature of process


Installation Process
  1. Download the Latest Manager APK File from the Plugin Apps page and rename as io.fieldx.app.devices-release.apk
  2. Copy the Access code and Organization code from Enrollment Code page. They will be needed in the last step of configuring app
  3. Connect the device and enable USB Debugging for the device
  4. Execute following ADB commands one by one to install and configure the App. 
    1. adb install io.fieldx.app.devices-release.apk
    2. adb shell dpm set-device-owner io.fieldx.app.devices/io.droid.admin.DeviceAdminRx
    3. adb shell appops set io.fieldx.app.devices GET_USAGE_STATS allow
    4. adb shell pm grant io.fieldx.app.devices android.permission.WRITE_SECURE_SETTINGS
    5. adb shell dumpsys deviceidle whitelist +io.fieldx.app.devices
    6. adb shell cmd notification allow_listener io.fieldx.app.devices/io.fieldx.api.services.NotificationListener
    7. # Replace the ORG_CODE and ACCESS_CODE copied from the Enrollment Code page
    8. adb shell am broadcast --receiver-include-background -a io.app.CONFIGURE --es org ORG_CODE --es access ACCESS_CODE
    9. adb reboot

Command in "b" should show "success" message. If the second command fails, contact support with error message. 

If all the commands are successfully executed, the device should reboot and within 10 minutes, the device will show up in the FieldX Web Portal.

In case of large deployments in manual methods, create a script from the above commands and use "adb -s SERIAL" to push the APK to multiple devices at the same time.