Skip to content

Commit

Permalink
release: add A14 support, platform-agnostic secondary operations, and…
Browse files Browse the repository at this point in the history
… DFD download
  • Loading branch information
seppzer0 committed Mar 5, 2024
1 parent e5f1c25 commit c268e35
Show file tree
Hide file tree
Showing 47 changed files with 703 additions and 545 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: build and release

on:
push:
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Build and assemble
- name: Build And Assemble
run: |
python3 -m pip install poetry
python3 -m poetry config virtualenvs.create false
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ job-build:
tags:
- docker
- linux
image: docker:24.0-cli
image: docker:25.0.3-cli-alpine3.19
services:
- docker:dind
script:
- apk update && apk add python3 py3-pip
- python3 -m pip install poetry
- python3 -m pip install poetry --break-system-packages
- python3 -m poetry config virtualenvs.create false
- python3 -m poetry install --no-root
- export PYTHONPATH=$(pwd)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN python3 -m pip install pip --upgrade && \
# This significantly reduces the total build time, as each time we make a build call for a device,
# only device-specific kernel source is being downloaded into the container.
#
RUN python3 ${WDIR}/wrapper/bridge.py --tools
RUN python3 ${WDIR}/wrapper/utils/bridge.py --shared

# launch app
CMD [ "/bin/bash" ]
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# zero_kernel

An Android kernel with Kali NetHunter functionality.
An advanced Android kernel builder with Kali NetHunter support.

## Contents

Expand All @@ -17,16 +17,17 @@ An Android kernel with Kali NetHunter functionality.
- [Assets](#assets)
- [Bundle](#bundle)
- [Examples](#examples)
- [Credits](#credits)
- [See also](#see-also)
- [Credits](#credits)

## **Disclaimer**

**This kernel is made for educational purposes only.**

**I am not responsible for anything that may or may not happen to your device by installing any custom ROMs and/or kernels.**

**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.**
> [!IMPORTANT]
> **This kernel is made for educational purposes only.**
>
> **I am not responsible for anything that may or may not happen to your device by installing any custom ROMs, kernels and/or any other forms of software.**
>
> **Anything you do with this kernel and your device 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.**
## Description

Expand Down Expand Up @@ -63,7 +64,8 @@ For **OnePlus 5/T** devices:

## ROM Artifacts in Releases

The contents of each release include ROM builds compatible with corresponding kernel builds. These ROM files are **unmodified and mirrored from official sources**.
> [!NOTE]
> The contents of each release include ROM builds compatible with corresponding kernel builds. These ROM files are **unmodified and mirrored from official sources**.
This can be verified via the checksums, which should be identical to the ones presented on the ROM project's official web page.

Expand Down Expand Up @@ -98,23 +100,25 @@ optional arguments:

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

> [!WARNING]
> Because of how *specific* Linux kernel source is, building it on Windows even with Docker might be challenging.
To run this tool in a `local` environment, you will need:

- a Debian-based Linux distribution (other types of distros are untested);
- a few [packages](Dockerfile#L15) installed in your system.

You will also need a few Python packages. To install them, use:
You will also need to configure your Python installation, including some of the packages installation:

```sh
python3 -m pip install poetry
python3 -m poetry install --no-root
export PYTHONPATH=$(pwd)
```

### Kernel

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

For more options you can refer to the help message below.
Kernel build process can be launched using the `kernel` subcommand of the wrapper.

```help
$ python3 wrapper kernel --help
Expand Down Expand Up @@ -175,7 +179,7 @@ options:

### Bundle

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

This is especially useful for linking the kernel version with the appropriate ROM version.

Expand Down Expand Up @@ -241,15 +245,15 @@ Collect all of the assets locally:
python3 wrapper assets --build-env=local --base=los --codename=dumpling --package-type=full
```

## See also

- [FAQ](docs/FAQ.md);
- [TODO List](docs/TODO.md);
- [Kernel Flashing Instructions](docs/FLASHING.md).

## Credits

- [x_kernel_oneplus_msm8998](https://github.com/ederekun/x_kernel_oneplus_msm8998): OnePlus 5/T kernel with many optimizations and improvements;
- [x-ft_kernel_oneplus_msm8998](https://github.com/ederekun/x-ft_kernel_oneplus_msm8998): 4.14-based variation of x_kernel;
- [4.14-kernel-oneplus-msm8998](https://github.com/roberto-sartori-gl/4.14-kernel-oneplus-msm8998): a base of 4.14 kernels for OnePlus 5/T, with KernelSU patches;
- [kali-nethunter-kernel](https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel): official kernel patches from Kali NetHunter project.

## See also

- [FAQ](docs/FAQ.md);
- [TODO List](docs/TODO.md);
- [Kernel Flashing Instructions](docs/FLASHING.md).
4 changes: 2 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

class ZeroKernelConan(ConanFile):
name = "zero"
version = "0.4.1"
version = "0.4.2"
author = "seppzer0"
url = "https://gitlab.com/api/v4/projects/40803264/packages/conan"
description = "An Android kernel with Kali NetHunter functionality."
description = "An advanced Android kernel builder with Kali NetHunter support."
topics = ("zero_kernel", "kali-nethunter", "nethunter")
settings = None
options = {
Expand Down
4 changes: 3 additions & 1 deletion docs/FLASHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Before doing anything, please ensure that you have:
- if using a Retrofit Dynamic Partitions ROM such as ParanoidAndoid -> untoggle `Unmount System before installing a ZIP` in the Settings;
- flash the ROM;
- flash the kernel;
- **if using Magisk** --> flash root manager (Magisk; you must change the `.apk` extension into `.zip` for this);
- **if using Magisk** --> flash Magisk root manager (you must change the `.apk` extension into `.zip` for this);
- flash DM-Verity and Force Encrypt disabler zip;
- reboot into system via `Reboot -> System` .

Expand All @@ -66,6 +66,7 @@ Before doing anything, please ensure that you have:
- install NetHunter + NetHunter Terminal apps;
- open NetHunter app (if seeing a Busybox-related error, press "OK" and re-open the app);
- navigate to the `Kali Chroot Manager` submenu and install the chroot (if you downloaded it beforehand, use the "restore" option);
- make sure that your NetHunter and NetHunter Terminal apps are properly configured to see the installed chroot directory (by default it may be `/data/local/nhsystem/kalifs`; if you see it anywhere, change it to `/data/local/nhsystem/kali-arm64`);
- in NetHunter Terminal app open `Kali` shell (if it opens properly, then congratulations, you have a working Kali NetHunter on your device).

#### For KernelSU users
Expand All @@ -75,6 +76,7 @@ Before doing anything, please ensure that you have:
- open KernelSU Manager app, grant SU permissions to both NetHunter and NetHunter Terminal apps via `Superuser` tab;
- open the NetHunter app (if seeing a Busybox-related error, press "OK" and re-open the app);
- navigate to the `Kali Chroot Manager` submenu and install the chroot (if you downloaded it beforehand, use the "restore" option);
- make sure that your NetHunter and NetHunter Terminal apps are properly configured to see the installed chroot directory (by default it may be `/data/local/nhsystem/kalifs`; if you see it anywhere, change it to `/data/local/nhsystem/kali-arm64`);
- in NetHunter Terminal app open `Kali` shell (if it opens properly, then congratulations, you have a working Kali NetHunter on your device).

#### For x_kernel-based kernel + ParanoidAndroid users
Expand Down
6 changes: 5 additions & 1 deletion docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@
- [ ] switch to `exec` commands for Docker and Podman instead of a single `run` command;
- [ ] replace `ccmd.launch()` to just `launch()` (or any other name);
- [ ] embed newlines usage (from both sides) into `messages` functions as arguments;
- [ ] add tests on cases of custom wrapper edge case exits (kernel build on Windows, ROM-only asset collection for a ROM-universal kernel etc.)
- [ ] add tests on cases of custom wrapper edge case exits (kernel build on Windows, ROM-only asset collection for a ROM-universal kernel etc.);
- [ ] break down (or create inheritance from) KernelBuilder into LineageOsKernelBuilder, ParanoidAndroidKernelBuilder, XKernelBuilder etc;
- [ ] investigate project restructuring to avoid circular import;
- [ ] consider creating a separate "errors" subpackage for all errors;
- [ ] add GKI kernels support.
Loading

0 comments on commit c268e35

Please sign in to comment.