Skip to content

feat(app): add init_boot detection to bail on incorrect boot images#8

Merged
PeroSar merged 1 commit intoAkuaTech:masterfrom
sidharthify:master
Apr 7, 2026
Merged

feat(app): add init_boot detection to bail on incorrect boot images#8
PeroSar merged 1 commit intoAkuaTech:masterfrom
sidharthify:master

Conversation

@sidharthify
Copy link
Copy Markdown
Contributor

@sidharthify sidharthify commented Apr 7, 2026

ksud will silently create a ramdisk when boot-patching a regular boot
image on a device that uses init_boot. Since this behaviour cannot be
fixed from within the app, runPatch() now detects the condition and
aborts early with a clear message.

Detection is done by running getprop as an unprivileged process
and inspecting ro.boot.* properties for any reference to init_boot.

As a fallback, the running kernel version is obtained from android.system.Os.uname().release and any kernel >= 5.15 is treated as an init_boot device.

@sidharthify
Copy link
Copy Markdown
Contributor Author

might need to add edge-cases for specific devices, needs testing though

ksud will silently create a ramdisk when boot-patching a regular boot
image on a device that uses init_boot. Since this behaviour cannot be
fixed from within the app, runPatch() now detects the condition and
aborts early with a clear message.

Detection is done by running getprop as an unprivileged process
and inspecting ro.boot.* properties for any reference to init_boot.
As a fallback, the running kernel version is obtained from
android.system.Os.uname().release and any kernel >= 5.15 is treated as an init_boot device.

Signed-off-by: sidharthify <wednisegit@gmail.com>
@PeroSar
Copy link
Copy Markdown
Member

PeroSar commented Apr 7, 2026

@cyberknight777 reports that the debug apk works as expected, merging now, thanks!

@PeroSar PeroSar merged commit 1ef073f into AkuaTech:master Apr 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants