2

Setup wizard is getting crashed after the "set up as a new " screen when we connect to wifi it says:

checking for updates

and then Setup wizard crashes.

Android version: 7.1.2 GMS vesrion integrated in device:[7.1_r5]

We already have the framework changes added in our code but still we are getting the error https://android.googlesource.com/platform/frameworks/base/+/b3ad567%5E%21/#F1

Logs:

09-19 17:39:19.360  9982  9982 E AndroidRuntime: FATAL EXCEPTION: main

09-19 17:39:19.360  9982  9982 E AndroidRuntime: Process: com.google.android.setupwizard, PID: 9982

09-19 17:39:19.360  9982  9982 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity 
ComponentInfo{com.google.android.setupwizard/com.google.android.setupwizard.account.AccountSetupWrapper}: **java.lang.SecurityException: Permission Denial: updateLockTaskPackages() from pid=9982, uid=10028 requires android.permission.UPDATE_LOCK_TASK_PACKAGES**

09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2727)

09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.app.ActivityThread.-wrap12(ActivityThread.java)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1478)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6121)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
09-19 17:39:19.360  9982  9982 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission Denial: updateLockTaskPackages() from pid=9982, uid=10028 requires android.permission.UPDATE_LOCK_TASK_PACKAGES
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1684)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1637)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at android.app.ActivityManagerProxy.updateLockTaskPackages(ActivityManagerNative.java:6774)
09-19 17:39:19.360  9982  9982 E AndroidRuntime:    at 
SAYE
  • 1,247
  • 2
  • 20
  • 47
developer
  • 59
  • 7

2 Answers2

0

I am not sure exactly the reason why this happens, maybe your OpenGMS is not properly installed...

The setupwizard is install under "/system/priv-app", so you might change the permission level of android.permission.UPDATE_LOCK_TASK_PACKAGES in frameworks/base/core/res/AndroidManifest.xml as followings

android:protectionLevel="signature|setup|privileged"

This works in my case....

  • It works (the app not crashing now) but it failed on CTS. Therefore, this approach is not recommended. – Benny Feb 06 '18 at 12:45
0

Able to fix the issue.

There seems to be a two setupwizard which are causing the issue Add below piece of code in Android.mk for Setupwizard delivered as GMS application LOCAL_OVERRIDES_PACKAGES := Provision Setup_Wizard

developer
  • 59
  • 7