Feature request: statically compile kptools-linux and kptools-android

Open
#132 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, c, linux

Research direction

Start by inspecting the build configuration for the kptools-linux and kptools-android targets and identify their current dynamic library dependencies. Build both targets with static linking, then verify that the Linux binary runs on a non-glibc distribution and that the Android binary runs in recovery mode. Done means both binaries include the needed dependencies without relying on system libraries.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.
I am unable to run kptools-linux in distros that don't use glibc (example: alpine linux).
Also unable to run kptools-android in recovery mode.

Describe the solution you'd like
Statically compiling kptools-linux will allow it to run on any x86_64 distro, regardless if they are using glibc or not.
And statically compiling kptools-android will allow it to run in recovery mode, assuming:

  • flashing apatch.zip fails, and user has to manual patch
  • user extracting stock boot.img from device using recovery mode

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Current versions of kptools-android and kptools-linux are dynamically compiled, meaning they need the system's libraries to function.
Static compile will solve this issue by bundling all dependencies inside the binary.

Dominant language
C
Stars
1.6k
Forks
401
Avg merge
2d 14h
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bmax121/KernelPatch

All issues in bmax121/KernelPatch

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.