nextcloud / passman-android

:key: Android app for Passman.
https://passman.cc
GNU General Public License v3.0
93 stars 30 forks source link

Android Oreo Autofill #50

Closed Jab2870 closed 3 years ago

Jab2870 commented 6 years ago

Are there any plans to work with the Autofill feature in android oreo?

https://www.blog.google/products/android/use-your-favorite-password-manager-android-oreo/

https://developer.android.com/reference/android/service/autofill/package-summary.html

animalillo commented 6 years ago

Do you have any code examples we could use to see the complexity of this feature??

Jab2870 commented 6 years ago

I am afraid I am not an android developer. Is this of use? https://developer.android.com/guide/topics/text/autofill.html or this? https://developer.android.com/guide/topics/text/autofill-services.html

animalillo commented 6 years ago

This might help, sadly I don't have time right now to implement this feature or any oreo devices to test this on. I will look on this for a future release when I have some spare time for passman tho! Thanks for the links and I think it's a great feature for android, so expect this to be implemented.

wbrawner commented 6 years ago

Hey! I have an Oreo device and would love to see autofill implemented myself. If no one is currently working on this, I'd be happy to take a look myself.

violoncelloCH commented 6 years ago

As nobody stated so here I think none is working on this atm, because the main devs are busy... So give it a try

wbrawner commented 6 years ago

Cool, I'll take a look then :+1:

kukukk commented 6 years ago

Hi!

I also would love to have this feature and be able to use Passman as a full-featured cross-platform password manager.

I don't have time to develop, but I can help you with some testing on devices running Android 8.0 and 8.1. If the steps for building the app locally are updated I can try to install the app from source and help you with debugging in case I discover any problem. (At least I was able to debug and fix a bug for the Nextcloud Notes Android client)

wbrawner commented 6 years ago

I've unfortunately had something come up so I won't be able to look at this any time soon I'm afraid :(

Ryonez commented 6 years ago

This wil sadly be the thing that stops me switching over from bitwarden atm. That auto-fill service is just to good to give up.

HahUK commented 5 years ago

I've been doing some work on this and should have something ready for people to test in the next few weeks. Current status is:

1.) An App can request autofill from Passman and get credentials which match the packageName (e.g. com.justeat.app.uk). The packageName is stored in a custom field within the Credential . This means you can update existing credentials with the packageName and it will link up.

2.) Where no matching credential is found, and the user requests that Android store the credential using the autofill service, a new credential is created and stored in the vault. The label for this credential is the name of the application which called the autofill service (e.g. Just Eat).

3.) Creating a credential required a significant amount of work. I had to write encryption routines compatible with the javascript encryption used in Nextcloud Passman. This needs thorough testing and is very rough around the edges.

4.) This also means that the prerequiste code required to build a "Create Credential" work flow in the GUI is now available however I haven't started looking at it.

5.) Everything is very simple and rough - I haven't developed for Android for years so I need some time to do cleanup of my 2 million Log.d statements.

6.) The autofill currently relies on the autofill hints been available in the target application, no logic has been added to allow the autofill of inputs which do not provide hints. This means web forms will not attempt to autofill. THis will need significant work.

Thanks,

Tom

TheBigFatTony commented 5 years ago

Great news, @HahUK ! I also need this feature to fully embrace Passman. Where can we download your fork?

HahUK commented 5 years ago

Anybody able to clone and build https://github.com/HahUK/passman-android/tree/feature-android-autofill-and-gen-additions to see how you get on?

If all is well i will put in a pull request.

Has:

Basic autofill Basic Credential creation/editing Basic copy creds notification on long press credential. (30 second timeout) Menu items implemented including refresh, clear saved creds and lock vaults

Disclaimer:

I'm not an Android or Java programmer by trade, I'm learning as I go. I take absolutely no responsibility for anybody using this code or having credentials compromised by using this code. You do so at your own risk. Read the commits to see what I have implemented.

TheBigFatTony commented 5 years ago

thanks for your work. i just bought a new laptop and have to reinstall android studio etc, so i require a good internet connection. i may be able to give your an answer in 24 h.

TheBigFatTony commented 5 years ago

I didn't succeed. I set the ndk path by simply executing export ANDROID_NDK_ROOT=/home/username/Android/Sdk/ndk-bundle before ./SetupOpenssl.sh. Maybe this was wrong? This is the error I got:

SetupOpenssl error log.txt

HahUK commented 5 years ago

Hi @TheBigFatTony

Any chance you could try again with the latest source from https://github.com/HahUK/passman-android/tree/feature-android-autofill-and-gen-additions

It should no longer need the external build components as I've switch the cryptography to normal java code.

Thanks,

Tom

TheBigFatTony commented 5 years ago

I'm getting nowhere. I wanted to run the app in a virtual device (tried: Pixel 2 and Nexus S) but i get Device supports x86, but APK only supports armeabi-v7a So I tried to send the app to my phone (Xiaomi Mi 5s, Lineageos 15.1, Android 8.1, ARMv8-A), but I got: ABIs [arm64-v8a,armeabi-v7a,armeabi] set by 'android.injected.build.abi' gradle flag contained 'ARMEABI, ARM64_V8A' not targeted by this project.

I assume that the native (ndk) code is compiled for armeabi-v7a only and that's why it doesn't work on my devices, right? Which device should I try to emulate?

morgankevinj commented 5 years ago

Bitwarden's app has this feature and their code for it is at https://github.com/bitwarden/mobile/tree/master/src/Android/Accessibility

Bitwarden uses the Accessibility service which works on some apps that the autofill service does not.

DJaeger commented 4 years ago

I placed a $20 bounty on Bountysource

binsky08 commented 3 years ago

added with https://github.com/nextcloud/passman-android/releases/tag/v1.0.0