mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
When locating the compressed piggy payload in a zImage, check only formats where fmt.is_compressed() to avoid false positives on container or header formats (such as DTB or Android boot magic). Additionally, prioritize 4-byte aligned offsets since ARM kernel linker scripts align .piggydata to 4 bytes, falling back to an unaligned scan only if no candidate is found. Assisted-by: Gemini 3.8 Flash