Skip to content

[FR]: Add System UID (1000) / Shizuku-System Mode Support for Intent Firewall #1547

Description

@MURDERDRONESN-520

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

When using Blocker with a system-privileged Shizuku (based on CVE-2024-31317, UID=1000), Blocker still shows a warning:

"Unable to acquire root permission. App may not work properly."

However, in this state, Intent Firewall (IFW) mode should work perfectly, because writing rules to /data/system/ifw/ only requires system UID (1000), not root.

But Blocker's current permission check only recognizes root, not system UID, so it refuses to enable IFW mode. This is a missed opportunity for users who cannot or do not want to use traditional root.

Describe the solution

I would like Blocker to detect and support System UID (1000) as a valid privilege level for IFW mode.

Suggested implementation:

  1. Add a privilege level detection function:
public static int getPrivilegeLevel() {
    if (isRootAvailable()) return PRIV_ROOT;
    if (Process.myUid() == Process.SYSTEM_UID) return PRIV_SYSTEM;
    return PRIV_NONE;
}
  1. Modify startup permission check:

· If System UID is detected → auto-enable IFW mode
· Show an info message instead of a warning, e.g.:
"Running in system mode (UID=1000), IFW features available"
· Skip any root acquisition attempts

  1. (Optional) Add a small UI indicator showing current privilege mode: Root / System / None

Additional context

There is an open-source system-privileged Shizuku implementation based on CVE-2024-31317, which grants system UID (1000) instead of shell UID.

Vulnerability details:

· CVE ID: CVE-2024-31317
· Affected Android versions: Android 11, 12, 12L, 13, 14
· Security patch requirement: Only works on devices with security patch BEFORE July 2024 (patches July 2024 and later have been fixed and are NOT vulnerable)
· Description: This vulnerability allows an app to elevate privileges from shell UID (2000) to system UID (1000) under certain conditions

Open-source project reference:

· GitHub repository: https://github.com/mx0341/Shizuku

This system-privileged Shizuku allows apps like Blocker to:

· Write IFW rules to /data/system/ifw/
· Perform pm hide, silent install, etc.
· Avoid traditional root detection (many apps now actively detect and refuse to run in rooted environments)

Warning: This method is for learning/research only. Improper operation (e.g., manually modifying hidden_api_blacklist_exemptions) may cause bootloop and require data wipe (factory reset). The user assumes all responsibility.

Note: This text was co-generated by myself and an AI. I provided the ideas and questions, while the AI assisted with text editing. There may be errors, please verify carefully.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions