-
-
Notifications
You must be signed in to change notification settings - Fork 277
AutoFill
Autofill service can fill out the views in other apps with credentials provided by KeePassDX.
The Autofill service is managed by the system and has limitations. KeePassDX only sends visuals and content that will be displayed and filled by this Android service (as a popup or in the keyboard if it is compatible).
You must select KeePassDX form autofilling in the Autofill service menu on your device.
- 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.
- 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 onDisplay 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 tappingBuild number
seven times. - In
Settings → Additional Settings → Developer Options
, turn offMIUI optimization
and restart the device.
Battery saver:
- Some systems restrict applications to save battery. This may affect the opening of the Autofill. In this case, set the parameter
Battery Saver
toNo restriction
. (Note that the app does not use the battery unnecessarily)
Please note that the use of the Autofill service in third party forms cannot be secured by KeepassDX, make sure you trust the applications and the websites using it.
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)
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.
It is possible to use inline suggestions from Android R.
Note that this feature is only a visual aid, the popup may reappear from time to time if your system's autofill does not recognize suggestions correctly or is not fast enough (for example, after an entry selection).
The option is enabled by default, you can disable it in Settings → Form filling → Autofill settings → Inline suggestions
(If the option is not available, your device is simply not compatible.)
It is possible to configure entries to automatically proposes the correct credentials, simply check that the setting Settings -> Autofill settings -> Auto search
is enabled.
You can create any fields you want for automatic searches, as the parser examines all input fields, but returns up to a maximum of 10 credentials.
Note : If the list does not show the entry you are looking for in the list of 10 entries, just choose "select entry..." when the setting Settings -> Autofill settings -> Manual selection
is enabled.
The automatic search is facilitated by the integration of new fields (AndroidApp and URL) when selecting your entries.
The addition of this new field implies a possible automatic save of your database. If you don't want this behavior when activating autofill, simply deactivate the settings: Settings -> Autofill settings -> Save search info
and Settings -> Autofill settings -> Ask to save data
.
Then, it is possible to manually fill in the entry fields for the search, but it is advisable to respect the conventions below for better compatibility.
This field is a custom field with the name AndroidApp
and as value the application Id of the app. You can add other AndroidApp_[X]
fields by replacing the [X]
with a number, this allows an entry to be associated with several applicationId.
If you want to fill it in manually, 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.
This field is a standard filed URL
with the corresponding http or https link. It is possible to add other URLs by adding URL_[X]
custom fields by replacing the [X]
with a number.
Note: only the web domain is really important (it may be different if you are on a mobile version of the visited site)
If you want to fill it in manually, 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.
Important : If you are experiencing Autofill search result problems with domains containing a TLD country code (ie www.example.com.au), or that you have different entries for different subdomains of the same domain, you can activate the search by subdomain in : Settings → App settings → Subdomain search
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:
- Check that no database is open.
- Click on the Autofill "Sign-in with KeePassDX" popup.
- Close the biometric prompt if it opens automatically.
- In the selection mode bar, press the blocking button at right.
- 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.
For webDomains go to:
Settings → Form filling → Autofill settings → Web domain blocklist
,
For applications go to:
Settings → Form filling → Autofill settings → Application blocklist
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.
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.
The auto-fill service is built directly into the heart of the Android system, and was not present in versions before Android 8.0 (API level 26).
KeePassDX will not use the accessibility service for older devices. It is a service which is not made for this purpose, the accessibility service is present for people with disabilities. If we use this service for something else, it's like we have a ramp for the disabled, and we use it for biking. Sure, it works but people who need this service for something else are blocked. (Google documentation : https://support.google.com/googleplay/android-developer/answer/10964491)
As this service is not designed for that, it can also be subject to security breaches. KeePassDX is above all security oriented and will not make this concession for ease of use at the expense of data security. (Study of the accessibility service by Inria : https://hal.inria.fr/hal-01929049/document)
You can however use the Magikeyboard, which was specifically created to overcome this problem and is compatible with older devices.
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.
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
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 - 85.1.3 | Play Store | Native | A firefox bug causes the autofill popup to disappear, workaround not working all the time (https://github.com/Kunzisoft/KeePassDX/issues/725#issuecomment-704909385) Firefox Nightly doesn't have this bug. |
DuckDuckGo | 5.68.0 | F-Droid | Native | - |
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 | from 131 | Play Store | Native | Native autofill has been readded to Chrome https://android-developers.googleblog.com/2024/10/chrome-3p-autofill-services.html?m=1 |
Chrome beta | 86.0.4240.68 | Play Store | Compatibility | - |
Edge | 45.09.2.5079 | Play Store | Compatibility | - |
Chromium | 86.0.4240.68 | - | No | Upstream bug for Chromium is https://bugs.chromium.org/p/chromium/issues/detail?id=1015381 |
Bromite | 94.0.4606.109 | bromite.org | Yes | Has native Android auto-fill support since version 94.0.4606.109 |
Brave | 1.21.74 | Play Store | Compatibility | - |
Brave Beta | 1.22.55 | Play Store | Compatibility | - |
Vivaldi | 3.6.2178.47 | Play Store | No | Doesn't work at all, even with compatibility mode |
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 |
Note that several browsers derived from Chromium code will not be compatible with autofill because the native code in this app has been removed.
A study was done on the recognition of OTP token forms for automatic filling. Unfortunately, it is not possible to efficiently recognize the field to be filled in and autofill is therefore not possible. To overcome this problem, OTP tokens are now available directly in the entry list and can be copied from there. (issue https://github.com/Kunzisoft/KeePassDX/issues/553#issuecomment-912936390)
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.