Push pubsub not sending usage logs location event on lost mode

bonnewu
Level 1.5: Cupcake

Hi,
I am using an Android 12 device, company-owned and is fully managed. My enterprise is configured to receive "USAGE_LOGS" notifications and I enrolled the device with token parameter "allowPersonalUsage" set to "PERSONAL_USAGE_DISALLOWED". Also I enforced location mode with a policy. 


I can see the notification that command went through and device enters alert state as expected. Then, I move device in lost state by clicking "I found this device" and expecting location logs to appear. Nonetheless, no usage logs are coming from my push pubsub.

 

Before I was using pull pubsub and actually was able to receive usage logs back then. Don't really know if it's related. Originally, I though that the problem is that I couldn't properly subscribe enterprise to receive USAGE LOGS but it seems that's not the case from my previous question. My previous question on Usage logs 

9 REPLIES 9

jasonbayton
Level 4.0: Ice Cream Sandwich

First question that comes to mind - are you leaving it in the lost state for at least 5 minutes? Location won't be sent before then.

 

And are you seeing any other usage logs from enrolled devices at all?

bonnewu
Level 1.5: Cupcake

Hi, thanks for reply.
First, yes USAGE LOGS are on and I managed to receive enrollment completion notifications before. And I have been keeping my device in lost state for more than 5 minutes. No lost mode location logs so far.

 

I am confused because as I mentioned before I was able to receive lost mode location usage logs before with pull subscription. Recently I tried to switch back and as with push nothing came up. I assume I am missing something in configuration but not sure what exactly.

jasonbayton
Level 4.0: Ice Cream Sandwich

Oh I see, I read the pull/push as usage logs in general but if you're getting some you should be getting all. 

 

Presumably no change to the pubsub topics you've configured on the enterprise? And is there any difference in subscription between when it worked (pull) Vs now (push)?

bonnewu
Level 1.5: Cupcake

I use the same topic for both pull and push subscriptions and I didn't change anything there. I use default configuration for both pull and push subscriptions, didn't change match. The only difference would be I also pass a token parameter in the endpoint of my push subscription but enrollment completion logs arrive okay. So it shouldn't be a problem I think. Can it be device android version or Device Policy app lacking certain permissions?

jasonbayton
Level 4.0: Ice Cream Sandwich

The Android version for the deployment scenario is fine, so I don't think that's the issue. 

 

You could pull a bug report after 15+ mins in lost mode state and see if the device itself is sending things up?

 

I'll do some testing today also with my project. 

bonnewu
Level 1.5: Cupcake

Sorry, can you explain how can I file a bug report? Do I do it from lost state window on my phone?
Actually, it just went off by itself. Right now I was holding it in lost state for 20 minutes and it ended prematurely without my input. I checked my notifications: no stop command, or forced lost mode exit usage logs came.

jasonbayton
Level 4.0: Ice Cream Sandwich

While you're testing it things can go awry, there are lots of limitations in how frequently it can be enabled on a device and such - I had to wait a full day when recording a video on it to be able to reinitiate lost mode as I'd cocked up a step in the video 

 

To get the bug report you'll need to unlock it/recover from lost mode on device. Then you can capture a bug report and it should contain the logs still from while it was there. 

bonnewu
Level 1.5: Cupcake

Turns out the problem was with device. I tried using Pixel 3 Android 13 phone and it worked as expected. Now I remembered that I was using this phone before for lost mode testing as well.
I downloaded the logs but couldn't really understand much.
Bug report 

jasonbayton
Level 4.0: Ice Cream Sandwich

That's not quite the bug report I was expecting, and doesn't show me anything related to the device policy app unfortunately, but if you've isolated it to a device that's good!