official LineageOS on nicepool: APpatch patching fails but only if done via recovery sideload

Open
#332 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 4 days

@bmax121 is already working on this.

Since Oct 14, 2026.

Assessment

This issue has not been assessed yet.

Description

LineageOS on the nicepool Android TV box

when i run the APatch app in my phone and pass it nicepool's boot.img, the patch succeeds and produces an image. (the image has issues if flashed, but that is a different question.)

but if i sideload APatch (11224) to the LineageOS recovery (latest), the flash fails complaining that CONFIG_KALLSYMS is not set.

but it is set! in recovery:

nicepool:/ # zcat /proc/config.gz | grep 'KALLSYMS'                                                               
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set
CONFIG_KALLSYMS_BASE_RELATIVE=y

nicepool:/ # echo 1 > /proc/sys/kernel/kptr_restrict

nicepool:/ # head /proc/kallsyms -n3
ffffff8009080000 t _head
ffffff8009080000 T _text
ffffff8009080800 T do_undefinstr

i think the problem is that, although the kernel is 64-bit, the runtime environment (android and recovery) are 32-bit. afaik, this is how the reference platforms for these chips (Amlogic S905 family) are released. the reason is the small amount of ram and flash these devices have.

take a look:

nicepool:/ # uname -a
Linux localhost 4.9.337 #1 SMP PREEMPT Thu Aug 27 19:18:26 EDT 2026 armv8l Toybox

nicepool:/ # zcat /proc/config.gz | grep -E 'CONFIG_ARM64|CONFIG_64BIT'                                              
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARM64_PAGE_SHIFT=12
CONFIG_ARM64_CONT_SHIFT=4
CONFIG_ARM64_ERRATUM_826319=y
CONFIG_ARM64_ERRATUM_827319=y
CONFIG_ARM64_ERRATUM_824069=y
CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_845719=y
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_ARM64_ERRATUM_1024718=y
CONFIG_ARM64_ERRATUM_1188873=y
CONFIG_ARM64_ERRATUM_1742098=y
CONFIG_ARM64_4K_PAGES=y
# CONFIG_ARM64_16K_PAGES is not set
# CONFIG_ARM64_64K_PAGES is not set
CONFIG_ARM64_VA_BITS_39=y
# CONFIG_ARM64_VA_BITS_48 is not set
CONFIG_ARM64_VA_BITS=39
CONFIG_ARM64_SSBD=y
CONFIG_ARM64_SW_TTBR0_PAN=y
CONFIG_ARM64_HW_AFDBM=y
CONFIG_ARM64_PAN=y
# CONFIG_ARM64_LSE_ATOMICS is not set
CONFIG_ARM64_VHE=y
CONFIG_ARM64_UAO=y
CONFIG_ARM64_MODULE_CMODEL_LARGE=y
CONFIG_ARM64_MODULE_PLTS=y
# CONFIG_ARM64_PTDUMP is not set
# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
CONFIG_ARM64_CRYPTO=y

nicepool:/ # getprop ro.product.cpu.abi
armeabi-v7a

nicepool:/ # getprop ro.zygote
zygote32

nicepool:/ # file /system/bin/linker
/system/bin/linker: ELF shared object, 32-bit LSB arm, EABI5, soft float, BuildID=75c044f4789ea6a2cdbe4e1eabe052dd, not stripped

nicepool:/ # file /system/bin/recovery                                                                               
/system/bin/recovery: ELF shared object, 32-bit LSB arm, EABI5, soft float, dynamic (/system/bin/linker), for Android 35, BuildID=031ca530644a26fba6921755711e6271, stripped

now a different issue altogether is actually trying to boot the patched image. the device shows the bootloader splash image for a bit, then goes dark and bootloops. the reboot happens fairly quickly. i don't know how to start debugging this. maybe the device has a serial console inside, idk. i imagine the same issue happens in other S905 boxes.

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bmax121/KernelPatch

All issues in bmax121/KernelPatch

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.