Last active
April 16, 2020 03:10
-
-
Save DavidNorena/d17ed3b9d4ce7de51c995f75f6732c40 to your computer and use it in GitHub Desktop.
Compile HUAWEI G760 Kernel Nethunter Compatible (Using mparus lineageos rom)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using ubuntu 16.04 x64 | |
sudo apt-get update | |
sudo apt-get install build-essential kernel-package libncurses5-dev bzip2 gcc-arm-none-eabi python-pip -y | |
sudo pip install requests | |
echo "export CROSS_COMPILE=/usr/bin/arm-none-eabi-" >> ~/.bashrc | |
echo "export ARCH=arm" >> ~/.bashrc | |
source ~/.bashrc | |
mkdir kernel | |
cd kernel | |
# Current Lineage Kernel #https://github.com/mparus/g760_lineageos-14.1/blob/master/roomservice.xml | |
git clone https://github.com/mparus/android_kernel_huawei_msm8916-2 lineage | |
cd lineage | |
#wifi patch | |
wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch | |
patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch | |
#hid patch | |
wget https://gist.githubusercontent.com/DavidNorena/4b56b3434d23bae73bcf314dde7f5a4c/raw/f97f5ab97b489a9aa558bf661c938e99bd310052/kernel-3.1.hid.patch | |
patch -p1 < kernel-3.1.hid.patch | |
# get kernel configuration | |
wget https://gist.githubusercontent.com/DavidNorena/371ce2b67640ac5bd7f9669b39462c39/raw/3a8a73b09369b5442d4c233342cdd05d131dd2aa/nethunterhuaweig760_defconfig | |
# Make kernel | |
make clean | |
make nethunterhuaweig760_defconfig | |
#change 9 for the number of cores of your machine plus 1 | |
make -j9 | |
#at this point you should have a arch/arm/boot/zImage, then | |
cp arch/arm/boot/zImage ../ | |
cd .. | |
#clone nethunter repo | |
git clone https://github.com/offensive-security/kali-nethunter/ nethunter | |
#build installer | |
cd nethunter/nethunter-installer/ | |
#prepare env | |
./bootstrap.sh --depth 1 | |
#N TO ALL QUESTIONS | |
## TODO REMOVE WHEN UPLOAD TO NETHUNTER-DEVICES REPO | |
nano devices/devices.cfg | |
# Add these lines | |
# # HUAWEI G760 LINEAGEOS 14.1 | |
# [huaweig760-oos] | |
# author = "DavidNorena" | |
# version = "1.0" | |
## TODO REMOVE WHEN UPLOAD TO NETHUNTER-DEVICES REPO | |
mkdir devices/nougat/huaweig760-oos | |
cp ../../zImage devices/nougat/huaweig760-oos | |
# Test kernel Installer | |
python build.py -d huaweig760-oos --nougat -k | |
#Full Installer | |
python build.py -d huaweig760-oos --nougat --rootfs full | |
# Install in your device ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment