22 Commits
Author SHA1 Message Date
topjohnwu 61137ff502 docs: update documentation for v31.0
Update user and developer documentation to reflect current v31.0
architecture, CLI flags, build workflows, and UI flows:

- install.md & device_info.png: update Home screen screenshot to the
  Material 3 UI, document "Patch firmware / image" options (storage,
  remote HTTPS URL, Pixel factory image auto-download), add
  vendor_boot support, update patched image filenames, and drop
  references to the removed stub app.
- build.md: update JDK requirement to JDK 25, replace binary with
  native and gen subcommands, and document scripts/env.py, clippy,
  cargo, and sccache/ccache.
- details.md: update $INTERNALDIR layout, 2SI SwitchRoot and SEPolicy
  patching strategies (Legacy now covers Android 7.x only),
  boot-complete stage, resetprop ro.* behavior, and SELinux policy
  rules.
- tools.md: add --print-rules and xperm syntax to magiskpolicy, and
  document -c and -M in su.
- guides.md: document action.sh, reference REMOVE in customize.sh,
  and clarify post-fs-data script timeout and overlay.d rules.
- boot.md: add Android 13+ GKI 2.0 (init_boot / vendor_boot) context
  and update AOSP documentation links.
- faq.md: document automatic Safe Mode bootloop recovery, Reboot menu
  Safe Mode toggle, and emulator patching commands.

Assisted-by: Gemini 4 Argon
Assisted-by: Claude Opus 5.5
2026-10-24 20:09:24 +00:00
topjohnwu 43afdf16a8 Automatically re-sign ChromeOS images on repack
Instead of requiring scripts to detect ChromeOS images and sign them
after repacking, preallocate the vblock and append the kernel blob
trailer while repacking, then generate the vblock after all other
patching is done. The image is padded to its original size after
signing, same as other boot images.

The signer now only takes the kernel payload and returns the vblock,
hashing the kernel blob incrementally. The sign-chromeos action
streams its output to disk instead of building the whole signed
image in memory.

Since ChromeOS images no longer need special handling, unpack no
longer returns 2 for them, and all ChromeOS logic is removed from
the scripts.

Assisted-by: Claude Opus 5.5
2026-10-06 23:36:12 +00:00
topjohnwu da50b5586f Sign ChromeOS boot images with magiskboot
Port the `futility vbutil_kernel --pack` code path used to sign
ChromeOS boot images into magiskboot as a new `sign-chromeos` action.
The kernel keyblock and data key are embedded into the executable, and
all signing parameters previously passed in sign_chromeos are
hardcoded. The output is bit-for-bit identical to the reference tool.

Rename the existing `sign` action to `sign-avb1` to disambiguate.

Remove the prebuilt futility binary and stop shipping the chromeos
assets folder; scripts now call magiskboot directly.

Assisted-by: Claude Opus 5.5
2026-10-06 22:59:48 +00:00
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