forked from LineageOS/android_kernel_oneplus_sm8250
-
Notifications
You must be signed in to change notification settings - Fork 0
License
eirkkk/android_kernel_oneplus_sm8250-1
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
### Professional README for NetHunter Kernel Build Script --- ## NetHunter Kernel Build Script This script automates the process of building a custom Linux kernel with full support for **Kali NetHunter**, the penetration testing platform for Android devices. It is designed to simplify the compilation process, ensuring that all necessary drivers, patches, and configurations are included for advanced security testing and wireless attacks. --- ## **Features** - **NetHunter Integration**: Full support for NetHunter tools such as HID Keyboard, BadUSB, and Man-in-the-Middle (MITM) attacks. - **Wi-Fi Driver Support**: Includes drivers for popular Wi-Fi chipsets (e.g., `rtl8188eu`, `rtl8812au`, `88x2bu`) to enable monitor mode and packet injection. - **USB Gadget Support**: Enables USB OTG functionality for tools like HID Keyboard and BadUSB. - **SELinux Permissive**: Runs in SELinux permissive mode to allow unrestricted access to system resources for penetration testing. - **Performance Tweaks**: Custom CPU/GPU governors and I/O schedulers for improved performance. - **Battery Optimization**: Power-saving features to extend battery life during extended testing sessions. - **Kernel Modules**: Pre-built modules for NetHunter tools and wireless attacks. --- ## **Prerequisites** Before using this script, ensure the following: 1. **Linux Environment**: A Linux distribution such as Ubuntu, Debian, or Kali Linux. 2. **Dependencies**: Install the required packages by running: ```bash sudo apt update sudo apt install clang make git python3 flex bison bc libssl-dev build-essential libncurses-dev ccache automake lzop gperf zip curl zlib1g-dev libxml2-utils bzip2 libbz2-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-dev optipng maven pwgen libswitch-perl policycoreutils minicom libxml-sax-base-perl libxml-simple-perl x11proto-core-dev libx11-dev libgl1-mesa-dev xsltproc unzip nano python2 ``` 3. **Unlocked Bootloader**: Ensure your Android device has an unlocked bootloader and supports custom kernels. 4. **Backup**: Backup your data before flashing the kernel. --- ## **Usage** ### 1. **Download the Script** Save the script to your working directory and make it executable: ```bash chmod +x build_kernel.sh ``` ### 2. **Run the Script** Execute the script: ```bash ./build_kernel.sh ``` ### 3. **Follow the Prompts** The script will guide you through the following steps: - **Clear Screen**: Clears the terminal for better readability. - **Check and Install Packages**: Ensures all dependencies are installed. - **Download Wi-Fi Drivers**: Downloads and prepares Wi-Fi drivers for monitor mode and packet injection. - **Choose Kernel Configuration**: Lists available configurations and prompts you to select one. - **Open Menuconfig (Optional)**: Allows you to customize the kernel configuration. - **Build the Kernel**: Compiles the kernel using the selected configuration. ### 4. **Flash the Kernel** After a successful build, the kernel image (`Image` or `Image.gz-dtb`) will be located in the `out/arch/arm64/boot/` directory. Flash it to your device using `fastboot` or `TWRP`. Example commands: ```bash adb reboot bootloader fastboot flash boot path/to/Image.gz-dtb fastboot reboot ``` --- ## **Script Workflow** 1. **Clear Screen**: Clears the terminal screen for better readability. 2. **Check and Install Packages**: Installs all required dependencies. 3. **Download Wi-Fi Drivers**: Downloads and prepares Wi-Fi drivers for monitor mode and packet injection. 4. **Choose Kernel Configuration**: Lists available configurations and prompts you to select one. 5. **Open Menuconfig (Optional)**: Allows you to customize the kernel configuration using `menuconfig`. 6. **Build the Kernel**: Compiles the kernel using the selected configuration. --- ## **Output** - The compiled kernel image (`Image` or `Image.gz-dtb`) will be located in the `out/arch/arm64/boot/` directory. - Flash the kernel to your device using `fastboot` or `TWRP`. --- ## **Notes** - Ensure your device is **unlocked** and supports custom kernels. - Backup your data before flashing the kernel. - If you encounter issues, check the build logs or contact the developer for support. --- ## **License** This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details. --- ## **Contributing** Contributions are welcome! Please follow these steps: 1. Fork the repository. 2. Create a new branch for your feature or bugfix. 3. Submit a pull request. --- ## **Support** For support, please open an issue on the [GitHub repository](https://github.com/your-repo) or contact the developer directly. --- ## **Credits** - **Kali NetHunter**: [https://www.kali.org/docs/nethunter/](https://www.kali.org/docs/nethunter/) - **Linux Kernel**: [https://www.kernel.org/](https://www.kernel.org/) - **Wi-Fi Driver Maintainers**: Aircrack-ng, Morrownr, and others. --- ## **Disclaimer** This script is provided **as-is**, without any warranties. Use it at your own risk. The developer is not responsible for any damage to your device or data. --- Enjoy building your custom NetHunter kernel! 🚀
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- C 98.6%
- Assembly 0.9%
- Makefile 0.2%
- Perl 0.1%
- Shell 0.1%
- Python 0.1%