Photon setup on Android fails at "Verify device ownership" as product when setup by customer

When attempting to setup a Photon device on Android in product mode, device fails at “Verify device ownership”

I have been unable to find the solution through similarly titles threads.


The product has been configured in the console to flash on setup.

When setting up a new device on an Android as a customer, it fails at “Verify device ownership” then breaths cyan. This leads me to believe that it is connected to WiFi with the tinker app still flashed.

If I flash my firmware to the device via USB first, it still fails at the same step, except afterward it goes to my flashed code. Local functionality works (LED is off, and the button attached to a pin operates the servo it’s supposed to). The device shows up in the console under devices without a name but owned by the customers email.

Here’s the fun part.

Once a device has been “claimed” via the method above, it can be manually placed into listening mode then when setup via the Android app it sets up correctly except with the "this device has been owned by another user. Change owner to"

So it appears to need to be claimed before it can be setup properly via the Android app. Does anyone have any ideas how I can get a device to flash upon setup correctly?

cloudsdk version 0.4.5
device setup version 0.4.6

You don’t need to claim a device before setting it up when using simple auth and the Android SDK.

  • Make sure you have added the device ID to the devices tab in your product first. Otherwise, the device will enter quarantine instead of being added to the product, and claiming will fail. (You can also change the setting to automatically approve devices, but it’s more secure to add the device IDs.)

  • In app > res > values > customization.xml, create a new file and add the following:

<?xml version="1.0" encoding="utf-8"?>
    <bool name="productMode">true</bool>
    <integer name="product_id">1319</integer>
    <string name="oauth_client_id">tempmon04-4338</string>
    <string name="oauth_client_secret">xxxx</string>
    <string name="http_log_level">HEADERS_AND_ARGS</string>

Actually, it can be in any resource file, that’s just the file I used. This overrides the settings necessary to set up a simple auth product device instead of a regular user device. Otherwise, an ordinary user account instead of a product customer account will be created.

If you’re testing this with a previously used device, make sure you unclaimed it first. You should also reset the claim code on the device if you want to most closely approximate the behavior for a factory-new device. It’s the last step in this note. Otherwise, you’ll get a warning that the device was previously claimed to another user when setting it up.

Thanks for responding,

I already have the product set to automatically approve devices.
I also already have the oauth and product set up exactly as you have above. The only thing different is that I have not pre-added the device IDs. According to the docs I am attempting to use “Option 2: Flash code over-the-air during initial setup.” under the section “Programming the device.”

The app I am using is a modified version of the Tinker app.