CMD Patch

tytydraco

Magisk KernelSU APatch
Jul 20, 2025
Updated

Module Info

  • Source Code View Repository
  • Tags
    #CMD Patch #Kernel Command Line #Boot Image #magiskboot #Magisk Module #Android Kernel

About this module

CMD Patch is a focused Android command-line tool that uses Magisk's magiskboot binary to add arguments to the kernel command line stored in a boot image. It is intended for advanced users who already know the exact kernel parameter their device and kernel support.

One Tool for Boot Command-Line Arguments

Supply one or more supported arguments, let the tool patch the boot image, then reboot to load the new kernel command line.

Minimal Syntax

The command accepts kernel command-line arguments directly: cmdpatch <arguments>.

Boot Image Patch

Delegates boot-image unpacking and repacking to the magiskboot implementation supplied by Magisk.

Reboot Required

A running kernel cannot adopt a newly written boot command line; changes become active on the next boot.

Documented Usage

The upstream project provides the following example to enable block multiqueue for SCSI devices:

su
cmdpatch scsi_mod.use_blk_mq=1

Wait for the tool to finish and report success before rebooting. After startup, inspect the active kernel command line or relevant subsystem state to confirm that the kernel accepted the parameter.

Before Applying a Parameter

Keep a copy of the exact stock boot image for the installed build and confirm how the device restores it. An argument meaningful on one kernel can be ignored, rejected, or behave differently on another.

The repository documents the patch command and one example only; it does not claim universal support for performance tweaks, root frameworks, partition layouts, or every modern boot-image format.