图案解锁失败后无法使用Google帐户解
来源:互联网 发布:英语书籍推荐知乎 编辑:程序博客网 时间:2024/05/05 23:19
图案解锁失败后无法使用Google帐户解
[DESCRIPTION]
手机已登入谷歌账户,设置屏幕图案解锁,每输入错误5次,系统会警示一次,在等待30秒后重新输入的时间里,解锁界面没有“忘记密码”选项可点击。
[SOLUTION]
该问题是早期KK GMS版本中GoogleLoginService的一个bug。使用KK mr1 r2以及之后的GMS版本,该问题已经被解决。
问题原因是由于,Keyguard會註冊一個 AccountManager callback function,並在callback function 內將 flag mEnableFallback 設成 true。只有當mEnableFallback 等於 true 時,才能在後續的動作裡將GOOGLE帐户解锁的BUTTON" 顯示出來。
但當 AccountManager callback 被呼叫時,在解析參數時 always 出現exception(見下圖 code & log)。
导致exception的原因是由于AccountManager bind到GoogleLoginService,并且调用其confimCredential方法时,返回了null。
查看Log发现,在执行confimCredential的时候,发生了NullPointerException:
04-23 06:20:58.238 3167 3180 W AccountAuthenticator:
confirmCredentials(Account {name=qi.wang.mtk@gmail.com, type=com.google})
04-23 06:20:58.238 3167 3180 W AccountAuthenticator:
JAVA.lang.NullPointerException
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
Android.os.Bundle.putAll(Bundle.java:331)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.content.Intent.putExtras(Intent.java:6376)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
com.google.android.gsf.loginservice.GoogleLoginService$AccountAuthenticato
rImpl.multiProcessHopFix(GoogleLoginService.java:541)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
com.google.android.gsf.loginservice.GoogleLoginService$AccountAuthenticato
rImpl.confirmCredentials(GoogleLoginService.java:383)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.accounts.AbstractAccountAuthenticator$Transport.confirmCredentials
(AbstractAccountAuthenticator.java:150)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticat
or.java:89)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.os.Binder.execTransact(Binder.java:404)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
dalvik.system.NativeStart.run(Native Method)
反编译GLS发现,GLS没有判断传递的参数为null的情况:
public Bundle confirmCredentials(AccountAuthenticatorResponse
paramAccountAuthenticatorResponse, Account paramAccount, Bundle
paramBundle)
{
//......
if (paramBundle != null)
{
((GLSSession)localObject2).mAccountManagerOptions = paramBundle;
((GLSSession)localObject2).mPendingIntent =
((PendingIntent)paramBundle.getParcelable("pendingIntent"));
}
((GLSSession)localObject2).addSession((Intent)localObject1);
((GLSSession)localObject2).mCallingUID = Binder.getCallingUid();
((Intent)localObject1).putExtra("accountAuthenticatorResponse",
((GLSSession)localObject2).mAccountAuthenticatorResponse);
((Intent)localObject1).putExtra("authAccount", paramAccount.name);
((Intent)localObject1).putExtra(RequestKey.SERVICE.getWire(), "SID");
((Intent)localObject1).putExtra("pendingIntent",
((GLSSession)localObject2).mPendingIntent);
multiProcessHopFix((Intent)localObject1, paramBundle);
((GLSSession)localObject2).mError = Status.BAD_AUTHENTICATION;
//......
private void multiProcessHopFix(Intent paramIntent, Bundle paramBundle)
{
paramIntent.putExtra("hasAccountManagerOptions", true);
paramIntent.putExtras(paramBundle);
}
对比GMS r2版本的GLS,发现GLS中的这段逻辑已经被修改(没有呼叫multiProcessHopFix函数
)
if (paramBundle != null)
{
((GLSSession)localObject2).mAccountManagerOptions = paramBundle;
((GLSSession)localObject2).mPendingIntent =
((PendingIntent)paramBundle.getParcelable("pendingIntent"));
multiProcessHopFix((Intent)localObject1, paramBundle);
}
((GLSSession)localObject2).addSession((Intent)localObject1);
((GLSSession)localObject2).mCallingUID = Binder.getCallingUid();
((Intent)localObject1).putExtra("accountAuthenticatorResponse",
((GLSSession)localObject2).mAccountAuthenticatorResponse);
((Intent)localObject1).putExtra("authAccount", paramAccount.name);
((Intent)localObject1).putExtra(RequestKey.SERVICE.getWire(), "SID");
((Intent)localObject1).putExtra("pendingIntent",
((GLSSession)localObject2).mPendingIntent);
((GLSSession)localObject2).mError = Status.BAD_AUTHENTICATION;
StatusHelper.BAD_AUTHENTICATION.toIntent((Intent)localObject1);
((Intent)localObject1).putExtra("authFailedMessage",
this.mContext.getText(2131230965));
((Intent)localObject1).putExtra("confirmCredentials", true);
localObject2 = new Bundle();
((Bundle)localObject2).putParcelable("intent", (Parcelable)localObject1);
return localObject2;
综上,该问题属于Google issue,并且在KK GMS r2之后的版本已经被解决。
手机已登入谷歌账户,设置屏幕图案解锁,每输入错误5次,系统会警示一次,在等待30秒后重新输入的时间里,解锁界面没有“忘记密码”选项可点击。
[SOLUTION]
该问题是早期KK GMS版本中GoogleLoginService的一个bug。使用KK mr1 r2以及之后的GMS版本,该问题已经被解决。
问题原因是由于,Keyguard會註冊一個 AccountManager callback function,並在callback function 內將 flag mEnableFallback 設成 true。只有當mEnableFallback 等於 true 時,才能在後續的動作裡將GOOGLE帐户解锁的BUTTON" 顯示出來。
但當 AccountManager callback 被呼叫時,在解析參數時 always 出現exception(見下圖 code & log)。
导致exception的原因是由于AccountManager bind到GoogleLoginService,并且调用其confimCredential方法时,返回了null。
查看Log发现,在执行confimCredential的时候,发生了NullPointerException:
04-23 06:20:58.238 3167 3180 W AccountAuthenticator:
confirmCredentials(Account {name=qi.wang.mtk@gmail.com, type=com.google})
04-23 06:20:58.238 3167 3180 W AccountAuthenticator:
JAVA.lang.NullPointerException
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
Android.os.Bundle.putAll(Bundle.java:331)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.content.Intent.putExtras(Intent.java:6376)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
com.google.android.gsf.loginservice.GoogleLoginService$AccountAuthenticato
rImpl.multiProcessHopFix(GoogleLoginService.java:541)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
com.google.android.gsf.loginservice.GoogleLoginService$AccountAuthenticato
rImpl.confirmCredentials(GoogleLoginService.java:383)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.accounts.AbstractAccountAuthenticator$Transport.confirmCredentials
(AbstractAccountAuthenticator.java:150)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.accounts.IAccountAuthenticator$Stub.onTransact(IAccountAuthenticat
or.java:89)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
android.os.Binder.execTransact(Binder.java:404)
04-23 06:20:58.238 3167 3180 W AccountAuthenticator: at
dalvik.system.NativeStart.run(Native Method)
反编译GLS发现,GLS没有判断传递的参数为null的情况:
public Bundle confirmCredentials(AccountAuthenticatorResponse
paramAccountAuthenticatorResponse, Account paramAccount, Bundle
paramBundle)
{
//......
if (paramBundle != null)
{
((GLSSession)localObject2).mAccountManagerOptions = paramBundle;
((GLSSession)localObject2).mPendingIntent =
((PendingIntent)paramBundle.getParcelable("pendingIntent"));
}
((GLSSession)localObject2).addSession((Intent)localObject1);
((GLSSession)localObject2).mCallingUID = Binder.getCallingUid();
((Intent)localObject1).putExtra("accountAuthenticatorResponse",
((GLSSession)localObject2).mAccountAuthenticatorResponse);
((Intent)localObject1).putExtra("authAccount", paramAccount.name);
((Intent)localObject1).putExtra(RequestKey.SERVICE.getWire(), "SID");
((Intent)localObject1).putExtra("pendingIntent",
((GLSSession)localObject2).mPendingIntent);
multiProcessHopFix((Intent)localObject1, paramBundle);
((GLSSession)localObject2).mError = Status.BAD_AUTHENTICATION;
//......
private void multiProcessHopFix(Intent paramIntent, Bundle paramBundle)
{
paramIntent.putExtra("hasAccountManagerOptions", true);
paramIntent.putExtras(paramBundle);
}
对比GMS r2版本的GLS,发现GLS中的这段逻辑已经被修改(没有呼叫multiProcessHopFix函数
)
if (paramBundle != null)
{
((GLSSession)localObject2).mAccountManagerOptions = paramBundle;
((GLSSession)localObject2).mPendingIntent =
((PendingIntent)paramBundle.getParcelable("pendingIntent"));
multiProcessHopFix((Intent)localObject1, paramBundle);
}
((GLSSession)localObject2).addSession((Intent)localObject1);
((GLSSession)localObject2).mCallingUID = Binder.getCallingUid();
((Intent)localObject1).putExtra("accountAuthenticatorResponse",
((GLSSession)localObject2).mAccountAuthenticatorResponse);
((Intent)localObject1).putExtra("authAccount", paramAccount.name);
((Intent)localObject1).putExtra(RequestKey.SERVICE.getWire(), "SID");
((Intent)localObject1).putExtra("pendingIntent",
((GLSSession)localObject2).mPendingIntent);
((GLSSession)localObject2).mError = Status.BAD_AUTHENTICATION;
StatusHelper.BAD_AUTHENTICATION.toIntent((Intent)localObject1);
((Intent)localObject1).putExtra("authFailedMessage",
this.mContext.getText(2131230965));
((Intent)localObject1).putExtra("confirmCredentials", true);
localObject2 = new Bundle();
((Bundle)localObject2).putParcelable("intent", (Parcelable)localObject1);
return localObject2;
综上,该问题属于Google issue,并且在KK GMS r2之后的版本已经被解决。
0 0
- 图案解锁失败后无法使用Google帐户解
- 帐户当前被锁定,所以用户 'sa' 登录失败。系统管理员无法将该帐户解锁。
- 帐户当前被锁定,所以用户 sa 登录失败。系统管理员无法将该帐户解锁 解决方法
- 设置图案解锁,重启手机,开机后立即画图解锁失败
- 使用appium进行图案解锁
- [Unity3D]使用GL实现图案解锁功能
- 【Oracle】无法对所有 EM 相关帐户解锁
- 使用UiAutomator中swipe(Point[], int)方法绘制解锁图案
- 图案解锁源码,
- HTC G11图案解锁
- 解决图案解锁问题
- 图案解锁自定义NinePointLineView
- 仿魅族数字图案解锁
- 自定义图案解锁控件
- Android 图案解锁
- 手机滑动图案解锁
- 解锁scott帐户
- oracle,scott帐户解锁
- 设计模式学习(工厂模式)
- scala基本类型和成员定义
- Nginx服务器端解决font字体文件跨域
- Android 关机(reboot)流程 -- "sys.powerctl"
- js 中的算术运算
- 图案解锁失败后无法使用Google帐户解
- 华为机试题--13.求int型数据在内存中存储时1的个数
- section 1.4 milk3
- 基于HTML 5中的Server-Sent Events的Demo示例
- iOS 中添加c++文件报错 unkown type name nsstring
- service 后台下载
- 在cisco路由器上使用TFTP备份/恢复交换路由的IOS文件
- selenium封装常用方法
- 分分钟学会【A星寻路】~~~~~~~【无上天君与梦瑶的传说】