Commit Graph
19 Commits
Author SHA1 Message Date
AceGuru-mjh 492e4e0c8f docs: sync CLI usage in tools.md with current code
The usage blocks in docs/tools.md had drifted behind the actual CLI
output of the tools:

- su: add -d/--drop-cap (added in ff18cb8, missing from docs since 2023)
- resetprop: document wait mode (-w, NAME/OLD_VALUE), --compact,
  -P, -Z and the mode-based flag semantics; the old block predated
  the wait-mode rewrite entirely
- magiskboot unpack: document the 3:vendor_boot return value
  (RETURN_VENDOR in bootimg.cpp)
- magiskboot split: document the -n flag (skip decompression)
- magiskboot cpio: document ls [-r] [PATH], fix test return values
  to 0:stock/1:Magisk/2:unsupported (test returns on first match,
  the old 'bitwise or-ed' wording was misleading), document the -n
  flag of backup ORIG

All blocks now match the usage strings shipped in the binaries
(su.cpp, resetprop/cli.rs, boot/cli.rs, boot/cpio.rs).
2026-10-05 22:09:19 -07:00
vvb2060 160fb3e40b su: pass all unknown options 2026-10-05 20:03:11 -07:00
topjohnwu 15062974a3 magiskboot: allow free zImage piggy payload size
Support dynamic zImage piggy payload sizes during repacking by updating
the zImage decompressor stub headers, symbol tables, and GOT entries.

Previously, magiskboot padded repacked zImage files to preserve the
exact original file size. For non-gzip compressed zImages (such as XZ),
repacking with a different payload size broke stub symbol resolution
and resulted in ununpackable or unbootable images.

Key changes:
- Encapsulate zImage parsing and patching in a dedicated struct ZImage
  in Rust with CXX FFI, new_head, and new_tail methods.
- Locate piggy_end using table references or GOT table entries bounded
  by LC0.
- Relocate LC0 table entries, LC1 table, and GOT table entries with
  4-byte padding/alignment when payload size changes.
- Relocate R_ARM_GOTPC PC-relative literal pools in decompressor .text.
- Append uncompressed size for non-gzip algorithms per size_append.
- Remove zopfli compression support across magiskboot as dynamic zImage
  piggy sizing supersedes the need for exact size matching.

Fix #9880

Assisted-by: Gemini 3.7 Flash
2026-08-25 19:09:29 +00:00
Wang Han 53d7cbc11b Clarify magiskboot requirements for repacking img 2024-09-08 01:13:46 -07:00
b6c24a3a8a No more sony init.real tricks
Co-authored-by: canyie <a1364259@163.com>
Co-authored-by: vvb2060 <vvb2060@gmail.com>
2024-02-29 23:40:00 -08:00
canyie 68442f38ac Misc changes
- actions: Update all actions/checkout references to v4
- magiskboot: Add missing new line to dtb help message
- docs: Update documents, fix some errors and remove outdated info
2023-11-17 13:58:41 -08:00
topjohnwu d89a568897 Update v25.1 docs 2022-06-19 02:35:05 -07:00
canyie 4f1a1879e5 Misc QoL changes
- su: Preserve correct capacity to avoid vector reallocation
- su: Properly format code
- daemon: Remove useless `if`
- docs: Remove outdated info
2022-05-06 01:01:58 -07:00
残页 a609e0aad4 Update tools.md
magiskpolicy is no longer an applet of magiskinit
2022-04-13 23:19:36 -07:00
topjohnwu 3b2db56243 Update documentation 2022-01-25 02:32:52 -08:00
topjohnwu 2d5cf8a6fe Push release notes 2020-11-13 04:32:20 -08:00
topjohnwu fbb4f85ef0 Update documentation 2020-10-03 02:53:10 -07:00
topjohnwu 15bd2da824 Update magiskboot docs 2020-01-02 13:46:59 +08:00
topjohnwu bd438ca288 Update docs 2020-01-02 13:45:08 +08:00
topjohnwu 9329094a4e Update documentations 2019-09-19 05:00:29 -04:00
topjohnwu e784212283 Update tools docs 2019-03-28 04:54:06 -04:00
topjohnwu e62630cf3e Add MagiskHide tutorials 2018-10-15 18:04:51 -04:00
topjohnwu 8d150dd67a Update documentation
Still WIP
2018-10-15 00:46:37 -04:00
topjohnwu 89ec7dad2b Update documentation to v15.2 2018-01-08 22:33:55 +08:00