E Zygote : java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist

whitelist

More dreaded whitelist errors! Essentially, an app is trying to do something it should not be allowed to do. You can see the logs here:

E Zygote : java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.systemui: android.permission.NAVIGATION_EDITOR, org.omnirom.omnistyle: android.permission.CHANGE_OVERLAY_PACKAGES, com.android.systemui: android.permission.PACKAGE_USAGE_STATS, com.android.settings: android.permission.ACCESS_FONT_MANAGER, com.android.settings: android.permission.NAVIGATION_EDITOR, com.android.systemui: android.permission.FORCE_STOP_PACKAGES, com.android.launcher3: android.permission.STATUS_BAR}

The funny part is, these apps are system apps, built in Resurrection Remix itself. That means that these errors are caused by the people who put RR together. Most likely, since it draws from LineageOS at it’s base, changes were made to LineageOS, and RR has not caught on yet. Either way, this is an easy fix, but will become a recurring problem.

In this RR rom, go to:

/frameworks/base/data/etc/privapp-permissions-platform.xml

and open it up. If you search in this file for com.android.launcher3, you will find it listed there, with a few “whitelisted” or pre-approved, permissions.

<privapp-permissions package=”com.android.launcher3″>
<permission name=”android.permission.BIND_APPWIDGET”/>
<permission name=”android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS”/>
<permission name=”android.permission.GET_ACCOUNTS_PRIVILEGED”/>
</privapp-permissions>

Notice that the error said that the launcher needs “android.permission.STATUS_BAR” and it’s not on the list. So, you need to add it to the list, like so:

<privapp-permissions package=”com.android.launcher3″>
<permission name=”android.permission.BIND_APPWIDGET”/>
<permission name=”android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS”/>
<permission name=”android.permission.GET_ACCOUNTS_PRIVILEGED”/><permission name=”android.permission.STATUS_BAR”/>
</privapp-permissions>

Now you will have solved your problem. However, this might not be the best place to fix this. Another place that is more likely to be useful is in this file:

/vendor/rr/config/permissions/privapp-permissions-lineage.xml

Or to make a privapp-permissions-rr.xml file.

In either case, the only issue with doing it this way is that every time you sync the repo, you will need to solve this issue again, and again, and again. So, you could take two alternative routes:

  1. Make an overlay file in your device tree and overlay these permissions.
  2. Make a pull request on the RR repo to fix the actual issue.

The second method is the best, because this helps everyone. It also clears up problems with overlay files when the original file does get fixed later. Either way, this will solve your problem.

Linux – keep it simple.

Function “appears in overlay but not in the base package”

Ah, OmniRom. Yes, I am still working on it. Hopefully you are not getting tired of these errors, but I find it helpful to log them here, and hopefully others will also. Previously, we looked at ways to use <add-resource> to add functions into a rom, but here we are just going to disable an overlay that we can work on later.

[CODE]
FAILED: /bin/bash -c “(touch out/target/common/obj/APPS/framework-res_intermediates/zipdummy ) && ((cd out/target/common/obj/APPS/framework-res_intermediates/ && jar cf package-export.apk zipdummy) ) && (zip -qd out/target/common/obj/APPS/framework-res_intermediates/package-export.apk zipdummy ) && (rm out/target/common/obj/APPS/framework-res_intermediates/zipdummy ) && (out/host/linux-x86/bin/aapt package -u -x –private-symbols com.android.internal -z –pseudo-localize -M frameworks/base/core/res/AndroidManifest.xml -S device/lge/g4-common/overlay/frameworks/base/core/res/res -S frameworks/base/core/res/res -A frameworks/base/core/res/assets –min-sdk-version 25 –target-sdk-version 25 –product default –version-code 25 –version-name 7.1.2 –skip-symbols-without-default-localization -F out/target/common/obj/APPS/framework-res_intermediates/package-export.apk )”
device/lge/g4-common/overlay/frameworks/base/core/res/res/values/config.xml:277: error: Resource at config_supportDoubleTapWake appears in overlay but not in the base package; use <add-resource> to add.
[/CODE]

So, as you can see, we have something in our overlay that is supposed to lay over the top of some source code, but the base source code doesn’t have that function to be “overlayed”. Here is where we see the overlay in device/lge/g4-common/overlay/frameworks/base/core/res/res/values/config.xml:277:

[CODE]
<!– Whether device supports double tap to wake –>
<bool name=”config_supportDoubleTapWake”>true</bool>
[/CODE]

So, we changed it to:

[CODE]
<!– Whether device supports double tap to wake
<bool name=”config_supportDoubleTapWake”>true</bool> WJH –>
[/CODE]

By commenting it out, it will no longer “overlay” it onto something that doesn’t exist. Be sure to take a look at my other article for how to use <add resource> to actually add an overlay item to the base package.

Linux – keep it simple.