Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Failed (Google pixel 2 xl) (4.4.302) kallsyms_num_syms error #105

Open
ajmz opened this issue Jul 2, 2024 · 0 comments
Open

Patch Failed (Google pixel 2 xl) (4.4.302) kallsyms_num_syms error #105

ajmz opened this issue Jul 2, 2024 · 0 comments
Assignees

Comments

@ajmz
Copy link

ajmz commented Jul 2, 2024

The following two information are what I need to fix the problem

  1. Your kernel image. boot.img is too big, you can use 'magiskboot unpack boot.img' to get kernel image (which named 'kernel' after unpack)

Upload to here or file download path

https://github.com/ods-releases/taimen/releases/download/lineage-21.0-20240622-UNOFFICIAL-taimen/boot.img

  1. The real symbol informations corresponding to your boot.img or kernel
    It can be obtained through the following two commands under root.
echo 1 > /proc/sys/kernel/kptr_restrict
cat /proc/kallsyms

Upload to here or file download path



APatch Boot Image Patcher


  • Patching kernel
  • ./kptools -p -i kernel.ori -S retepxl1 -k kpimg -o kernel -K kpatch
    [-] /home/runner/work/KernelPatch/KernelPatch/tools/patch.c:367/patch_update_img(); analyze_kallsym_info error
    [+] kernel image_size: 0x02776a00
    [+] kernel uefi header: true
    [+] kernel load_offset: 0x00080000
    [+] kernel kernel_size: 0x02d5f000
    [+] kernel page_shift: 12
    [+] new kernel image ...
    [+] linux_banner 1: Linux version 4.4.302-gb39138f0d554 (nolenjohnson@ODS-PROD) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)) merge dev #1 SMP PREEMPT Sat Jun 22 10:32:32 EDT 2024
    [+] linux_banner offset: 0x127000f
    [+] kernel version major: 4, minor: 4, patch: 255
    [+] kallsyms_token_table offset: 0x01783500
    [+] endian: little
    [+] kallsyms_token_index offset: 0x01783900
    [+] find arm64 relocation kernel_va: 0xffffff8008080000
    [+] find arm64 relocation table range: [0x01c95538, 0x02494738), count: 0x000554c0
    [+] apply 0x000554bf relocation entries
    [+] kallsyms_markers range: [0x01782300, 0x01783488), count: 0x00000231
    [+] approximate kallsyms_addresses range: [0x01484568, 0x0159c658) count: 0x0002301e
    [?] mismatch relo applied, subsequent operations may be undefined
    [+] kallsyms_names offset: 0x0159c800
    [-] /home/runner/work/KernelPatch/KernelPatch/tools/kallsym.c:442/find_num_syms(); kallsyms_num_syms error
  • patch_rc=1
  • set +x
  • Patch kernel error: 1
    Write patched boot.img failed

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

No branches or pull requests

2 participants