Android ignores screen unlock protection interface cracked

Source: Internet
Author: User

1 principle

Android has three kinds of screen unlock protection: pattern unlock, pin password unlock and unlock password.

The interface is as follows:

Diagram 1 Pattern Unlock interface

Chart 2 pin password unlock interface

Chart 3 Password Unlock interface

We can use the subclass Keyguardlock in Java.lang.Object.android.app.KeyguardManger to control the disable out of these screen lock interfaces so that you don't have to enter a password, Directly over the screen lock interface to use the phone mainly using Keyguardlock.disablekeyguard () and Keyguardlock.enablekeyguard () method to disable, enable screen lock interface

2 Code Description

Demo program main code is as follows:

Get Keyguardmanagerkeyguardmanager manager = (Keyguardmanager) getsystemservice (Keyguard_service);

If (Manager.inkeyguardrestrictedinputmode ()) {

In the locked interface, the interface is unlocked by the Keyguardlock class method.

Keyguardlock Keyguard = Manager.newkeyguardlock (Getlocalclassname ());

Keyguard.disablekeyguard ();

}

Permissions Required:

  

3 Conclusion

1. Pattern Lock interface Use this method

After calling the Disablekeyguard () method Disable the Pattern lock screen, pressing the HOME key triggers the lock screen interface to enable the display of the lock screen interface.

2.Pin Password Lock interface using this method

When you call the Disablekeyguard () method after the disable pattern interface, the splash screen appears when you press the home key. Does not return to the main face

3. The password lock interface uses this method

When you call the Disablekeyguard () method after the disable pattern interface, the splash screen appears when you press the home key. Does not return to the main face

While it is not known why Google provides such an API, developers can use this API to make Android's screen lock protection function virtually nonexistent, and the exception to the home key after calling this method should be a bug.

4 Demo

As a result of screen locking through the computer on the Pea pod and other software can only install APK, and can not start apk, so this demo program written in the boot, that is, when the screen lock screen, through the computer, such as pea pod software installed after the software to restart can be implemented pass off Screen lock interface.

Android 2.2, 2.3,4.0 platform test Pass.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.