1

How can I debug an Android device that is set to installtype: KIOSK using the Android Management API? I have set debuggingFeaturesAllowed to true but adb devices does not even show the device when attached via USB cable. Is there a way to get a console output from such a device?

I'm currently using the following policy on the device:

{
  "name": "enterprises/LC0999999/policies/policy1",
  "version": "13",
  "applications": [
    {
      "packageName": "com.package.name",
      "installType": "KIOSK",
      "defaultPermissionPolicy": "GRANT"
    }
  ],
  "keyguardDisabled": true,
  "debuggingFeaturesAllowed": true
}
user1195883
  • 654
  • 4
  • 19

3 Answers3

0

Did you enable USB debugging under developer settings?

heX
  • 720
  • 5
  • 9
  • 1
    I cannot go to settings when running in KIOSK mode. – user1195883 Mar 10 '20 at 08:50
  • `"debuggingFeaturesAllowed": true` only allows you to turn it on, it doesn't turn it on for you. – heX Mar 10 '20 at 15:29
  • but where would I turn it on when in KIOSK mode? I obviously cannot got into the settings app. – user1195883 Mar 11 '20 at 10:04
  • I don't think there's a way to exit. You might want to try changing the policy to allow you to leave, change the setting, and then change the policy back to KIOSK. – heX Mar 11 '20 at 18:40
  • But what if I want to debug the specifics of KIOSK mode? What if I have to debug the provisioning process of the Android Management API? – user1195883 Mar 12 '20 at 19:15
  • To get to settings whitelist the app: { "packageName": "com.android.settings", "installType": "FORCE_INSTALLED" }, – Shinyosan Jun 10 '20 at 00:05
0

debuggingFeaturesAllowed only allows the user to enable debugging features. The user still needs to enable USB debugging through developer options.

The only way to enable USB debugging is through the Developer Options in Settings. This would need to be done before applying the installType: "KIOSK" policy to the device.

Deyzel
  • 186
  • 5
0

As of Jan 2022, debuggingFeaturesAllowed has been deprecated !

debuggingFeaturesAllowed (deprecated)

debuggingFeaturesAllowed is deprecated. Please use advancedSecurityOverrides.developerSettings instead.

Whether the user is allowed to enable debugging features.

To enable developer settings you need to patch your device with AdvancedSecurityOverrides maskfield with :

{ "developerSettings": enum (DeveloperSettings) }

DeveloperSettings can have 3 values :

  • DEVELOPER_SETTINGS_UNSPECIFIED

Unspecified. Defaults to DEVELOPER_SETTINGS_DISABLED.

  • DEVELOPER_SETTINGS_DISABLED -

Default. Disables all developer settings and prevents the user from accessing them.

  • DEVELOPER_SETTINGS_ALLOWED

Allows all developer settings. The user can access and optionally configure the settings.

CHIRAG SAHU
  • 64
  • 1
  • 2
  • 9