Debug app installs and updates

After a device's policy is updated, any required app updates will be carried out automatically as long as the device meets certain conditions. To debug issues related to updating as well as installing apps from managed Play, you can retrieve the managed Play logs from a device for analysis.

Retrieve managed Play logs

Your customers can retrieve managed Play logs to send to you for analysis by capturing a bug report directly from a device or by using Android Debug Bridge (adb).

Capture a bug report

Android versions 4.2 and higher are capable of capturing and saving bug reports. Bug reports contain event logs that you can use to help troubleshoot issues related to app installations and updates.

Developer Options must be enabled before a device can capture bug reports (interactive reports are recommended). Bug reports are saved in a zip file, which customers can send to you for analysis. Android provides general information on reading bug reports. You can also refer to Analyze managed Play logs for more specific guidance on troubleshooting app installations and updates.

Use Android Debug Bridge

Instead of capturing bug reports, you can instruct your customers to use Android Debug Brige (adb) with a device connected over USB. Before using adb:

After connecting a device, use logcat to view a log of system messages from all apps on the device, including Play. Your customers can send you this log for analysis.

Analyze managed Play logs

Regardless of whether your customer captured a bug report from a device or used adb logcat, the basic format of an event log is:

timestamp PID TID log-level log-tag tag-values

All logs from Google Play include the log-tag Finsky. For example:

02-11 08:42:08.600 10031 14335 14335 I Finsky logged-message

To debug issues with Google Play, we recommend filtering out system messages and messages from other apps. For example, with adb:

adb logcat | grep Finsky

Managed Play writes the following message to the log before it requests the latest app policy:

Start enterprise client policy sync: account=...

If the policy syncs successfully, it writes:

Received enterprise client policy: account=...

If the policy fails to sync, it writes:

Error while getting the Enterprise client policy: ... for the account.

Example: policy sync error

The following example log shows a device that failed to sync with the latest managed Play policy because it wasn't connected to the internet. As a result, apps aren't installed or updated as required.

02-11 07:52:01.083 10030 22896 22896 W Finsky  : [2] jur.a(13):
Error while getting the Enterprise client policy:
accountID@android-for-work.gserviceaccount.com for the account.
com.android.volley.NoConnectionError:
org.chromium.net.impl.NetworkExceptionImpl:
Exception in CronetUrlRequest:
net::ERR_INTERNET_DISCONNECTED, ErrorCode=2, InternalErrorCode=-106, Retryable=false

Review app installs and updates

When a device syncs with managed Play policy successfully, any required app installations or updates are scheduled immediately. Managed Play doesn't log the entire policy it receives, but you can view managed Play logs to check if any apps have been scheduled for installation and follow the progress of these installations.

Managed Play carries out app installations and updates over several steps, including downloading the APK, verifying the APK, and actually installing the APK. To follow the progress of an app install or update, grep for Finsky and the app's package ID. You can find an app's package ID in the URL of its Google Play Store page. For example, Google Chrome's package ID is com.android.chrome.

To view logs related to the progress of installing or updating Google Chrome on a device, with adb:

adb logcat | grep Finsky | grep com.android.chrome

If the app fails to install or update, the error and the stage that the install or update failed should be returned in these logs. If the app is installed or updated successfully, the logs should contain a message similar to:

02-11 08:42:30.187 10031 14335 14335 I Finsky  : [2] mqd.c(4): IT:
Successful install of com.android.chrome (isid: ...)