Skip to content

Commit af5d331

Browse files
committed
release: new x_kernel base, rebranding, preps for 4.14
1 parent d0058a9 commit af5d331

30 files changed

Lines changed: 855 additions & 213 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
default: "false"
1313
type: choice
1414
options:
15-
- true
16-
- false
15+
- "true"
16+
- "false"
1717

1818
permissions:
1919
contents: write

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/rtl8812au
1010
/AnyKernel3
1111
/KernelSU
12+
/*_kernel_*
1213

1314
# misc local artifacts
1415
/*.log
@@ -17,3 +18,4 @@
1718
/source
1819
/bundle
1920
/localversion
21+
/multi-slim

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM python:3.11-slim-bookworm as base
1+
FROM python:3.12-slim-bookworm as base
22

33
# variable store
4-
ARG WDIR="/s0nh_build"
4+
ARG WDIR="/zero_build"
55
ENV CONAN_UPLOAD_CUSTOM 0
66

77
# install basic packages
@@ -19,7 +19,9 @@ RUN \
1919
make \
2020
zip \
2121
bc \
22-
libgpgme-dev
22+
libgpgme-dev \
23+
bison \
24+
flex
2325

2426
# place sources from host to container
2527
COPY . $WDIR

README.md

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# s0nh_kernel — an Android kernel w/ Kali NetHunter support
1+
# zero_kernel — an Android kernel w/ Kali NetHunter support
22

33
## **Disclaimer**
44

@@ -8,24 +8,26 @@
88

99
**Anything you do with this kernel you do at your own risk. By using it, you take the responsibility upon yourself and in case of any issue you are not to blame me or other related contributors.**
1010

11-
## **Contents**
11+
## Contents
1212

13-
- [s0nh\_kernel — an Android kernel w/ Kali NetHunter support](#s0nh_kernel--an-android-kernel-w-kali-nethunter-support)
13+
- [zero\_kernel — an Android kernel w/ Kali NetHunter support](#zero_kernel--an-android-kernel-w-kali-nethunter-support)
1414
- [**Disclaimer**](#disclaimer)
15-
- [**Contents**](#contents)
16-
- [**Kernel Features**](#kernel-features)
17-
- [**Supported ROMs and devices**](#supported-roms-and-devices)
18-
- [**ROMs**](#roms)
19-
- [**Devices**](#devices)
20-
- [**Usage**](#usage)
21-
- [**Prerequisites**](#prerequisites)
22-
- [**Kernel**](#kernel)
23-
- [**Assets**](#assets)
24-
- [**Bundle**](#bundle)
25-
- [**Examples**](#examples)
26-
- [**See also**](#see-also)
27-
28-
## **Kernel Features**
15+
- [Contents](#contents)
16+
- [Kernel Features](#kernel-features)
17+
- [Supported ROMs and devices](#supported-roms-and-devices)
18+
- [ROMs](#roms)
19+
- [Devices](#devices)
20+
- [Important Note](#important-note)
21+
- [Usage](#usage)
22+
- [Prerequisites](#prerequisites)
23+
- [Kernel](#kernel)
24+
- [Assets](#assets)
25+
- [Bundle](#bundle)
26+
- [Examples](#examples)
27+
- [Credits](#credits)
28+
- [See also](#see-also)
29+
30+
## Kernel Features
2931

3032
The kernel has the following features:
3133

@@ -34,21 +36,32 @@ The kernel has the following features:
3436
- packet injection support for internal Wi-Fi chipset;
3537
- KernelSU support.
3638

37-
## **Supported ROMs and devices**
39+
## Supported ROMs and devices
3840

39-
#### **ROMs**
41+
#### ROMs
4042

4143
- LineageOS;
42-
- ParanoidAndroid.
44+
- ParanoidAndroid;
45+
- x_kernel supported (universal)*.
4346

44-
#### **Devices**
47+
\* -- this is mostly relevant to ROMs based on LineageOS; however, technically speaking, this includes ParanoidAndroid as well, which makes x_kernel-based builds universal.
48+
49+
#### Devices
4550

4651
- OnePlus 5;
4752
- OnePlus 5T.
4853

49-
## **Usage**
54+
## Important Note
55+
56+
The contents of each release include ROM builds compatible with corresponding kernel builds. These ROM files are **unmodified and mirrored from official sources**.
57+
58+
This can be verified with the checksums, which should be identical to the ones presented on the ROM project's official web page.
59+
60+
You can always download the same ROM file from official sources if you'd like. The mirroring in this repository is done due to the fact that some ROM projects remove their older builds once they become too outdated.
61+
62+
## Usage
5063

51-
The custom build wrapper consists of 3 main parts:
64+
The custom build wrapper consists of 3 main components:
5265

5366
- kernel builder;
5467
- assets collector;
@@ -58,7 +71,7 @@ The custom build wrapper consists of 3 main parts:
5871
$ python3 wrapper --help
5972
usage: wrapper [-h] [--clean] {kernel,assets,bundle} ...
6073
61-
A custom wrapper for the s0nh_kernel.
74+
A custom wrapper for the zero_kernel.
6275
6376
positional arguments:
6477
{kernel,assets,bundle}
@@ -71,7 +84,7 @@ optional arguments:
7184
--clean clean the root directory
7285
```
7386

74-
### **Prerequisites**
87+
### Prerequisites
7588

7689
**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.
7790

@@ -83,12 +96,12 @@ To run this tool in a `local` environment, you will need:
8396
You will also need a few Python packages. To install them, use:
8497

8598
```sh
86-
python3 -m poetry install
99+
python3 -m poetry install --no-root
87100
```
88101

89102
To install `poetry`, use `python3 -m pip install poetry`.
90103

91-
### **Kernel**
104+
### Kernel
92105

93106
Kernel build process can be launched by using the `python3 wrapper kernel <arguments>` command.
94107

@@ -98,15 +111,15 @@ For more options you can refer to the help message below.
98111
$ python3 wrapper kernel --help
99112
usage: wrapper kernel [-h] [-c] [--clean-image]
100113
[--log-level {normal,verbose,quiet}] [-o OUTLOG] [--ksu]
101-
{local,docker,podman} {los,pa} codename
114+
{local,docker,podman} {los,pa,x} codename
102115
103116
positional arguments:
104117
{local,docker,podman}
105118
select build environment
106-
{los,pa} select a ROM for the build
119+
{los,pa,x} select a ROM for the build
107120
codename select device codename
108121
109-
optional arguments:
122+
options:
110123
-h, --help show this help message and exit
111124
-c, --clean don't build anything, just clean the environment
112125
--clean-image remove Docker/Podman image from the host machine after
@@ -118,7 +131,7 @@ optional arguments:
118131
--ksu add KernelSU support
119132
```
120133

121-
### **Assets**
134+
### Assets
122135

123136
As mentioned, there is also an asset downloader, which can collect latest versions of ROM, TWRP, Magisk and it's modules, Kali Chroot etc.
124137

@@ -127,17 +140,16 @@ $ python3 wrapper assets --help
127140
usage: wrapper assets [-h] [--extra-assets EXTRA_ASSETS] [--rom-only]
128141
[--clean-image] [--clean]
129142
[--log-level {normal,verbose,quiet}] [-o OUTLOG] [--ksu]
130-
{local,docker,podman} {los,pa} codename
131-
{full,minimal}
143+
{local,docker,podman} {los,pa,x} codename {full,minimal}
132144
133145
positional arguments:
134146
{local,docker,podman}
135147
select build environment
136-
{los,pa} select a ROM for the build
148+
{los,pa,x} select a ROM for the build
137149
codename select device codename
138150
{full,minimal} select Kali chroot type
139151
140-
optional arguments:
152+
options:
141153
-h, --help show this help message and exit
142154
--extra-assets EXTRA_ASSETS
143155
select a JSON file with extra assets
@@ -152,7 +164,7 @@ optional arguments:
152164
--ksu add KernelSU support
153165
```
154166

155-
### **Bundle**
167+
### Bundle
156168

157169
There is an option named `bundle` which combines build artifacts of both `kernel` and `assets` modules into a single package.
158170

@@ -174,17 +186,17 @@ An option named `slim` is a much lighter version of `full` packaging, as only th
174186
$ python3 wrapper bundle --help
175187
usage: wrapper bundle [-h] [--conan-upload] [--clean-image]
176188
[--log-level {normal,verbose,quiet}] [-o OUTLOG] [--ksu]
177-
{local,docker,podman} {los,pa} codename
189+
{local,docker,podman} {los,pa,x} codename
178190
{conan,slim,full}
179191
180192
positional arguments:
181193
{local,docker,podman}
182194
select build environment
183-
{los,pa} select a ROM for the build
195+
{los,pa,x} select a ROM for the build
184196
codename select device codename
185197
{conan,slim,full} select package type of the bundle
186198
187-
optional arguments:
199+
options:
188200
-h, --help show this help message and exit
189201
--conan-upload upload Conan packages to remote
190202
--clean-image remove Docker/Podman image from the host machine after
@@ -196,7 +208,7 @@ optional arguments:
196208
--ksu add KernelSU support
197209
```
198210

199-
## **Examples**
211+
## Examples
200212

201213
Here are some examples of commands:
202214

@@ -207,7 +219,12 @@ Here are some examples of commands:
207219
- Collect all the assets locally:
208220
- `python3 wrapper assets local los dumpling full`.
209221

210-
## **See also**
222+
## Credits
223+
224+
- [x_kernel_oneplus_msm8998](https://github.com/ederekun/x_kernel_oneplus_msm8998): OnePlus 5/T kernel with many optimizations and improvements;
225+
- [kali-nethunter-kernel](https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel): official kernel patches from Kali NetHunter project.
226+
227+
## See also
211228

212229
- [FAQ](docs/FAQ.md);
213230
- [TODO List](docs/TODO.md);

conanfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33

44
class S0nhConan(ConanFile):
5-
name = "s0nh"
6-
version = "0.3.2"
5+
name = "zero"
6+
version = "0.3.3"
77
author = "seppzer0"
88
url = "https://gitlab.com/api/v4/projects/40803264/packages/conan"
99
description = "An Android kernel w/ Kali NetHunter support."
10-
topics = ("s0nh_kernel", "kali-nethunter")
10+
topics = ("zero_kernel", "kali-nethunter")
1111
settings = None
1212
options = {
13-
"rom": ("los, pa"),
13+
"rom": ("los", "pa", "x"),
1414
"chroot": ("minimal", "full"),
1515
"codename": ("dumpling", "cheeseburger")
1616
}

docs/FLASHING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Listed below files are required:
2727
- DM-Verity and Force Encrypt disabler;
2828
- Kali NetHunter + Kali NetHunter Terminal apps;
2929
- Kali NetHunter Chroot (you can do this later, but it would be easier to download this beforehand);
30-
- `nhpatch.sh` script from this repo (fixes NetHunter permissions for Android 12+).
30+
- ~~`nhpatch.sh` script from this repo (fixes NetHunter permissions for Android 12+)~~ with recent NetHunter app versions, `nhpatch.sh` usage is no longer required.
3131

3232
Currently, all of the mentioned assets can be collected via the `assets` subcommand in the wrapper (use `full` option).
3333

@@ -63,9 +63,7 @@ Before doing anything, please ensure that you have:
6363
- install Magisk apk, open it and do what the pop-up says (finish root installation, which will automatically reboot your device; if you don't see the pop-up, close the Magisk app and open it again);
6464
- once booted back into OS, open Magisk app again and proceed with finishing the installation (when prompted with "Additional Setup", select the default `Patch vbmeta in boot image` in `Options` and `Direct install` in `Method` submenus);
6565
- install NetHunter + NetHunter Terminal apps;
66-
- open NetHunter app and grant all the permissions (at some point you will see an error indicating that some permissions are not granted; that's normal, the next step will fix that);
67-
- in NetHunter Terminal app open `AndroidSu` shell, navigate through your storage and launch the `nhpatch.sh`;
68-
- open NetHunter app (permissions should be fixed now);
66+
- open NetHunter app (if seeing a Busybox-related error, press "OK" and re-open the app);
6967
- navigate to the `Kali Chroot Manager` submenu and install the chroot (if you downloaded it beforehand, use the "restore" option);
7068
- in NetHunter Terminal app open `Kali` shell (if it opens properly, then congratulations, you have a working Kali NetHunter on your device).
7169

@@ -74,8 +72,10 @@ Before doing anything, please ensure that you have:
7472
- install KernelSU Manager app, open it and verify that the `Superuser` tab works properly (should show the `Shell` item);
7573
- install NetHunter and NetHunter Terminal apps, but do not open them yet;
7674
- open KernelSU Manager app, grant SU permissions to both NetHunter and NetHunter Terminal apps via `Superuser` tab;
77-
- in NetHunter Terminal app open `AndroidSu` shell, navigate through your storage and launch the `nhpatch.sh`;
78-
- open the NetHunter app;
79-
- when seeing the Busybox-related error, ignore it and re-open the app;
75+
- open the NetHunter app (if seeing a Busybox-related error, press "OK" and re-open the app);
8076
- navigate to the `Kali Chroot Manager` submenu and install the chroot (if you downloaded it beforehand, use the "restore" option);
8177
- in NetHunter Terminal app open `Kali` shell (if it opens properly, then congratulations, you have a working Kali NetHunter on your device).
78+
79+
#### For x_kernel-based kernel + ParanoidAndroid users
80+
81+
This is a small side-note for using x_kernel-based build with ParanoidAndroid ROM. When booting into OS, you will see a message that `There is an internal problem with this device. Please call manufacturer.`. This warning is essentially similar to the unlocked bootloader message and is completely harmless. Press "OK" and proceed.

docs/TODO.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@
5252
- [x] decompose `run()` method in `ContainerEngine`;
5353
- [x] skip building Docker/Podman image if it's already present in local cache;
5454
- [x] for containerized build, download the contents of manifests during image build;
55-
- [ ] add system app debloater.
55+
- [ ] add system app debloater;
56+
- [ ] add a new argument respobsible for Linux kernel version selection;
57+
- [ ] add 4.14 Linux kernel version builds.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
2-
name = "s0nh-kernel-builder"
3-
version = "0.3.2"
2+
name = "zero-kernel-builder"
3+
version = "0.3.3"
44
description = ""
55
authors = ["seppzer0"]
66
packages = [{include = "wrapper"}]

scripts/multi_build.py

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,41 @@ def ucopy(src: Path, dst: Path, exceptions: list[str] = []) -> None:
3434
apath = Path(Path(__file__).absolute().parents[1])
3535
# those with "bundle" module usage are primarily tested builds
3636
argsets = (
37-
{
38-
"module": "bundle",
39-
"rom": "los",
40-
"codename": "dumpling",
41-
"ksu": "false",
42-
"size": "slim"
43-
},
44-
{
45-
"module": "bundle",
46-
"rom": "pa",
47-
"codename": "dumpling",
48-
"ksu": "false",
49-
"size": "slim"
50-
},
37+
#{
38+
# "module": "bundle",
39+
# "rom": "los",
40+
# "codename": "dumpling",
41+
# "ksu": "false",
42+
# "size": "slim"
43+
#},
44+
#{
45+
# "module": "bundle",
46+
# "rom": "pa",
47+
# "codename": "dumpling",
48+
# "ksu": "false",
49+
# "size": "slim"
50+
#},
51+
#{
52+
# "module": "kernel",
53+
# "rom": "los",
54+
# "codename": "dumpling",
55+
# "ksu": "true"
56+
#},
57+
#{
58+
# "module": "kernel",
59+
# "rom": "pa",
60+
# "codename": "dumpling",
61+
# "ksu": "true"
62+
#},
5163
{
5264
"module": "kernel",
53-
"rom": "los",
65+
"rom": "x",
5466
"codename": "dumpling",
55-
"ksu": "true"
67+
"ksu": "false"
5668
},
5769
{
5870
"module": "kernel",
59-
"rom": "pa",
71+
"rom": "x",
6072
"codename": "dumpling",
6173
"ksu": "true"
6274
},

0 commit comments

Comments
 (0)