Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Нужна инструкция по снятию логов ядра после прошивки new-boot.img

Abierto
#138 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
android, linux

Línea de trabajo

Empieza con la salida proporcionada de kptools y magiskboot, los pasos de flasheo y el issue de APatch enlazado. Documenta una forma reproducible de recopilar logs del kernel para este fallo de arranque y explica qué información deben proporcionar los colaboradores; se considera terminado cuando otro usuario puede seguir las instrucciones y producir datos de depuración accionables.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Имею на руках новый аппарат с разблокированным загрузчиком.
mt6878, Android 14, linux 6.1.75

Пробовал 0.10.7, 0.11.1-dev и самый свежак из dev ветки (собирал сам).

Похожая проблема: https://github.com/bmax121/APatch/issues/688

Мои логи (свежак из dev):

> ./kptools -p --image ./kernel.img --skey "*********" --kpimg ./kernel/kpimg --out kernel2.img
[+] kernel image_size: 0x02128a00
[+] kernel uefi header: true
[+] kernel load_offset: 0x00000000
[+] kernel kernel_size: 0x021d0000
[+] kernel page_shift: 12
[+] new kernel image ...
[+] linux_banner 1: Linux version 6.1.75-android14-11-g03016a181dee-ab11856646 (build-user@build-host) (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 Fri May 17 10:24:48 UTC 2024
[+] linux_banner offset: 0xff0108
[+] linux_banner 2: Linux version 6.1.75-android14-11-g03016a181dee-ab11856646 (build-user@build-host) (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 Fri May 17 10:24:48 UTC 2024
[+] linux_banner offset: 0x1263f88
[+] kernel version major: 6, minor: 1, patch: 75
[+] kallsyms_token_table offset: 0x01459160
[+] endian: little
[+] kallsyms_token_index offset: 0x014594e8
[+] arm64 relocation kernel_va: 0xffffffffffffffff
[?] can't find arm64 relocation table
[+] kallsyms_markers range: [0x01410048, 0x0141065c), count: 0x00000184
[+] approximate kallsyms_offsets range: [0x012640d0, 0x012c4f7c) count: 0x000183ab
[+] kallsyms_names offset: 0x012c4f90
[?] can't find kallsyms_num_syms, try: 0x000183a1
[+] names table linux_banner index: 0x0000f6ee
[+] linux_banner index: 1
[+] kallsyms_offsets offset: 0x012640d0
[+] pid_vnr: type: T, offset: 0x000df914
[+] pid_vnr verfied sp_el0, insn: 0xd5384108
[+] layout kimg: 0x0,0x2128a00, kpimg: 0x2129000,0x2c110, extra: 0x2155110,0x80, end: 0x2155190, start: 0x21d0000
[+] kpimg version: b01
[+] kpimg compile time: 07:17:03 Nov  3 2024
[+] kpimg config: android, release
[+] tcp_init_sock: type: T, offset: 0x00e0ef74
[+] map_start: 0xe0ef80, max_size: 0x800
[+] kallsyms_lookup_name: type: T, offset: 0x001a6810
[?] no symbol: printk
[+] _printk: type: T, offset: 0x00fb1394
[+] memblock_reserve: type: T, offset: 0x00337ad4
[+] memblock_free: type: T, offset: 0x003378f0
[+] memblock_mark_nomap: type: T, offset: 0x00337dc8
[+] memblock_phys_alloc_try_nid: type: T, offset: 0x01b4fe78
[?] no symbol: memblock_virt_alloc_try_nid
[+] memblock_alloc_try_nid: type: T, offset: 0x01b50114
[+] panic: type: T, offset: 0x00fb100c
[+] rest_init: type: T, offset: 0x00fba60c
[+] kernel_init: type: t, offset: 0x00fba6f0
[+] report_cfi_failure: type: T, offset: 0x0029357c
[?] no symbol: __cfi_slowpath_diag
[?] no symbol: __cfi_slowpath
[+] copy_process: type: t, offset: 0x000acf28
[+] avc_denied: type: t, offset: 0x005f2700
[+] slow_avc_audit: type: T, offset: 0x005f1520
[+] input_handle_event: type: T, offset: 0x00a4ccf0
[+] superkey: **************
[+] paging_init: type: T, offset: 0x01b3af64
[+] patch done: new-boot.img

C:\android\apatch>magiskboot.exe repack boot.img
Parsing image: [boot.img]
HEADER_VER      [4]
KERNEL_SZ       [16254232]
RAMDISK_SZ      [0]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [lz4_legacy]
VBMETA
Repack to image: [new-boot.img]
HEADER_VER      [4]
KERNEL_SZ       [16314049]
RAMDISK_SZ      [0]
PAGESIZE        [4096]
CMDLINE         []

Далее стандартно:

adb reboot bootloader
fastboot flash boot boot.img
fastboot reboot

Результат: девайс не стартует.

Примечание: Если в kernel.img самому изменить 1 байтик (в тексте сообщения) и собрать из него new-boot.img, то после прошивки всё работает. Т.е. проблема не в перепаковке.

И вот теперь хочу вам помочь (даже сам могу в коде что то подправить или добавить доп. дебаг инфу), но вот затрудняюсь со снятием логов ядра.
Подскажите как отлаживать.

Lenguaje dominante
C
Estrellas
1.6k
Forks
395
Merge medio
3 d 23 h
PR fusionados (30 d)
7

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bmax121/KernelPatch

Todos los issues de bmax121/KernelPatch

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.