0

I'm running LineageOS 16 on a OnePlus 3T. Whenever I try to open the Pixel Launcher, it crashes. In adb logcat, I saw the following lines that looked relevant:

05-25 16:13:31.293 16356 16356 W TaskStackChangeListeners: java.lang.SecurityException: Permission Denial: registerTaskStackListener() from pid=16356, uid=10003 requires android.permission.MANAGE_ACTIVITY_STACKS
05-25 16:13:31.476 16356 16356 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity}: java.lang.SecurityException: Permission Denial: setShelfHeight() from pid=16356, uid=10003 requires android.permission.STATUS_BAR

I tried running these commands to fix the problem:

adb shell pm grant com.google.android.apps.nexuslauncher android.permission.MANAGE_ACTIVITY_STACKS
adb shell pm grant com.google.android.apps.nexuslauncher android.permission.STATUS_BAR

However, they failed:

java.lang.SecurityException: Package com.google.android.apps.nexuslauncher has not requested permission android.permission.MANAGE_ACTIVITY_STACKS
java.lang.SecurityException: Package com.google.android.apps.nexuslauncher has not requested permission android.permission.STATUS_BAR

I searched for this and found a post on XDA with someone having the same problem: https://forum.xda-developers.com/android/software/pa-gapps-continuation-t3098071/post77695616#post77695616

Responses weren't very useful though. They basically boiled down to "your ROM is broken; ask your ROM developer to fix it."

So how can I fix this crash?

0

I rebooted into TWRP and edited /data/system/packages.xml. Under <package name="com.google.android.apps.nexuslauncher" and <perms>, I added the following lines:

<item name="android.permission.STATUS_BAR" granted="true" flags="0" />
<item name="android.permission.MANAGE_ACTIVITY_STACKS" granted="true" flags="0" />

When I rebooted back into Android, the crash was fixed.

  • Very strange: 1. I don't have a <perms> but <permissions> section under <package name="com.google.android.apps.nexuslauncher" 2. In /data/system/packages.xml I have: <item name="android.permission.STATUS_BAR" package="android" protection="18" /> <item name="android.permission.MANAGE_ACTIVITY_STACKS" package="android" protection="50" /> – Tom Rogie May 28 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.