Skip to main content
Level 1.6: Donut
March 12, 2025
Question

Problem Joining Work Profile From Android Device

  • March 12, 2025
  • 4 replies
  • 0 views

I created an enrollment token for an enterprise for work profile, and I ensured that

setAllowPersonalUsage("PERSONAL_USAGE_ALLOWED"); was set for the token. 

 

How ever when I try to join from my android 11(tecno) and android 14(google pixel 7) device with work profile via the ADP app, I get :

Can't add work Profile

A work profile can't be added to this Pixel. If you have questions, contact your IT admin.

 However from my emulator device running Android 15, I could join the enterprise using work profile.

4 replies

Level: 4.1: Jelly bean
March 12, 2025

Could you pop the full JSON payload here? Obscure the token first 

ElijahAuthor
Level 1.6: Donut
March 12, 2025

You mean this, the enrollment QR code JSON payload:

 

{"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME":"com.google.android.apps.work.clouddpc/.receivers.CloudDeviceAdminReceiver","android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM":"I5YvS0O5hXY46mb01BlRjq4oJJGs2kuUcHvVkAPEXlg","android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION":"https://play.google.com/managed/downloadManagingApp?identifier=setup","android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE":{"com.google.android.apps.work.clouddpc.EXTRA_ENROLLMENT_TOKEN":"BV****BTAAHYOMWOJNZT"}}

 

I am using the AMA Java library

Level: 4.1: Jelly bean
March 12, 2025

Ok, it looks fine. 

 

Can you replicate this with a new token, and are you ensuring you aren't just allowing the token to expire? The default expiry time isn't very long. What does your token.create payload look like?

ElijahAuthor
Level 1.6: Donut
March 13, 2025

yes, my token expiry is about 24hrs...

here is the token create payload function:

private static String getQrCodeStringWorkProfile(String enterpriseName, String policyName) throws GeneralSecurityException, IOException { EnrollmentToken token = new EnrollmentToken().setPolicyName(policyName).setDuration("86400s").setAllowPersonalUsage("PERSONAL_USAGE_ALLOWED"); return getAndroidManagementClient() .enterprises() .enrollmentTokens() .create(enterpriseName, token) .execute().getQrCode(); }

 

Level: 4.1: Jelly bean
March 14, 2025

That also doesn't show anything obviously wrong. As you're doing a work profile, can you spin up a new token, test on problem devices, and capture a bug report immediately after failure?

Level 4.4: KitKat
March 14, 2025

Hi, i guess because of enrollment QR, it's cope, so try to add the relevant PROVISIONING_MODE to the enrollment QR. Example:

"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE":{"PROVISIONING_MODE":"MANAGED_PROFILE"}

I have in mind, this is required for COPE or even FULLY_MANAGED_DEVICE for a COBO.

Level: 4.1: Jelly bean
March 14, 2025

Nah that isn't required. 

ElijahAuthor
Level 1.6: Donut
March 21, 2025

I have been able to setup a work profile from my google pixel 7 phone; the reason why it was not setting up was because there were about 4 users on the device, which was the maximum, I had to delete a user and try to setup the work profile again. I also ensured I had enough storage on my device.

However, I can't still setup work profile(BYOD) on the tecno device, I am suspecting it might be due to low memory(the device has 2gb of RAM).

Thanks @jasonbayton, @Moombas for the assistance.

Level 4.4: KitKat
March 21, 2025

Hmm, wonder why 4 users (or even more) on a single device make sense, so from my perspective unexpected but nice that you figured it out at least for 1 device.

 

Ever tried a completely fresh tecno device and add it then (without anything special installed,) so only 1 "private user" and then try adding the work profile?

Low RAM should only cause a device acting slow.

Level: 4.1: Jelly bean
March 21, 2025

Low-ram devices may opt out of Work profile support.

 

These were two excellent examples to remind me to to ask far more detail about the device. Good edge cases!