Repository navigation
Hook processes that run in a Private Compute Core sandbox - #1071
Open
KadirJeager wants to merge 1 commit into
Open
KadirJeager wants to merge 1 commit into
KadirJeager wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) toLAST_PCC_UID(39999), seegetAppUidForPrivateComputeCoreUidinframeworks/baseandroid-17.0.0_r1.Android System Intelligence (
com.google.android.as) runs its main process this way on a Pixel 10 Prowith Android 17:
With
com.google.android.asin a module's scope, only:migrationwas hooked. Zygisk asked the daemonfor the main process (
GET_BINDER, callerUid=30202), and the daemon found nothing: scopes are storedunder
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 asgetAppUidForPrivateComputeCoreUid; other uids are returned as they are).getModulesForProcessandshouldSkipProcesslook the scope up with it. Zygisk already lets these uids through (they are outsidethe 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: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