Patched boot.img and then device bootloop

Đã đóng
#342 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, c

Hướng nghiên cứu

Start by reviewing the patch log, especially the kallsyms resolution failures and the warning that CONFIG_KALLSYMS_ALL is not set. The report identifies a vivo PD2168 running Android 11 with kernel 4.14.186 and says the patched boot image bootloops, but provides no crash logs or reproducible test steps. Progress would mean identifying the failure from device logs and reproducing a successful boot with the patched image.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Currently, there is no immediate solution. You need to troubleshoot it yourself or provide the device to me for further investigation.
The device is vivo PD2168(Y10-T1); Try all are Release version then bootloop.
kernel version: 4.14.186
Android 11
--------------------------------------------------------------------

Some kernels hide these functions: commit_creds、sys_call_table、getuid/geteuid,Then device to Crash, are bootloop, I modified the code to make the device work, but still haven't obtained su because vivo has anti ROOT


Patch Logs:



APatch Boot Image Patcher


  • Backing boot.img
  • Patching kernel
  • ./kptools -p -i kernel.ori -k kpimg -o kernel
    [+] kernel image_size: 0x01fe2000
    [+] kernel uefi header: false
    [+] kernel load_offset: 0x00080000
    [+] kernel kernel_size: 0x02949000
    [+] kernel page_shift: 12
    [+] new kernel image ...
    [+] is_gki: false
    [+] linux_banner 1: Linux version 4.14.186-gee0105cd0-dirty (compiler@comsz01110054) (Android (6443078 based on r383902) clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79), LLD 11.0.1 (/buildbot/tmp/tmp6_m7QH b397f81060ce6d701042b782172ed13bee898b79)) #1 SMP PREEMPT Thu Apr 13 10:16:25 CST 2023
    [+] linux_banner offset: 0x10b000f
    [+] kernel version major: 4, minor: 14, patch: 186
    [+] kallsyms_token_table offset: 0x0147ed00
    [+] endian: little
    [+] kallsyms_token_index offset: 0x0147f100
    [+] kallsyms_markers range: [0x0147e500, 0x0147ec30), count: 0x000000e5
    [+] kallsyms_names offset: 0x013c3700
    [+] arm64 relocation kernel_va: 0xffffff8008082000
    [+] arm64 relocation table range: [0x018b90d8, 0x01d40fc8), count: 0x0003054a
    [+] apply 0x00030549 relocation entries
    [+] kallsyms_markers range: [0x0147e500, 0x0147ec30), count: 0x000000e5
    [+] try kallsyms_offsets first for 64-bit relative-base kernel
    [?] find approximate kallsyms_offsets error
    [+] fallback to kallsyms_addresses scan
    [+] approximate kallsyms_addresses range: [0x01350c68, 0x013c1578) count: 0x0000e122
    [?] mismatch relo applied, subsequent operations may be undefined
    [+] kallsyms_names offset: 0x013c3700
    [?] can't find kallsyms_num_syms, try: 0x0000e118
    [?] no linux_banner, CONFIG_KALLSYMS_ALL=n
    [+] names table vector index: 0x00000012, pid_vnr index: 0x00000521
    [-] /home/runner/work/KernelPatch/KernelPatch/tools/kallsym.c:829/correct_addresses_or_offsets_by_vectors(); can't locate vectors
    [+] arm64 relocation kernel_va: 0xffffff8008082000
    [+] arm64 relocation table range: [0x018b90d8, 0x01d40fc8), count: 0x0003054a
    [+] apply 0x00030549 relocation entries
    [+] try kallsyms_offsets first for 64-bit relative-base kernel
    [?] find approximate kallsyms_offsets error
    [+] fallback to kallsyms_addresses scan
    [+] approximate kallsyms_addresses range: [0x01350c68, 0x013c1578) count: 0x0000e122
    [?] mismatch relo applied, subsequent operations may be undefined
    [?] can't find kallsyms_num_syms, try: 0x0000e118
    [?] no linux_banner, CONFIG_KALLSYMS_ALL=n
    [+] names table vector index: 0x00000012, pid_vnr index: 0x00000521
    [-] /home/runner/work/KernelPatch/KernelPatch/tools/kallsym.c:829/correct_addresses_or_offsets_by_vectors(); can't locate vectors
    [+] arm64 relocation kernel_va: 0xffffff8008082000, try: ffffff8008080000
    [+] arm64 relocation table range: [0x018b90d8, 0x01d40fc8), count: 0x0003054a
    [+] apply 0x00030549 relocation entries
    [+] kallsyms_markers range: [0x0147e500, 0x0147ec30), count: 0x000000e5
    [+] try kallsyms_offsets first for 64-bit relative-base kernel
    [?] find approximate kallsyms_offsets error
    [+] fallback to kallsyms_addresses scan
    [+] approximate kallsyms_addresses range: [0x01350700, 0x013c3578) count: 0x0000e5cf
    [?] mismatch relo applied, subsequent operations may be undefined
    [+] kallsyms_names offset: 0x013c3700
    [+] kallsyms_num_syms offset: 0x013c3600, value: 0x0000e5cf
    [?] no linux_banner, CONFIG_KALLSYMS_ALL=n
    [+] names table vector index: 0x00000012, pid_vnr index: 0x00000521
    [+] pid_vnr verfied sp_el0, insn: 0xd5384108
    [+] vectors index: 18, offset: 0x00002000
    [+] pid_vnr offset: 0x0005f110
    [+] kallsyms_addresses offset: 0x01350700
    [+] kernel base address: 0xffffff8008080000
    [+] ikconfig gzip blob at 0x10c1cb0, size 0x8078 (runtime puff)
    [+] layout kimg: 0x0,0x1fe2000, kpimg: 0x1fe2000,0x2e960, extra: 0x2010960,0x80, end: 0x20109e0, start: 0x2949000
    [+] kpimg version: d03
    [+] kpimg compile time: 15:13:08 Aug 5 2026
    [+] kpimg config: android, release, arm64
    [+] tcp_init_sock: type: T, offset: 0x00f32cd0
    [+] select map anchor: tcp_init_sock, offset: 0x00f32cd0
    [+] map_start: 0xf32cd0, max_size: 0x800
    [+] Synced NOP modifications from kallsym_kimg to output file (offset: 0xf32cd0, size: 0x1000)
    [+] sprintf: type: T, offset: 0x01093adc
    [+] show_stack: type: T, offset: 0x0000d8c8
    [+] kallsyms_lookup_name: type: T, offset: 0x00119914
    [+] prefer runtime forward scan anchor for kallsyms_lookup_name: show_stack, offset: 0x0000d8c8
    [+] printk: type: T, offset: 0x000c0180
    [+] memblock_reserve: type: T, offset: 0x001f34a0
    [+] memblock_free: type: T, offset: 0x001f3334
    [+] memblock_mark_nomap: type: T, offset: 0x001f36f8
    [?] no symbol: memblock_phys_alloc_try_nid
    [+] memblock_virt_alloc_try_nid: type: T, offset: 0x017d24b4
    [+] memblock_alloc_try_nid: type: T, offset: 0x017d2170
    [+] use memblock_alloc_try_nid as map phys alloc
    [+] kallsyms_lookup_name: type: T, offset: 0x00119914
    [+] printk: type: T, offset: 0x000c0180
    [+] panic: type: T, offset: 0x000330c0
    [+] rest_init: type: t, offset: 0x01096fa0
    [?] no symbol: kernel_init
    [?] no symbol kernel_init (KPM event timing degraded)
    [?] no symbol: report_cfi_failure
    [?] no symbol: __cfi_slowpath_diag
    [?] no symbol: __cfi_slowpath
    [?] no CFI failure handler symbol (report_cfi_failure / __cfi_slowpath_diag / __cfi_slowpath)
    [?] if the kernel has CONFIG_CFI_CLANG (Android 13+ GKI common), every kCFI mismatch on KP memory will panic -> random reboots; the KP core will retry resolution via kallsyms at boot
    [+] copy_process: type: t, offset: 0x00030640
    [?] no symbol: avc_denied
    [+] slow_avc_audit: type: T, offset: 0x0039f294
    [+] input_handle_event: type: t, offset: 0x00a7ca80
    [+] root_key mode with empty superkey: root_superkey zeroed
    [+] paging_init: type: T, offset: 0x017b8908
    [+] patch done: kernel
  • patch_rc=0
  • set +x
  • Repacking boot image
    [+] Starting automatic repack...
    [+] Header Version: 2, Page Size: 2048, fmt_size: 812053
    [+] Compressing new kernel with GZIP...
    [+] Final kernel size after compression (if applied): 12316102 bytes
    [+] Rest data size: 88412160 bytes, Actual used size: 923200 bytes
    [+] second_size=0,offset=13064192
    [+] recovery_dtbo_size=0,offset=13064192
    [+] dtb_size=107951,dtb_addr=0
    [+] dtb_size=0
    [+] Found AVB footer in rest data.0xb4000079e7765ec0
    [+] avb_offset=921600
    [+] Repack completed: new-boot.img
  • Detected CONFIG_KALLSYMS_ALL is not set!
  • APatch has patched but maybe your device won't boot.
  • Make sure you have original boot image backup.
  • Successfully Patched!
    Output file is written to
    /storage/emulated/0/Download/apatch_patched_11224_0.13.3_dzcx.img

Ngôn ngữ chính
C
Star
1.6k
Fork
394
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bmax121/KernelPatch

Tất cả issue của bmax121/KernelPatch

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.