Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Add a setting for usage of sha1 from ramdisk #27

@RimuruChan

Description

@RimuruChan

Apologies for any inconvenience. I'm curious about why we prefer to perform a check and use the SHA1 of a CPIO file instead of simply calculating the SHA1 of the partition itself?

if (ramdisk.exists()) {
when (Shell.cmd("$magiskboot cpio ramdisk.cpio test").exec().code) {
0 -> _sha1 = Shell.cmd("$magiskboot sha1 $boot").exec().out.firstOrNull()
1 -> _sha1 = Shell.cmd("$magiskboot cpio ramdisk.cpio sha1").exec().out.firstOrNull()
else -> log(context, "Invalid ramdisk in boot.img", shouldThrow = true)
}
} else if (kernel.exists()) {
_sha1 = Shell.cmd("$magiskboot sha1 $boot").exec().out.firstOrNull()
} else {
log(context, "Invalid boot.img, no ramdisk or kernel found", shouldThrow = true)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions