Patched boot.img and then device bootloop
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- android, c
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C
- スター
- 1.6k
- フォーク
- 394
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bmax121/KernelPatch のほかの issue
-
official LineageOS on nicepool: APpatch patching fails but only if done via recovery sideload対応中かも @bmax121 が 19 日前に担当しました。 オープン
bmax121/KernelPatch#332 · 担当者 1 名 ·
メンテナーはふだん 4 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
bmax121/KernelPatch#329 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
kernel stack overflow: handle_supercmd 与 supercmd_echo 各持 4KB 栈缓冲区嵌套,event 上报改写 argv 时栈耗尽 panicオープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
bmax121/KernelPatch#323 ·
メンテナーはふだん 4 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
bmax121/KernelPatch#319 · コメント 9 件 ·
メンテナーはふだん 4 日以内に返信
-
SUPERCALL_KSTORAGE_LIST_IDS writes to an unvalidated userspace pointer with a raw memcpy → kernel KEオープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
bmax121/KernelPatch#308 ·
メンテナーはふだん 4 日以内に返信
bmax121/KernelPatch の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
メンテナーはふだん 1 日以内に返信
-
area/infrared type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
DarkFlippers/unleashed-firmware#1201 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pocoproject/poco#5626 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
FujiNetWIFI/fujinet-lib#272 ·
メンテナーはふだん 1 日以内に返信