Page tree
Skip to end of metadata
Go to start of metadata

Secured Screen Limitations - Android 12 - 14

Some applications are using SECURE FLAG in their application activities. As a result, sensitive information displayed on the screen is protected from unauthorized access.

We were able to work around the SECURE FLAG display restriction for android 11 and below. 

Since Android 12, A new android security enhancement was introduced in which only privileged processes can create a secure display (Relevant android source code).

As a result, non-privileged apps (Including us) are blocked from receiving screen display from secured screens

Non-instrumented apps with secured screens will not have actual screens displayed and a black image (See below example) will be displayed instead (this includes setting/changing pin codes in the settings app).

Currently in android 12-14, secured screens are only supported in Instrumented mode.

To get screenshots from such apps, you can do one of the following:

  • Build your application without this SECURE FLAG.
  • Use our Manual instrumentation tool, with -disableSecurityMode flag.

Device reboot

The USB connection type for OPPO device is not saved and resets to "Charge Only" after reboot. To make the device usable again, the device setting must be changed manually (requires physical access).

Therefore, a reboot is not supported for OPPO devices.

Additional steps for OnePlus devices

In developers options, the option Disable permission monitoring should be enabled.

Limitation with Huawei and Xiaomi devices

For Huawei devices: If the device gets disconnected often or can't be connected to the cloud at all, the following option should be enabled in the Developer Options menu:

  • Allow ADB debugging in charge only mode

In order to install applications from USB on the device the following should be disabled in the Developer Options menu:

  • Verify app over USB
  • Monitor apps installed by ADB (When available, this option isn't available for every device)

The following options should be enabled in the Developer Options menu:

  • Install via USB

If you are unable to enable Install via USB, enable USB debugging (Security settings) first, that should let you enable the former option.

Additional options for Huawei devices

If the device's connection is not stable after previous steps, or the device can't be launched in manual/automation session, take the following steps:

  • Go to Settings → Battery → App Launch
  • In the list search for 'UIAutomator' and tick it off
  • In the window opened click OK without ticking anything

Additional options for Xiaomi devices

Xiaomi devices will prompt before any application installation, disabling the following in the Developer Options menu should allow installation via USB without prompt (except for the first one).

Both options are on the bottom of the Developer Options menu:

  • Turn on MIUI optimisation
  • Notify about high-risk features

Launching chrome - Android 13 - 14

Since Android 13, Due to recent changes in Chrome's bundle ID, launching chrome using capabilities (MobileBrowserType.CHROME or MobileBrowserType.CHROMIUM) will result in an error.
Instead use the package and activity name to launch the application.
The following code snippet can be used to launch chrome on android 13.

dc.setCapability("appPackage", "");
dc.setCapability("appActivity", "");

Chromedriver limitation

When a web element appears on the page but we get the error "An element could not be located on the page..." or "not clickable at point..." we can use in:

By loadingImage =;
WebDriverWait wait = new WebDriverWait(driver, 10); 

  • No labels