How to Change the Terminal Administrator's Login Password: Difference between revisions
(→Reset) |
|||
Line 60: | Line 60: | ||
=== <big>Reset For system apk</big> === | === <big>Reset For system apk</big> === | ||
<syntaxhighlight lang="java">boolean reset(String pwd);</syntaxhighlight > | <syntaxhighlight lang="java">boolean reset(String pwd);</syntaxhighlight > | ||
Resets admin password. ''' | Resets admin password. '''For security reason, third-app can not call this method. The method is only for system apk.''' | ||
{|class="wizarpostable" | {|class="wizarpostable" |
Revision as of 03:02, 29 June 2020
An AIDL interface that is open to applications to manage terminal administrator passwords.
Permission
The application declares the following permissions in the manifest:
Permission | Function |
---|---|
android.permission.ADMIN_PWD_MODIFY | modify admin password |
android.permission.ADMIN_PWD | get admin password |
android.permission.ADMIN_PWD_RESET | reset admin password |
API Overview
Modify
boolean modifyAdminPwd(String oldPwd, String newPwd);
Modifies admin password.
Parameters | |
---|---|
oldPwd | String: old admin password. |
newPwd | String: new admin password. |
Returns | |
---|---|
boolean | true is success, false is failure. |
Is admin password
boolean isAdminPwd(String pwd);
Returns true if the parameter pwd is the real admin password.
Parameters | |
---|---|
pwd | String: admin password. |
Returns | |
---|---|
boolean | true is success, false is failure. |
Reset For system apk
boolean reset(String pwd);
Resets admin password. For security reason, third-app can not call this method. The method is only for system apk.
Parameters | |
---|---|
pwd | String: the real admin password. |
Returns | |
---|---|
boolean | true is success, false is failure. |
Download
Please download the whole project demo