Skip to content

Hook Android 17 Zygote signatures - #151

Merged
JingMatrix merged 1 commit into
masterfrom
android-17-zygote-signatures
Aug 4, 2026
Merged

Hook Android 17 Zygote signatures#151
JingMatrix merged 1 commit into
masterfrom
android-17-zygote-signatures

Conversation

@JingMatrix

@JingMatrix JingMatrix commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Android 17 reworked the app-specialize native methods, so their descriptors no longer resolve and hook_jni_methods skips them, leaving app processes uninjected.

nativeForkAndSpecialize gained a useFifoUi boolean after isTopApp, in both the Java declaration and the native registration table. nativeSpecializeAppProcess is unchanged from U and still resolves through the u entry.

QPR2 goes further and inserts a cgroupUid int between uid and gid in both methods. AOSP has published nothing past android-17.0.0_r1, so this layout comes from the framework.jar of a Pixel 10 Pro XL on QPR2 beta 2, whose debug info names the parameters:

uid, cgroupUid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName,
fdsToClose, fdsToIgnore, startChildZygote, instructionSet, appDataDir,
isTopApp, useFifoUi, pkgDataInfoList, allowlistedDataInfoList,
bindMountAppDataDirs, bindMountAppStorageDirs, bindMountSyspropOverrides

The position matters beyond the descriptor matching: reading cgroupUid as gid would hand every module a wrong gid on an entry that still resolves.

Changes

  • Add a c variant of nativeForkAndSpecialize carrying use_fifo_ui.
  • Add c_qpr2 variants of both app-specialize methods carrying cgroup_uid, and regenerate jni_hooks.hpp.

Context: Dr-TSNG/ZygiskNext#344.

Android 17 added a use_fifo_ui boolean after is_top_app in
nativeForkAndSpecialize, and QPR2 further inserted cgroup_uid between uid and
gid in both app-specialize methods, so add a variant for each layout.
@JingMatrix
JingMatrix force-pushed the android-17-zygote-signatures branch from a6fb829 to 795b041 Compare August 4, 2026 09:41
@JingMatrix

Copy link
Copy Markdown
Owner Author

@jiggs82, please test if CI build of NeoZygisk: https://github.com/JingMatrix/NeoZygisk/actions/runs/30897401244 works for you with Vector 2.2 on your Pixel 10 XL.
If not, please kindly upload logs to help us improve NeoZygisk.

ThePedroo added a commit to PerformanC/ReZygisk that referenced this pull request Aug 4, 2026
This commit fixes the wrong position for "gid" in the "nativeForkAndSpecialize" function, which the newly added "cgroupUid" goes in between "id" and "uid".

Info sourcered from: JingMatrix/NeoZygisk#151
@JingMatrix
JingMatrix merged commit 4f68167 into master Aug 4, 2026
1 check passed
HSSkyBoy pushed a commit to HSSkyBoy/NyaZygisk that referenced this pull request Aug 6, 2026
Android 17 added a use_fifo_ui boolean after is_top_app in nativeForkAndSpecialize, and QPR2 further inserted cgroup_uid between uid and gid in both app-specialize methods, so add a variant for each layout.
@JingMatrix
JingMatrix deleted the android-17-zygote-signatures branch August 8, 2026 14:17
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.

1 participant