Skip to content

Hook processes that run in a Private Compute Core sandbox - #1071

Open
KadirJeager wants to merge 1 commit into
JingMatrix:masterfrom
KadirJeager:pcc-scope
Open

KadirJeager wants to merge 1 commit into
JingMatrix:masterfrom
KadirJeager:pcc-scope

Conversation

@KadirJeager

Copy link
Copy Markdown

Problem

Android 17 can run an app's processes in a Private Compute Core (PCC) sandbox. Such a process is the
app's own (same package, process name and data directory) but runs under a uid of its own: the app's uid
moved into a new per-user range, Process.FIRST_PCC_UID (30000) to LAST_PCC_UID (39999), see
getAppUidForPrivateComputeCoreUid in frameworks/base android-17.0.0_r1.

Android System Intelligence (com.google.android.as) runs its main process this way on a Pixel 10 Pro
with Android 17:

*APP* UID 30202 ProcessRecord{… 5942:com.google.android.as/u0a202p202}
  user #0 uid=10202 ISOLATED uid=30202 …
*APP* UID 10202 ProcessRecord{… 6141:com.google.android.as:migration/u0a202}

With com.google.android.as in a module's scope, only :migration was hooked. Zygisk asked the daemon
for the main process (GET_BINDER, callerUid=30202), and the daemon found nothing: scopes are stored
under ProcessScope(processName, appUid), and the lookup used the process uid 30202.

Fix

appUidOf(uid) maps a PCC uid back to the app uid it was derived from (the same arithmetic as
getAppUidForPrivateComputeCoreUid; other uids are returned as they are). getModulesForProcess and
shouldSkipProcess look the scope up with it. Zygisk already lets these uids through (they are outside
the isolated ranges it skips), so nothing changes on the native side.

Testing

Vector v2.2 with this commit on top (daemon only, via /data/local/tmp/daemon.apk), Pixel 10 Pro,
Android 17, a legacy module scoped to com.google.android.as.

  • After a reboot the main process (uid 30202) and :captions (also 30202) load the module, next to
    :migration (10202), which loaded before as well:

    V/Vector   Loading Vector/Xposed for com.google.android.as (UID: 30202)
    V/VectorLegacyBridge   Loading legacy module com.kieronquinn.app.pcs from /data/app/…/base.apk
    I/VectorLegacyBridge   AsHooks: ASI flag overrides installed (8) on 4 reader method(s)
    V/Vector   Loading Vector/Xposed for com.google.android.as:captions (UID: 30202)
    V/Vector   Loading Vector/Xposed for com.google.android.as:migration (UID: 10202)
    
  • The module's hooks take effect in the main process: Notification Organizer, which the module turns
    on there, shows in Settings › Notifications.

🤖 Generated with Claude Code

Android 17 runs some app processes in a Private Compute Core sandbox:
the process is the app's own (its package, process name and data
directory) but runs under a uid of its own, the app's uid moved into the
PCC range 30000-39999 (Process.FIRST_PCC_UID, getAppUidForPrivateComputeCoreUid).
Android System Intelligence runs its main process this way, shown as
u0a202p202 next to the app's u0a202.

Scopes are recorded under the app's uid, so the lookup for such a process
found nothing: zygisk asked the daemon, the daemon answered that nothing
had it in scope, and only the app's ordinary processes (:migration) were
hooked. The lookup now uses the uid of the app the process belongs to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 8, 2026 08:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants