Remove the :stub Android application module, its build-logic task
integration, build.py stub building commands, and leftover stub hooks
in :core.
- Delete app/stub/ and its 60 tracked files (activity, networking,
and localized string resources)
- Remove :stub from app/settings.gradle.kts
- Remove stubTask and stub.apk syncing in Setup.kt
- Remove build_stub, stub subparser, and stub APK copying in build.py
- Simplify RootUtils by removing unused stub parameter and constructor
- Remove unused -keep rule for App constructor in proguard-rules.pro
- Update README.MD to remove stub string references
Assisted-by: Gemini 4 Argon
Move permissions, requestLegacyExternalStorage, and the debug
usesCleartextTraffic manifest from :shared into :core so the stub APK
only retains permissions required for downloading and installing the
full Magisk APK.
Assisted-by: Gemini 4 Argon
Remove support for custom/repackaged manager package names
(su_manager / repackaged_pkg) and secondary certificate verification
(repackaged_cert) from the native daemon and database.
- Remove SuManager from DbEntryKey in CXX bridge and db.rs.
- Remove unused get_db_string and rm_db_string methods from MagiskD.
- Delete check_dyn and check_stub in package.rs.
- Remove repackaged_* fields from ManagerInfo and derive Default.
- Simplify find_apk_path, get_package_uid, and get_manager to target
APP_PACKAGE_NAME and verify against TRUSTED_CERT.
- Bump SQLite DB_VERSION to 13, drop strings table on migration, and
remove create_strings from new database initialization.
- Remove obsolete hidden/stub app sections from FAQ documentation.
Assisted-by: Gemini 4 Argon
Remove dynamic APK class and resource loading across :app, :shared,
and :stub. Consolidate stub resources into :stub and remove stub
obfuscation and encryption.
- Merge :stub-res into :stub and delete the :stub-res module.
- Delete DynLoad, DelegateComponentFactory, ClassLoaders,
StubApplication, StubRootService, and dummy component classes.
- Delete StubApk, DynamicClassLoader, and CompoundEnumeration from
:shared.
- Remove lsparanoid, stub component randomization, resource
encryption, and Stub.kt from build-logic.
- Remove stubVersion and STUB_VERSION tracking.
- Simplify DownloadActivity to use direct resources and APKInstall.
- Remove isRunningAsStub and stub-specific hooks across :core.
Assisted-by: Gemini 4 Argon
Remove the ability to hide or restore the Magisk app from the
application UI in preparation for completely removing the app hiding
and stub repackaging feature.
- Remove hide and restore dialogs, ViewModel actions, and the
hide/restore toggle IconButton from HomeScreen.
- Remove the stub home screen shortcut item from SettingsScreen and
associated action in SettingsViewModel.
- Remove shortcut prompt and invalid non-root stub restore dialogs
from MainActivity.
- Remove addHomeIcon() from Shortcuts and ASKED_HOME preference from
Config.
- Remove 13 unused localized string resources across all 52 locale
strings.xml files.
Assisted-by: Gemini 4 Argon
- Use --user current for pm install, adb install, and appops set across
install_script, adb_pm_install, and test/setup scripts.
- Skip headless user 0 in get_users() on HSUM devices.
- Use --user current in app_notify for non-app UIDs instead of calling
content call against all users.
- Clear path buffer on each iteration in setup_magisk_env.
- Use --user current for am instrument in app migration tests.
Assisted-by: Gemini 4 Argon
- Extract the signing certificate from keyStore via keytool in
dump_flags_native() and emit TRUSTED_CERT in flags.rs (or an empty
slice when keyStore is not configured).
- Replace dynamic certificate extraction from stub.apk in
preserve_stub_apk() with the static TRUSTED_CERT constant.
- Move get_package_uid() out of MagiskD into a standalone function.
Assisted-by: Gemini 4 Argon
- Bump minSdk to 24 in Setup.kt, APP_PLATFORM to android-24 in
Application.mk, and update CI AVD matrices and scripts.
- Unify SePatchStrategy::Legacy with SePatchStrategy::SelinuxFs in
magiskinit to use MOCK_ENFORCE FIFO blocking and remove MOCK_REQPROT.
- Make APP_DATA_DIR a compile-time "/data/user_de" constant and remove
pre-API 24 /data/user and /data/adb fallbacks.
- Remove Android 6.0 Samsung forkAndSpecialize JNI hook signature.
- Remove pre-API 24 device-protected storage wrappers, Api23Impl in
LocaleSetting, AndroidManifest.xml stub resource workaround, and
ServiceCompat/ProcessCompat/InlinedApi workarounds in the app.
Assisted-by: Gemini 4 Argon
The AVB 1.0 BootSignature format comes from AOSP's BootSignature.java,
which signs and verifies with Java's SHA256withECDSA family. Those
produce and expect ASN.1 DER encoded (r, s) signatures.
magiskboot wrote and parsed the fixed width r || s form instead. An
image signed by AOSP with an EC key was therefore not recognized by
`magiskboot verify` (nor flagged AVB1_SIGNED by unpack), and an image
signed by `magiskboot sign-avb1` with an EC key was rejected by AOSP's
verifier with "Invalid encoding for signature".
Encode and decode ECDSA signatures as DER. RSA is unchanged.
Assisted-by: Claude Opus 5.5
Add ProgressOutputStream and wrap both the raw input stream and output
stream in runWholeFilePatcher so read and write progress and speeds are
tracked independently.
Render read and write progress on two in-place lines in the terminal to
fit narrow screens, and support multi-line in-place updates in
appendLineOnMain using ANSI cursor movement and erase-in-display.
Assisted-by: Gemini 4 Argon
Wrap the underlying raw source stream in ProgressInputStream before
decompression and compare against rawSize (entry.compressedSize for
DEFLATED zip entries) so that progress percentages and transfer speeds
reflect actual I/O instead of skewed decompressed output on sparse
images.
Also remove the redundant InflaterInputStream.close() override in
ZipChannel since Android's libcore unconditionally ends the Inflater
on close().
Assisted-by: Gemini 4 Argon
Remove the outdated patch_file_msg string resource across all locales
and add a top-level patch_image_msg description in PatchComposableDialog
explaining all supported input formats and their expected outputs.
Render the formatted description with bold spans, hanging-indent bullet
rows, a divider, and improved spacing for the radio group and URL input
field.
Assisted-by: Gemini 4 Argon
Merge "Select and patch a file" and "Download and patch a file" into a
single "Patch firmware / image" flow that lets users choose between an
app-provided firmware suggestion, a local file, or an HTTPS URL.
On Googlebooks, allow streaming the patched recovery GPT image directly
to a connected USB flash drive via Android's USB Host Bulk-Only
Transport and SCSI block commands in UsbBlockDevice, avoiding writing
the multi-gigabyte image to internal storage or needing another PC.
Assisted-by: Gemini 4 Argon
Omit PrimaryTabRow and SuLogTab in LogScreen when Info.env.isActive is
false, rendering MagiskLogTab directly below TopAppBar and skipping
SuLog database queries in LogViewModel.
Assisted-by: Gemini 4 Argon
Replace the 3-column ListItem in SuLogCard with a Row and Column
layout that places the action badge alongside the app name and gives
the UID/PID and timestamp lines the full header width without single-
line truncation.
Assisted-by: Gemini 4 Argon
With reactive su request prompts removed and superuser permissions
granted explicitly ahead of time in the app, the legacy 4-way superuser
access mode (Disabled, Apps only, ADB only, Apps & ADB) and pre-O
reauthentication after upgrade settings are no longer applicable.
ADB shell (com.android.shell) is now an explicit policy entry managed
directly in the Superuser tab, making global access filters redundant
and prone to conflicting state. Furthermore, revoking policy on package
upgrade without reactive prompting silently breaks root for upgraded
apps.
- Remove RootAccess enum and root_access checks from magiskd.
- Remove su access mode and reauthenticate settings from Manager app.
- Drop ACTION_PACKAGE_REPLACED from Receiver and manifests.
- Purge obsolete string resources across all translations.
Assisted-by: Gemini 3.8 Flash
With reactive su prompting removed, root requests from UIDs without
an existing policy in the database are rejected immediately. Previously,
RootSettings defaulted log and notify to true, causing the daemon to
notify the manager app whenever an unconfigured UID attempted to run
su.
Derive Default for RootSettings so that policy defaults to Deny with
log and notify initialized to false, preventing unwanted notifications
to the app when no database policy exists. Also simplify SuInfo::allow
and SuInfo::deny to leverage Default.
Assisted-by: Gemini 3.8 Flash
Wrap PatchFileClassifier.openStream() in ProgressInputStream via
openProgressStream() in MagiskInstallImpl to emit real-time transfer
progress and EMA-smoothed speed during Tar and RecoveryGpt processing.
Also update OtaPayloadExtractor to emit operation download progress
in-place.
Render console lines starting with '\r' in-place in TerminalEmulator
using ANSI erase-in-line ("\r\u001b[2K") and exclude them from saved
logItems in FlashViewModel.
Also fix single-byte read recursion and track skipped bytes in
ProgressInputStream.
Assisted-by: Gemini 3.8 Flash
Dragging the scrollbar thumb of a lazy list or grid scrolled by the
dragged distance, and a large scrollBy composes and measures every
item in between. On the Magisk log, fast thumb drags froze the UI
for up to several seconds per frame.
When the target is more than a viewport away, jump to the matching
item index with scrollToItem() instead; shorter moves still scroll
by pixels so slow drags stay smooth.
Assisted-by: Claude Opus 5.5
With a navigation rail there is nothing below the page, yet pressing
DPAD_DOWN on the last focusable item let the 2D focus search leave
the page and land on a rail item to the side. Cancel downward exits
from the page in rail mode; moving to the rail is still possible
with DPAD_LEFT. The bottom bar keeps its existing focus handling.
Assisted-by: Claude Opus 5.5
The navigation suite switches to a rail once the window is at least
480dp tall, but the collapsed rail with the FAB header needs about
476dp of its own height for all five destinations plus the 44dp
bottom space. In short freeform windows on desktop the last rail
item was clipped by the window edge.
The rail cannot scroll and its spacing is fixed, so fall back to the
short navigation bar when the height left for the rail after system
bars is below 520dp, the same switch the library already makes for
windows under 480dp.
Assisted-by: Claude Opus 5.5
On wide windows the DenyList and Grant search fields were centered
within their 720dp cap, while the app grid below them starts at the
left edge. With few results the cards sat far left under an indented
search field.
Keep the 720dp cap, which is the M3 search bar maximum, but align the
field to the start so it lines up with the grid and the top app bar
title. Compact windows are unchanged since the field fills the width.
Assisted-by: Claude Opus 5.5
M3 specifies that a FAB nested in a navigation rail rests at
elevation level 0. Use the library's zero elevation for the FAB in
the rail header; the FAB floating above the bottom bar keeps its
default elevation.
The rail header reserves a 56dp slot so the rail items do not jump
when the FAB shows or hides. Without root, neither the Modules nor
the Superuser tab exists and the FAB never shows, so skip the slot
and let the rail items start at the top.
Assisted-by: Claude Opus 5.5
WindowWidthSizeClass is deprecated in window-core 1.5. Check the
width breakpoints with WindowSizeClass.isWidthAtLeastBreakpoint()
instead. The adaptive library only buckets widths at 600 and 840dp,
so the expanded and compact checks behave exactly as before.
The API is only available since window-core 1.4, while adaptive
1.1.0 puts 1.3.0 on the compile classpath. Depend on window-core
1.5.0 explicitly, the version already resolved at runtime, so the
packaged dependencies do not change.
Assisted-by: Claude Opus 5.5
The install dialog always covered the whole window. Full screen
dialogs are meant for compact windows only; on a desktop window it
turned a short list of options into a huge empty page. Keep it full
screen on compact windows, and show it as a regular sized dialog with
rounded corners and the dialog surface color everywhere else.
Assisted-by: Claude Opus 5.5
Home and Settings are columns of cards, which became very wide and
sparse on large windows. Add a small AdaptiveColumns helper that
splits the content into two equal columns on expanded width windows,
capped in width and centered, and falls back to the existing single
column otherwise. Settings wraps each title and card pair so they
stay together, and moves the App section to the second column when
the root-only sections are hidden.
The Superuser detail page only has a few rows, so cap its width and
center it instead of splitting it.
Assisted-by: Claude Opus 5.5
The DenyList and Grant Superuser screens listed every app as a card
spanning the whole window, and the search field stretched across it
too. Show the apps in adaptive grids instead (staggered for DenyList,
whose cards expand to show processes), and cap the search field at
the Material search bar maximum width. Phones still get one column.
Assisted-by: Claude Opus 5.5
On wide windows the Superuser, Modules and Superuser log lists were a
single column of cards stretched across the whole window. Turn them
into lazy grids with adaptive columns: one column on phones, more as
the window gets wider. Modules use a staggered grid since its cards
expand, with a larger minimum width for the action buttons row. The
spacer items move into content padding so phones look the same.
The Magisk log is read from top to bottom, so it stays a single
column, but its cards and the log tab row are capped to a readable
width and centered.
Assisted-by: Claude Opus 5.5
The bottom navigation bar was used at every window size, which wastes
vertical space and looks out of place on wide windows such as desktop
and unfolded foldables.
Switch MainScreen to NavigationSuiteScaffold, which shows the same
bottom bar on compact windows and a navigation rail on medium and
wider windows. With a rail, the FAB moves into the rail header; its
slot is kept even when the FAB is hidden so the rail items don't jump
when switching tabs. The pager no longer swipes between tabs in rail
mode, and the custom FAB/bottom bar focus wiring only applies to the
bar layout, leaving default 2D focus search for the rail.
Assisted-by: Claude Opus 5.5
The scrollbar only had adapters for ScrollState and LazyListState, so
lazy grids could not use it. Replace the LazyListState adapter, which
estimated sizes from the visible items, with one generic adapter built
on ScrollableState.scrollIndicatorState. Lazy lists, grids and
staggered grids all provide it, so existing lists keep working and
grids can be adopted without extra code.
Assisted-by: Claude Opus 5.5
Add PixelProvider in FirmwareCrawler to crawl and suggest official
factory images for Google Pixel devices.
Fetch factory images from developers.google.com/android/images via
NetworkService with DevSite's terms acknowledgment cookie, parse the
target device table, and suggest the latest factory image (or matching
Build.ID) as candidate download in the install flow.
Add unit tests in AppTest verifying device matching, build ID
selection, Nexus device filtering, and unknown device rejection.
Assisted-by: Gemini 3.8 Flash
Add FirmwareCrawler in app:core to provide an extensible API for
crawling and suggesting firmware candidate download URLs in the
install flow.
Implement GooglebookProvider to query production_recovery.json via
NetworkService, filtering by matching Build.DEVICE or Build.MODEL to
suggest the latest official recovery image on supported devices.
Refactor InstallViewModel and InstallDialog to use the generic
FirmwareCrawler API without hardcoding device-specific logic,
presenting candidate suggestions alongside custom URL input.
Assisted-by: Gemini 3.8 Flash
Add RecoveryGptProcessor, a WholeFilePatcher for GPT disk images
such as Aluminium OS recovery_image.bin. The input is processed in a
single sequential pass: all data is copied to the output until
init_boot_a is reached, which is extracted for the standard Magisk
boot image patch. After the patched init_boot_a is written, the rest
of the input is copied. vendor_boot_b is always patched to disable
data wipe and AVB hash verification whenever it is encountered.
Subclasses can override onInitBoot and onVendorBoot to customize how
these images are handled.
The vendor_boot patching logic is implemented in app_functions.sh as
patch_al_vendor_boot, so it is also available without root access.
PatchFileClassifier now detects GPT images as RecoveryGpt, both raw
and within recovery zips. MagiskInstaller generalizes whole file
processing over WholeFilePatcher, which is now Closeable to release
resources when patching is aborted before finish.
Add testRecoveryGptProcessor in AppTest, which streams and inflates
the recovery image from a remote zip, verifies the checksums of
init_boot_a and vendor_boot_b without patching, and verifies the
output is identical to the input with streaming checksums.
Assisted-by: Claude Opus 5.5
Toggling or granting superuser privileges within the Magisk app (such
as in SuperuserViewModel or SuperuserGrantViewModel) displayed a toast
message confirming the grant or denial.
Because the user is already interacting directly with the UI where the
state is visible, these toast messages are redundant. Toast messages
should only be displayed when a process actually requests superuser
access via the su daemon.
Remove the toast notifications shown during in-app superuser policy
changes.
Assisted-by: Gemini 3.8 Flash
On Android 14+ (including Aluminium OS on Googlebooks), trackpad
two-finger scroll gestures are dispatched as MotionEvents with
CLASSIFICATION_TWO_FINGER_SWIPE. Compose UI 1.12 translates these into
PanMove pointer events with panOffset.
However, compose-foundation was not explicitly declared and was resolved
transitively to 1.10.0 via compose-material3. In foundation 1.10.0,
TrackpadScrollingLogic did not exist yet, causing two-finger swipe
gestures to be dropped and leaving scrollable views unresponsive.
Add explicit compose-foundation and compose-animation dependencies
aligned with compose-ui (1.12.1) so all core Compose modules stay in
sync and trackpad scrolling is handled properly.
Assisted-by: Gemini 3.8 Flash
Add ZipChannel, a zip archive backed by a DataChannel. open() returns
a random access DataChannel of STORED entries, and openStream()
returns a sequential stream of STORED or DEFLATED entries.
Add PatchFileClassifier to inspect the format of input files and
locate the payload to patch: RawFile, BootZip, PayloadBin, or Tar.
Zip archives are inspected with ZipChannel, and nested zips such as
the inner image zip of factory images are transparently inspected
instead. The payload is accessed as either a DataChannel or a
decompressed InputStream based on its type.
MagiskInstaller now relies on PatchFileClassifier to process inputs.
WholeFilePatcher now accepts an InputStream, as whole file formats
are always processed sequentially. ZipExtractor is removed as it is
fully superseded.
Add unit tests for ZipChannel with in-memory zips, and update
existing tests to go through PatchFileClassifier.
Assisted-by: Claude Opus 5.5
Add testTarProcessor in AppTest to test streaming and extracting
Samsung AP tar firmware packages via DataChannel.Http.
Also update DataChannel.Http to probe using standard prefix byte
ranges instead of suffix byte ranges, avoiding 501 Unsupported
client range errors on servers and CDNs such as Azure Blob and
Varnish used by GitHub Releases.
Assisted-by: Gemini 3.8 Flash
Implement AppTest with unit tests for ZipExtractor verifying
remote boot image extraction from both factory image packages
and OTA update packages using HTTP range requests.
Also add an app-test sub-command to scripts/avd.sh to run AppTest
via instrumentation on connected emulators.
Assisted-by: Gemini 3.8 Flash
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
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
Define WholeFilePatcher and ImageExtractor interfaces for whole-file
patching and single-image extraction pipelines.
Have TarProcessor implement WholeFilePatcher, and OtaPayloadExtractor
and ZipExtractor implement ImageExtractor. In MagiskInstallImpl,
streamline terminology by renaming srcBoot to targetImage, useRootDir
to useRootFs, and processArchive to processWholeFile.
Assisted-by: Gemini 3.8 Flash