Skip to content
Jérémy JAMET edited this page Nov 4, 2020 · 71 revisions

Autofill service can fill out the views in other apps with credentials provided by KeePassDX.

Set-up

You must select KeePass from autofilling in the Autofill service menu on your device.

  1. A dialog box may ask you if you are sure to trust the app:

KeePassDX is open source, so you just need to check the points that matter to you in the source code and validate if you agree.

  1. Activate special OS settings:

Activating settings in your system may be necessary to use Autofill, otherwise you will not be able to open the app from the key button.

Some systems require the activation of special permissions (Xiaomi - MIUI):

  • In Settings → Manage Apps → KeePassDX → Other permissions, turn on Display pop-up windows while running in the background permissions.

Alternatively, you can disable MIUI optimizations which block a lot of elements in an unjustified way on the device:

  • Activate the developer mode in Settings → About Phone by tapping Build number seven times.
  • In Settings → Additional Settings → Developer Options, turn off MIUI optimization and restart the device.

Batterie saver:

  • Some systems restrict applications to save battery. This may affect the opening of the Autofill. In this case, set the parameter Battery Saver to No restriction. (Note that the app does not use the battery unnecessarily)

Usage

Press the small pop-up when it appears, you will then be asked to select an entry (also to unlock a database if none is open)

Screenshot from 2020-06-25 13-27-22

The service automatically fills in the user and password fields if the automatic search is activated and an entry matches to the form, otherwise the user is asked to select an entry from those available.

If no database is open during the launch of the autofill, the user will be asked to open a database that has already been opened. It is not possible at the moment to open a new database in selection mode, it is recommended to open a database in normal mode before using the selection mode.

Auto-search

It is possible to configure entries to automatically proposes the correct credentials. In fact, you can create custom fields for automatic searches of an app or web site because the parser looks in all entry fields and returns up to 6 credentials but it is advisable to respect the conventions below for better compatibility.

Application

You must complete a custom field with the name ApplicationId and as value the application Id of the app.

It is easy to see the application id when the autofill requests to connect. It is indicated next to the "app" icon on a green background.

autofill_applicationId

Website

You must complete the field URL or WebDomain with the corresponding http or https link.

Note: only the web domain is really important (it may be different if you are on a mobile version of the visited site)

It is easy to see the web domain when the autofill requests to connect. It is indicated next to the "web" icon on a green background.

autofill_webDomain

Blocklist

It is possible to add an application ID or a web domain to the blocklist to prevent the popup from opening for a specific application:

  1. Check that no database is open.
  2. Click on the Autofill "Sign-in with KeePassDX" popup.
  3. Close the biometric prompt if it opens automatically.
  4. In the selection mode bar, press the blocking button at right.

Screenshot from 2020-06-25 13-27-37

  1. Restart the app that displays the autofill popup for the changes to take effect.

You can manually add and remove applicationIds and webDomains from blocklists in the settings Settings → Form filling → Autofill settings → Filter.

Important note: If the autofill is correctly integrated in the web browser which displays the form, it is possible to block only the current URL, but this feature does not work for web browsers that use the autofill compatibility mode (like Chrome).

The list of apps that use the autofill compatibility mode is available here.

This is due to a non-implementation of the autofill methods on the host browser app, so you must contact the developers of the corresponding browser to add this functionality.

Improvements

There may be improvements or small bugs to fix, in this case, check if a corresponding issue is not already open and leave your comment indicating how to upgrade the service. Autofill feature is constantly evolving with a custom algorithm according to your remarks.

Why is the auto-fill not available for Android devices before Android 8.0 (API level 26)?

The auto-fill service is built directly into the heart of the Android system, and was not present in earlier versions.

KeePassDX will not use the accessibility service for older devices. It is a service which is not made for this purpose, and this technical aspect is deprecated by Google. In addition, this will require too much work for devices that are no longer produced.

You can however use the Magikeyboard, which was specifically created to overcome this problem and is compatible with older devices.

Password form recognition

The form to fill in username and password is recognized if explicitly defined with android:autofillHints or if it contains input elements (with types : username and password). Otherwise, the dialog box is not offered. When KeePassDX is started in autofill mode (after clicking "Sign in with KeePassDX"), each entry becomes a callback function that returns username and password. If you want other behavior, please request it.

Web Browser

Some browsers do not offer the possibility to use autofill, this is a known bug depending of the browser, that cannot be resolved from the KeePassDX app. In this case, try to:

  • Check if your browser is natively compatible with autofill service (look at the table below)
  • Update your browser (if it doesn't help, leave a message to the authors of the app concerned to find a solution)
  • Switch to another browser

Compatibility Mode

The autofill service in compatibility mode is normally used temporarily while waiting for browser developers to implement native recognition. In compatibility mode, forms are not optimized for autofill and are parsed automatically, so this method takes resources and there may be slowdowns depending on devices. This mode requires Google Play services installed and does not allow registration from forms. https://developer.android.com/reference/android/service/autofill/AutofillService#compatibility-mode

It is recommended that you use native autofill compatible web browsers to optimize form filling, for security and to use registration.

Here is a non-exhaustive table of the compatibility of browsers with autofill:

Browser Tested Version Store Autofill Description
Lightning 5.1.0 F-Droid Native -
FOSS Browser 7.2 F-Droid Native -
Firefox 81.1.1 Play Store Native A firefox bug causes the autofill popup to disappear, workaround found (https://github.com/Kunzisoft/KeePassDX/issues/725#issuecomment-704909385)
DuckDuckGo ? ? ? -
Fennec 82.1.1 F-Droid Native -
Chrome 83.0.4103.106 Play Store Compatibility Native autofill has been removed from Chrome at the expense of the Google auth connection since version 78.0.3904.96 (https://github.com/Kunzisoft/KeePassDX/issues/551#issuecomment-627224788). May not work all the time in compatibility mode
Chrome beta 86.0.4240.68 Play Store Compatibility -
Edge - Play Store Compatibility -
Vivaldi ? ? ? -
Samsung Browser 12.1.4.3 Play Store / Device No / Compatibility Works on older Samsung models but newer models knowingly prevent the use of autofill
Bromite 86.0.4240.68 bromite.org No Prevents the autofill compatibility service from accessing it and does not contain native autofill
Chromium 86.0.4240.68 - No Upstream bug for Chromium is https://bugs.chromium.org/p/chromium/issues/detail?id=1015381

Note that several browsers derived from Chromium code will not be compatible with autofill because the native code in this app has been removed.

Autofill disabled

The autofill may not work if the form has explicitly requested to disable autofill (with importantForAutofill="no" or autocomplete="off"). In this case, ask the application or website to remove these tags.

Part of the autofill code is inspired by Android-AutofillFramework.

Clone this wiki locally