Skip to content

Commit 8ac0f1b

Browse files
authored
chore: update AI configs and docs
1 parent f6f56eb commit 8ac0f1b

5 files changed

Lines changed: 270 additions & 358 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ __pycache__
2727
/bundle
2828
/localversion
2929
/multi-build
30+
31+
# AI
32+
#/.claude
33+
!.gitkeep

README.md

Lines changed: 15 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ An advanced Android kernel builder with assets collection and Kali NetHunter sup
1111
- [Kernel Features](#kernel-features)
1212
- [Supported Devices \& ROMs](#supported-devices--roms)
1313
- [Usage](#usage)
14-
- [Prerequisites](#prerequisites)
15-
- [Kernel](#kernel)
16-
- [Assets](#assets)
17-
- [Bundle](#bundle)
14+
- [Prerequisites](#prerequisites)
1815
- [Examples](#examples)
1916
- [See also](#see-also)
2017
- [Credits](#credits)
@@ -82,33 +79,16 @@ The custom build wrapper (aka "zkb") consists of 2 core components and 3 primary
8279

8380
Components:
8481

85-
- `kernel_builder`;
86-
- `assets_collector`.
82+
- kernel_builder ;
83+
- assets_collector.
8784

8885
Commands:
8986

90-
- `kernel`;
91-
- `assets`;
92-
- `bundle`.
87+
- kernel ;
88+
- assets ;
89+
- bundle.
9390

94-
```help
95-
$ python3 zkb --help
96-
usage: zkb [-h] [--clean] {kernel,assets,bundle} ...
97-
98-
A custom builder for the zero_kernel.
99-
100-
positional arguments:
101-
{kernel,assets,bundle}
102-
kernel build the kernel
103-
assets collect assets
104-
bundle build the kernel + collect assets
105-
106-
optional arguments:
107-
-h, --help show this help message and exit
108-
--clean clean the root directory
109-
```
110-
111-
### Prerequisites
91+
## Prerequisites
11292

11393
**It is highly recommended to use `docker` option to run this tool.** For that you need Docker Engine or Docker Desktop, depending on your OS.
11494

@@ -124,126 +104,37 @@ To run this tool in a `local` environment, you will need:
124104
```sh
125105
# install uv version from project file
126106
python3 -m pip install uv==$(cat ./uv-version.txt | tr -d ' \n')
107+
127108
# make zkb/ internal imports visible to itself
128109
export PYTHONPATH=$(pwd)
129-
# prepare and activate dev environment
130-
uv sync --frozen --no-install-project
110+
111+
# prepare and activate environment
112+
uv sync --frozen
131113
source .venv/bin/activate
132114
```
133115

134116
Once you are finished working with the project, don't forget to disable the virtual environment (venv) via simple `deactivate`.
135117

136-
### Kernel
137-
138-
Kernel build process can be launched using the `kernel` subcommand.
139-
140-
```help
141-
$ python3 zkb kernel --help
142-
usage: zkb kernel [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
143-
--codename CODENAME --lkv LKV [-c] [--clean-image] [--ksu]
144-
145-
options:
146-
-h, --help show this help message and exit
147-
--build-env {local,docker,podman}
148-
select build environment
149-
--base {los,pa,x,aosp}
150-
select a kernel base for the build
151-
--codename CODENAME select device codename
152-
--lkv LKV select Linux Kernel Version
153-
-c, --clean don't build anything, only clean kernel directories
154-
--clean-image remove Docker/Podman image from the host machine after
155-
build
156-
--ksu add KernelSU support
157-
```
158-
159-
### Assets
160-
161-
As mentioned, there is also an asset downloader, which can collect latest versions of ROM, TWRP, Magisk and it's modules, Kali Chroot etc.
162-
163-
```help
164-
$ python3 zkb assets --help
165-
usage: zkb assets [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
166-
--codename CODENAME --chroot {full,minimal} [--rom-only]
167-
[--clean-image] [--clean] [--ksu]
168-
169-
options:
170-
-h, --help show this help message and exit
171-
--build-env {local,docker,podman}
172-
select build environment
173-
--base {los,pa,x,aosp}
174-
select a kernel base for the build
175-
--codename CODENAME select device codename
176-
--chroot {full,minimal}
177-
select Kali chroot type
178-
--rom-only download only the ROM as an asset
179-
--clean-image remove Docker/Podman image from the host machine after
180-
build
181-
--clean autoclean 'assets' folder if it exists
182-
--ksu add KernelSU support
183-
--defconfig DEFCONFIG
184-
specify path to custom defconfig
185-
```
186-
187-
### Bundle
188-
189-
The `bundle` command is a combined usage of kernel builder and assets collector core modules.
190-
191-
This is especially useful for linking the kernel build with the appropriate ROM build.
192-
193-
There are cases when an old kernel build is used with the newer ROM build. Such cases can ultimately lead to your system working improperly or breaking down completely, which is why it is important to use a *specific* kernel build with a corresponding ROM build.
194-
195-
Currently, there are three types of packaging available:
196-
197-
- `conan`;
198-
- `slim`;
199-
- `full`.
200-
201-
Options `full` and `conan` collect all of the assets required to successfuly flash the kernel onto your device. The difference between the two is that `full` option places everything into a local directory, while `conan` organizes everything as a Conan package.
202-
203-
Option named `slim` is a much lighter version of `full` packaging, as only the ROM is collected from the asset list. This is done to reduce package sizes while ensuring the kernel+ROM compatibility.
204-
205-
```help
206-
$ python3 zkb bundle --help
207-
usage: zkb bundle [-h] --build-env {local,docker,podman} --base {los,pa,x,aosp}
208-
--codename CODENAME --lkv LKV --package-type
209-
{conan,slim,full} [--conan-upload] [--clean-image] [--ksu]
210-
211-
options:
212-
-h, --help show this help message and exit
213-
--build-env {local,docker,podman}
214-
select build environment
215-
--base {los,pa,x,aosp}
216-
select a kernel base for the build
217-
--codename CODENAME select device codename
218-
--lkv LKV select Linux Kernel Version
219-
--package-type {conan,slim,full}
220-
select package type of the bundle
221-
--conan-upload upload Conan packages to remote
222-
--clean-image remove Docker/Podman image from the host machine after
223-
build
224-
--ksu add KernelSU support
225-
```
226-
227118
## Examples
228119

229120
Here are some examples of commands:
230121

231122
**(Recommended)** Build kernel and collect ROM via Docker:
232123

233124
```sh
234-
python3 zkb bundle --build-env=docker --base=los --codename=dumpling --lkv=4.4 --package-type=slim
125+
uv run zkb bundle --build-env=docker --base=los --codename=dumpling --lkv=4.4 --package-type=slim
235126
```
236127

237128
Build kernel locally:
238129

239130
```sh
240-
python3 zkb kernel --build-env=local --base=los --codename=dumpling --lkv=4.4
131+
uv run zkb kernel --build-env=local --base=los --codename=dumpling --lkv=4.4
241132
```
242133

243134
Collect all of the assets locally:
244135

245136
```sh
246-
python3 zkb assets --build-env=local --base=los --codename=dumpling --package-type=full
137+
uv run zkb assets --build-env=local --base=los --codename=dumpling --package-type=full
247138
```
248139

249140
## See also
@@ -254,4 +145,4 @@ python3 zkb assets --build-env=local --base=los --codename=dumpling --package-ty
254145

255146
## Credits
256147

257-
- [kali-nethunter-kernel](https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel): official kernel patches from Kali NetHunter project.
148+
- [kali-nethunter-kernel](https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel) : Official kernel patches from Kali NetHunter project.

uv-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.7
1+
0.11.12

0 commit comments

Comments
 (0)