Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Autofill (API >= 26) #410

Closed
l0rn opened this issue May 23, 2018 · 23 comments · Fixed by #653
Closed

Using Autofill (API >= 26) #410

l0rn opened this issue May 23, 2018 · 23 comments · Fixed by #653
Assignees

Comments

@l0rn
Copy link

l0rn commented May 23, 2018

So as far as i understood it is agreed that implementing the Autofill mechanism provided by Android O and higher is desirable thing to do. I am opening a new ticket because #352 has mixed topics.

I started to implement Autofill functionality here:
https://github.com/ctrlaltcoop/Android-Password-Store/tree/oreo-autofill

I got so far that I basically copied over the example service from google's example project and expanded the heuristics to work better with web forms.

I plan to finish this in the course of the next two weeks. I could use help with:

  • Correct License / Attribution
    • I use the stuff from the google example which is licensed under Apache License. I use some big fragments but altered a lot. What would be the correct way to attribute the source etc.?
  • If someone experienced with the codebase could provide simplified snippets how to extract usernames from the app that would be cool, i guess i'd figure it out myself sooner or later, but that would mean i have to reverse engineer the AutofillService which seems a bit messy - at least for someone who is used to python and not so experienced with java
@l0rn
Copy link
Author

l0rn commented May 25, 2018

Got pretty far... If you want to support me take a peek https://github.com/ctrlaltcoop/Android-Password-Store/tree/oreo-autofill. On my todo list:

  • Find out how to be backwards compatible (if < Oreo use accessibilty), still don't know how to tell gradle that - so far i had to set minSdkVersion to 26 which would lock out all old devices
  • Improve heuristics to find login forms
  • Make heuristic work for apps too

I created a Pull Request to see the progress

@colonelpanic8
Copy link

@zeapo @l0rn What's the status of this

@l0rn
Copy link
Author

l0rn commented Dec 13, 2018

It's basically still in this inbetween state of half ready - i abandandoned it then because chrome didn't support autofill back then yet. Also there is some workflow issues still, like choose from list if you have no domain / app identifier match is not implemented.

I'd really like to pick it up soon, but I'm pretty busy with my paid work (moneys tight) and my daughter

@colonelpanic8
Copy link

I'm happy to pick it up if you want.

@l0rn
Copy link
Author

l0rn commented Dec 13, 2018

yea cool feel free to do so!

the general functionality should be given already - it's actually installed on my phone. In oreo till 8.1 chrome seems to ignore autofill api, it works in webviews and apps though. as mentioned a manual selection option for a password entry as missing as well as a mechanism to match password entries against app identifiers

@colonelpanic8
Copy link

@l0rn Have you tested in in android p? or in versions beyond 8.1?

@philgood
Copy link

@IvanMalison Do you have any further development updates?

@igaryhe
Copy link
Contributor

igaryhe commented Feb 18, 2019

Do you have any further development progress?

@l0rn
Copy link
Author

l0rn commented Feb 18, 2019

sorry, pretty sure i won't make it anywhere in the near future. we're pretty swamped.

@c4software
Copy link

This issue is still in progress somewhere ? I could implement it, if anybody is currently doing it...

@colonelpanic8

This comment has been minimized.

@msfjarvis
Copy link
Member

This issue is still in progress somewhere ? I could implement it, if anybody is currently doing it...

If you'd like to continue it I'll be happy to assist with code review and feedback.

@c4software
Copy link

c4software commented Sep 29, 2019

Hi,

I started the implementation. So, the service is done and seems to working well.

Capture d’écran 2019-09-29 à 22 43 15

Now i « just » had to do the picker activity (the window to pick witch entry you want for autofill).

PS : I have and had busy weeks… So…it could take some times to finish.
Update : Better screenshot…

Update 2 : For now I prompt autofilling for « Password, Username, Email ». Its easy to change… It's just more convenient.

@msfjarvis
Copy link
Member

Great job @c4software! Looking forward to reviewing and merging this :)

@c4software
Copy link

Hi the base logic is done. I just need to implement the « Filtering password RecyclerView » :

https://youtu.be/KVGyJdb4x4U (for curious people)

I will look at the « old » autofill service to see if i can reuse some stuff.

msfjarvis added a commit that referenced this issue Oct 1, 2019
Caveats:

- The openpgp preference had to be removed because the open-intents developers are too lazy to update their libraries. Over the coming weeks I will be reimplementing a local solution for this instead.

- The autofill dialog is broken but I since it is being worked on in #410 already I'm not going to bother fixing it.
@c4software
Copy link

Some news :

UI :

  • Password filtering is working.
  • Item selection is working. (And fill the original view)

Todo :

  • Decrypt the password.
  • fix UI height jumping.

@c4software
Copy link

The UI will look like this :

ezgif-2-5b7cdbea1d60

Tell me if it's ok for you?

  • If yes I will implement the password unlock method.

PS : The default « Recycler » is populate with last decoded items (get from the Shortcut manager)

@msfjarvis
Copy link
Member

Looking great! If you start a PR I'd love to start reviewing this and helping out

@krims0n32
Copy link

Good stuff! This is the only thing I'm missing from the app.

@TLATER
Copy link

TLATER commented Mar 3, 2020

@msfjarvis @c4software don't mean to push you, but any further updates? It's been a little while and it would be a shame if that progress just dropped.

@msfjarvis
Copy link
Member

I'm not working on it right now as I don't have the time. The existing implementation works reasonably well for my needs.

@c4software
Copy link

I'm really busy right now! I don't have many spare time right now…

@fmeum
Copy link
Member

fmeum commented Mar 3, 2020

I also think that the current implementation works reasonably well for the time being.

I have been working on and off on a more complete version (with origin checks, save support, username field detection, password generation) which is about 80% done and loosely based on the current PR. When it is complete, I will submit a separate PR, but this may take some more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants