app: inject prebuilt bootctl into jniLibs

Download updated multi-arch prebuilt bootctl binaries built from
Android 14 (android-14.0.0_r1) and package them into jniLibs alongside
busybox instead of bundling a single binary in assets.

The new bootctl binaries support AIDL Boot HAL implementations on
Android 14+ (API 31+), fixing OTA slot switching issues on newer
devices like Pixels.

Update post-OTA install logic in the app and shell scripts to use the
native bootctl executable from MAGISKBIN.

Fixes #8824
This commit is contained in:
topjohnwu
2026-08-27 03:29:31 +00:00
committed by John Wu
parent 2fc7a6d284
commit 5480fc41c3
6 changed files with 58 additions and 27 deletions
+8 -2
View File
@@ -104,6 +104,11 @@ const val BUSYBOX_DOWNLOAD_URL =
const val BUSYBOX_ZIP_CHECKSUM =
"b4d0551feabaf314e53c79316c980e8f66432e9fb91a69dbbf10a93564b40951"
const val BOOTCTL_DOWNLOAD_URL =
"https://github.com/topjohnwu/magisk-files/releases/download/files/bootctl-android-14.0.0_r1.zip"
const val BOOTCTL_ZIP_CHECKSUM =
"2cf515aeb17259e88393a1322671ebab1968925864bc04ae57dad54e53ccf15b"
private abstract class SyncWithDir : Sync() {
@get:OutputDirectory
abstract val outputFolder: DirectoryProperty
@@ -133,8 +138,10 @@ fun Project.setupCoreLib() {
}
from(zipTree(downloadFile(BUSYBOX_DOWNLOAD_URL, BUSYBOX_ZIP_CHECKSUM)))
include(abiList.map { "$it/libbusybox.so" })
from(zipTree(downloadFile(BOOTCTL_DOWNLOAD_URL, BOOTCTL_ZIP_CHECKSUM)))
include(abiList.map { "$it/libbootctl.so" })
onlyIf {
if (inputs.sourceFiles.files.size != abiList.size * 6)
if (inputs.sourceFiles.files.size != abiList.size * 7)
throw StopExecutionException("Please build binaries first! (./build.py binary)")
true
}
@@ -169,7 +176,6 @@ fun Project.setupCoreLib() {
include("util_functions.sh", "boot_patch.sh", "addon.d.sh",
"app_functions.sh", "uninstaller.sh", "module_installer.sh")
}
from(rootFile("tools/bootctl"))
into("chromeos") {
from(rootFile("tools/futility"))
from(rootFile("tools/keys")) {