Repack Failed (7TProNR / HD1925) (4.14.190-perf+)
Maintainers usually reply within 4 days
@bmax121 is already working on this.
Since Apr 20, 2026.
Assessment
This issue has not been assessed yet.
Description
hello, i've tried patching my (already patched) boot.img using APatch Manager, and kptools (both Windows and WSL)
my phone is OnePlus 7T Pro McLaren (HD1925) and kernel is Linux localhost 4.14.190-perf+ #1 SMP PREEMPT Mon May 13 05:22:39 EEST 2024 aarch64 Toybox, and i believe the kernel is in RAW format
this is the log i got from APatch Manager:
| APatch Log | Screenshot |
|---|---|
****************************
****************************
APatch Boot Image Patcher
****************************
- Patching kernel
+ ./kptools -p -i kernel.ori -k kpimg -o kernel
[?] kernel image with UNCOMPRESSED_IMG header
[+] kernel image_size: 0x0348e271
[+] kernel uefi header: false
[+] kernel load_offset: 0x00080000
[+] kernel kernel_size: 0x03864000
[+] kernel page_shift: 12
[+] patched kernel image ...
[+] linux_banner 1: Linux version 4.14.190-perf+ (nobody@android-build) (Android
(10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2
(https://android.googlesource.com/toolchain/llvm-project
d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT
Mon May 13 05:22:39 EEST 2024
[+] linux_banner offset: 0x198000f
[+] kernel version major: 4, minor: 14, patch: 190
[+] kallsyms_token_table offset: 0x0223d000
[+] endian: little
[+] kallsyms_token_index offset: 0x0223d400
[+] arm64 relocation kernel_va: 0xffffff8008080000
[+] arm64 relocation table range: [0x0287a418, 0x02c3a9e8), count: 0x0002803e
[+] apply 0x0002803d relocation entries
[+] kallsyms_markers range: [0x0223be00, 0x0223cfe0), count: 0x0000023b
[+] approximate kallsyms_offsets range: [0x01fbe8f8, 0x0204d608) count: 0x00023b44
[+] kallsyms_names offset: 0x0204d900
[+] kallsyms_num_syms offset: 0x0204d800, value: 0x00023b42
[+] names table linux_banner index: 0x000118a4
[+] linux_banner index: 0
[+] kallsyms_offsets offset: 0x01fbe900
[+] pid_vnr: type: T, offset: 0x0006c168
[+] pid_vnr verfied sp_el0, insn: 0xd5384108
[+] layout kimg: 0x0,0x3052010, kpimg: 0x3053000,0x2c330, extra: 0x307f330,0x80,
end: 0x307f3b0, start: 0x3864000
[+] kpimg version: d01
[+] kpimg compile time: 09:04:16 Apr 19 2026
[+] kpimg config: android, release
[+] tcp_init_sock: type: T, offset: 0x015ea974
[+] no first pac instruction found
[+] map_start: 0x15ea970, max_size: 0x800
[+] tcp_init_sock: type: T, offset: 0x015ea974
[+] Synced NOP modifications from kallsym_kimg to output file (offset: 0x15ea974,
size: 0x1000)
[+] kallsyms_lookup_name: type: T, offset: 0x0011791c
[+] printk: type: T, offset: 0x000cee5c
[+] memblock_reserve: type: T, offset: 0x001fffec
[+] memblock_free: type: T, offset: 0x001fff58
[+] memblock_mark_nomap: type: T, offset: 0x002002b8
[?] no symbol: memblock_phys_alloc_try_nid
[+] memblock_virt_alloc_try_nid: type: T, offset: 0x027a4b08
[+] memblock_alloc_try_nid: type: T, offset: 0x027a4430
[+] panic: type: T, offset: 0x0003fb8c
[+] rest_init: type: t, offset: 0x017fad48
[+] kernel_init: type: t, offset: 0x017fae24
[?] no symbol: report_cfi_failure
[?] no symbol: __cfi_slowpath_diag
[?] no symbol: __cfi_slowpath
[+] copy_process: type: t, offset: 0x0003c5c8
[+] avc_denied: type: t, offset: 0x0042aa10
[+] slow_avc_audit: type: T, offset: 0x00429b14
[+] input_handle_event: type: t, offset: 0x00ae5154
[+] root_key mode with empty superkey: root_superkey zeroed
[+] paging_init: type: T, offset: 0x02788af0
[+] patch done: kernel
+ patch_rc=0
+ set +x
- Repacking boot image
Segmentation fault
- Successfully Patched!
Write patched boot.img failed
**************************** |
and this is what i get on my PC (both native and WSL):
awais@AWAiS:<somePath>/apatch$ ./kptools-linux unpack boot.img
[+] Kernel size: 55108229,Header Version: 2, Offset: 4096
[+] Auto-detect compression method: 0
[+] Treating as Raw Kernel (or unknown format).
[+] Saved raw kernel to kernel
awais@AWAiS:<somePath>/apatch$ mv kernel kernel-b
awais@AWAiS:<somePath>/apatch$ ./kptools-linux -p --image kernel-b --skey "<NUH-UH>" --kpimg kpimg-android --out kernel
[?] kernel image with UNCOMPRESSED_IMG header
[+] kernel image_size: 0x0348e271
[+] kernel uefi header: false
[+] kernel load_offset: 0x00080000
[+] kernel kernel_size: 0x03864000
[+] kernel page_shift: 12
[+] patched kernel image ...
[+] linux_banner 1: Linux version 4.14.190-perf+ (nobody@android-build) (Android (10087095, +pgo, +bolt, +lto, -mlgo, based on r487747c) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362), LLD 17.0.2) #1 SMP PREEMPT Mon May 13 05:22:39 EEST 2024
[+] linux_banner offset: 0x198000f
[+] kernel version major: 4, minor: 14, patch: 190
[+] kallsyms_token_table offset: 0x0223d000
[+] endian: little
[+] kallsyms_token_index offset: 0x0223d400
[+] arm64 relocation kernel_va: 0xffffff8008080000
[+] arm64 relocation table range: [0x0287a418, 0x02c3a9e8), count: 0x0002803e
[+] apply 0x0002803d relocation entries
[+] kallsyms_markers range: [0x0223be00, 0x0223cfe0), count: 0x0000023b
[+] approximate kallsyms_offsets range: [0x01fbe8f8, 0x0204d608) count: 0x00023b44
[+] kallsyms_names offset: 0x0204d900
[+] kallsyms_num_syms offset: 0x0204d800, value: 0x00023b42
[+] names table linux_banner index: 0x000118a4
[+] linux_banner index: 0
[+] kallsyms_offsets offset: 0x01fbe900
[+] pid_vnr: type: T, offset: 0x0006c168
[+] pid_vnr verfied sp_el0, insn: 0xd5384108
[+] layout kimg: 0x0,0x3052010, kpimg: 0x3053000,0x2c330, extra: 0x307f330,0x80, end: 0x307f3b0, start: 0x3864000
[+] kpimg version: d01
[+] kpimg compile time: 09:04:16 Apr 19 2026
[+] kpimg config: android, release
[+] tcp_init_sock: type: T, offset: 0x015ea974
[+] no first pac instruction found
[+] map_start: 0x15ea970, max_size: 0x800
[+] tcp_init_sock: type: T, offset: 0x015ea974
[+] Synced NOP modifications from kallsym_kimg to output file (offset: 0x15ea974, size: 0x1000)
[+] kallsyms_lookup_name: type: T, offset: 0x0011791c
[+] printk: type: T, offset: 0x000cee5c
[+] memblock_reserve: type: T, offset: 0x001fffec
[+] memblock_free: type: T, offset: 0x001fff58
[+] memblock_mark_nomap: type: T, offset: 0x002002b8
[?] no symbol: memblock_phys_alloc_try_nid
[+] memblock_virt_alloc_try_nid: type: T, offset: 0x027a4b08
[+] memblock_alloc_try_nid: type: T, offset: 0x027a4430
[+] panic: type: T, offset: 0x0003fb8c
[+] rest_init: type: t, offset: 0x017fad48
[+] kernel_init: type: t, offset: 0x017fae24
[?] no symbol: report_cfi_failure
[?] no symbol: __cfi_slowpath_diag
[?] no symbol: __cfi_slowpath
[+] copy_process: type: t, offset: 0x0003c5c8
[+] avc_denied: type: t, offset: 0x0042aa10
[+] slow_avc_audit: type: T, offset: 0x00429b14
[+] input_handle_event: type: t, offset: 0x00ae5154
[+] superkey: <NUH-UH>
[+] paging_init: type: T, offset: 0x02788af0
[+] patch done: kernel
awais@AWAiS:<somePath>/apatch$ ls
boot.img kernel kernel-b kpimg-android kptools-linux
awais@AWAiS:<somePath>/apatch$ rm bo^C
awais@AWAiS:<somePath>/apatch$ ./kptools-linux repack boot.img
[+] Starting automatic repack...
[+] Header Version: 2, Page Size: 4096, fmt_size: 1712111
[+] Detected DTB appended to kernel. Size: 4255633
[+] Final kernel size after compression (if applied): 50852804 bytes
[+] Rest data size: 45547520 bytes, Actual used size: 5968552 bytes
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 401
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bmax121/KernelPatch
-
booloopOpen
Difficulty 5/5 Over a week Newbie friendliness 6/100
bmax121/KernelPatch#346 ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bmax121/KernelPatch#344 ·
Maintainers usually reply within 4 days
-
Patch Failed (Redmi Note 9 Merlin) (4.19.325-cip136-st20-g26d86a5027fb)Possibly taken @bmax121 claimed this 24 days ago. Open
bmax121/KernelPatch#343 · 1 assignee ·
Maintainers usually reply within 4 days
-
official LineageOS on nicepool: APpatch patching fails but only if done via recovery sideloadMay be free again @bmax121 claimed this 43 days ago, and no pull request is open. Open
bmax121/KernelPatch#332 · 1 assignee ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bmax121/KernelPatch#329 · 2 comments ·
Maintainers usually reply within 4 days
All issues in bmax121/KernelPatch
Similar issues
-
bug severity: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AlessandroSangiuliano/Uros#1014 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
OpenXiangShan/NEMU#1314 ·
Maintainers usually reply within 1 day
-
`get_options()` repeats the first byte when hex-encoding octet stringsPossibly taken @rue19 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
OpenPrinting/cups#1830 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
micropython/micropython#20020 ·
Maintainers usually reply within 1 day