The error you're encountering:
textjava.lang.SecurityException: Permission denial for flag 'privacy/camera_mic_icons_enabled'; allowlist permission granted, but must add flag to the allowlist
means that the camera_mic_icons_enabled flag is protected by an allowlist mechanism in Android (specifically in LineageOS 23.2, which is based on Android 13+). Even with adb root, this flag cannot be modified unless it is explicitly added to the device config allowlist.
In Android 13 and later, certain device configuration flags (especially those related to privacy and security) are restricted and require explicit allowlisting in the system's configuration. This is a security feature to prevent unauthorized modifications to sensitive settings.
The privacy/camera_mic_icons_enabled flag controls whether the camera/microphone usage indicators (the green/orange dots in the status bar) are shown. Disabling this is intentionally restricted to prevent apps or users from hiding privacy indicators.
To allow modification of this flag, you need to add it to the allowlist in the system's configuration. This requires root access and modifying system files.
Locate the allowlist file: The allowlist is typically defined in a file like:
text/vendor/etc/device_config_allowlist.xml
or
text/system/etc/device_config_allowlist.xml
(Path may vary by device/ROM.)
Edit the file:
Add the following line inside the <allowlist> tag:
xml<flag name="privacy/camera_mic_icons_enabled" />
Reboot the device: After modifying the file, reboot for changes to take effect.
Retry the command:
bashadb shell cmd device_config put privacy camera_mic_icons_enabled false
Some custom ROMs (like LineageOS) may have pre-configured allowlists or allow users to modify them more easily. Check if your ROM has a built-in toggle for this feature in Developer Options or Settings.
If modifying the allowlist is not feasible, you can hide the indicator visually using an overlay (e.g., via Substratum or LSPosed modules). This does not disable the underlying flag but hides the UI element.
Some LineageOS builds may have custom props or tweaks to disable this. Check your ROM's XDA thread or GitHub issues for device-specific solutions.
If you must disable the indicator, modifying the allowlist is the most direct method, but it requires root and file system access. If you're not comfortable with this, consider using an overlay or a custom ROM that allows it by default.
Vibe can make mistakes. Check answers. Learn more