Skip to content

Ultra Legacy Integration guide #20

@backslashxx

Description

@backslashxx

This guide is mostly for 3.18 / 3.10 / 3.4 and 3.0.

If you're planning to integrate KernelSU on an ultra-legacy device, yep this is the thread for you.
Aside from standard Legacy 4.x fixes, this repo's KernelSU also has adaptations for Ultra-Legacy.
Reference: f2afcfa...8301c4c

Lets start,

Main issue on 3.x is that, theres no LSM_HOOK_INIT / security_add_hooks.
So make sure to apply

Make sure to build your KernelSU with CONFIG_KSU_LSM_SECURITY_HOOKS=n ‼️
Now that's done, follow manual hook guide from here

Make sure to use what's appropriate to your kernel!

as for kernel side changes

for 3.18 and below you probably need:

for 3.4 and below you also need:

for 3.10 / 3.4 / 3.0

Since you're likely building your kernel without CONFIG_UIDGID_STRICT_TYPE_CHECKS, we have to patch this on KernelSU side.
if this is disabled, uid is not kuid_t, so we have to remove .val as uid is uid_t already, and theres no uid.val

[3]: inlining a massive ifdef for this was evaluated, but since it is too nasty and very few builds 3.10 and older, just edit it yourself.

Thats it!

show deprecated

READ: THESE ARE NOW USELESS

THIS IS HERE JUST FOR REFERENCE PURPOSES

extras

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions