Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Android Password manager App works?

I have seen few password manager apps in android like lastpass. I am also trying to build this kind of app.

How this apps are working?

How they get access to EditText & PasswordField of third party app?

How they detect login screen?

Is there any Android system api this apps using?

Please give me hint. How this things are working?

UPDATE

I found one useful resource on web. But it didn't say anything about which api to use!

like image 463
Vijay Vankhede Avatar asked Sep 29 '22 05:09

Vijay Vankhede


1 Answers

After searching lot I got the solution. It's possible to get access of EditText & PasswordField of third party app using accessibility api we can set & get values of edittext & password field using AccessibilityNodeInfo & AccessibilityNodeInfo.ACTION_SET_TEXT. I done this thing by using this api. To detect which app is running on screen. You have to place this line android:packageNames="com.example"in your accessibility.xml file.

Where com.example is package name of application for which you want to trigger your accessibility service.

Please read Docs related to accessibility service from android.developer site.

Sample accessibility.xml

<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeViewFocused|typeViewClicked"
    android:packageNames="com.example"
    android:accessibilityFeedbackType="feedbackAllMask"
    android:notificationTimeout="100"
    android:canRetrieveWindowContent="true"
    android:canRequestEnhancedWebAccessibility="true"/>
like image 130
Vijay Vankhede Avatar answered Oct 06 '22 05:10

Vijay Vankhede