ARM64 implementation of ksymless for Android GKI kernels. discovers kallsyms data and sys_call_table without exported kernel symbols.
kallsyms internals are described in xcellerator's post.
adapted from the original x86_64 ksymless technique:
- walks x29 frame pointer chain to find do_el0_svc return addresses
- scans ADRP+ADD+B patterns to locate sys_call_table
- scans .rodata for kallsyms_token_index (256×u16)
-
- v2 layout (GKI 6.6+): offsets at token_index + 512
- v1 layout (GKI <6.6): offsets via sorted u32 + rb/num_syms pattern
- verifies with sprint_symbol, picks longest sorted u32 run
- computes all kallsyms structures from the detected layout
- implements kallsyms_name_to_addr and sym_name_at
- verifies with kprobe when available
- ARM64 device with GKI kernel
- sprint_symbol exported
- kprobe available for verification (optional, core logic works without it)
Thanks to 汐の月 for providing the device for GKI 6.6 testing.
Thanks to 阿尔托莉雅·潘德拉贡 for providing the device for GKI 6.1 testing.
Thanks to 小初 for providing the device for GKI 6.1 testing.
Thanks to haohao3001 for providing the device for GKI 6.12 testing.
GPL-2.0