0

I was following guide mentioned here https://developers.google.com/zero-touch/guides/customer/emm#provision to prepare a JSON which then I can scan and enroll device to our MDM provider.

Here is my sample JSON

{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "sample-component-name",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "device admin signature",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "http://download/location/that.apk",
"android.app.extra.PROVISIONING_SKIP_ENCRYPTION": false, 
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": {
    "serverurl": "my-mdm.server.url", 
    "gid": "testGid", 
    "un":"testUn",
    "pw":"testPass"
},
"android.app.extra.PROVISIONING_WIFI_SSID": "wifi-ssid",
"android.app.extra.PROVISIONING_WIFI_PASSWORD": "correct-password",
"android.app.extra.PROVISIONING_WIFI_PROXY_HOST": "my-wifi.proxy.host.url",
"android.app.extra.PROVISIONING_WIFI_PROXY_PORT": "9999"
}

When I am converting this JSON to QR code and scanning device, it is able to switch wifi, but probably not able to configure Proxy. I am seeing wifi with no internet icon in notification bar. I cannot actually confirm whether proxy is configured or not because device gets stuck at Downloading the admin app screen.

However, when I tried with a wifi without proxy and it worked fine with that. Can somebody please tell me what am I doing wrong with proxy?

Device is running Android 7.0 Nougat.

Thanks

Community
  • 1
  • 1
c2tarun
  • 776
  • 2
  • 9
  • 27

1 Answers1

0

Sorry guys, https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#EXTRA_PROVISIONING_WIFI_PROXY_PORT link says that data type is String so I tried to use port number as string.

Changed it to integer and it works now.

c2tarun
  • 776
  • 2
  • 9
  • 27
  • How was the device able to get the config via zerotouch via internet if it can't get and doesn't know the wifi and proxy details? Or is it just QR? – Looka Jul 08 '20 at 16:30
  • 1
    Hey @Looka, this was quite a while ago but yeah we put all the information in QR code and scan the code when device starts. – c2tarun May 04 '21 at 17:18