Skip to content

Ultra Legacy Integration guide #20

Open
@backslashxx

Description

@backslashxx

This guide is mostly for 3.18 / 3.10 / 3.4 and possibly 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: 0201931...9744be4

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 whats missing

for 3.18 and below you probably need:

for 3.10 and below you also need:

for 3.4 and below you also need:

[1]: alternative to this is writing on start_stack while this works, this is technically incorrect, but it is likely fineee

for 3.10 / 3.4

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 a struct, so we have to remove .val as uid is uid itself, not 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.

extras

Thats it!

show depreciated

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