Question Nethunter Build help [Kernel / System]

Search This thread
Jan 13, 2023
7
5
Hey xdas,

i just received my new Samsung Galaxy z Fold 4
  • SAOMC_SM-F936B_OXM_EUX_12_0045 EUX /-/EUX/EUX
  • Kernel : 5.10.81-afaneh92-gd8d6af751972 (flashed for twrp)
I would like to install nethunter on the device with a working kernel
I tired my best to understand the docu on kali but its not the best
i am also new to compiling kernels at that level so maybe someone can help here
:)
I attached as much as i could

So the steps i took so far is
  1. Unlocked Bootloader
  2. installed the twrp ( like descriped here : https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-z-fold4-snapdragon.4498743/ )
  3. installed magisk
Then for nethunter
(https://www.kali.org/docs/nethunter/)
i downloaded the kernel source :
  1. https://opensource.samsung.com/uploadSearch?searchValue=SM-F936 (my device is EUX see infos for device above)
  2. downloaded the proper=? toolchain , there is an readme_kernel inside the kernel_source with a link to the toolchain , i am unsure about this
    1. https://opensource.samsung.com/uploadSearch?searchValue=toolchain
      1. there are two options i took the S22(Exynos) file ( hope thats right ?)
  3. now we come to the difficult part :-(
first i tried to compile via the instructions on kali docs
  1. unpack the kernel file i did and there a subfolders so i decided to use the subfolder common as the root mentioned in the docs:
    1. you can begin by cloning our kernel builder to the root of your kernel’s folder, and prepare the environment:
    2. from common folder i did git clone https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel
    3. cd kali-nethunter-kernel
      1. I did not change the configs as i am new to that so i know there are some exports inside the build config inside the kernel file but i dont know how get them together
      2. ./build.sh
      3. S. Setup Environment and download toolchains.
      4. 2. Configure & compile kernel from scratch
      5. It found the devconfig so i took it as mentioned in the docs (Select your device’s defconfig, then save and exit to start the building process.)
      6. did not edit the kernel config till jet

and ran into the error attached in the error txt


I would like to understand how i can build the kernel the normal way , without the nethunter tool
and maybe someone could help to make this working with nethunter that would be great !
i want to understand the process and i am willing to help , so i am not asking for a final kernel , more for the way to go in general to also give the community a benefit for the next new kernel we want to port
as mentioned the docs are not the best !

thanks for your time
 

Attachments

  • README_Kernel.txt
    2.7 KB · Views: 22
  • README_Platform.txt
    2 KB · Views: 11
  • build_kernel_GKI.sh.txt
    1.2 KB · Views: 19
  • build_error_nethunter_kernelbuilder.txt
    13.1 KB · Views: 23
  • build_error_via_buildscript_fromkernel.txt
    2 KB · Views: 13
Last edited:
  • Like
Reactions: bigchrizzieboy

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hey xdas,

    i just received my new Samsung Galaxy z Fold 4
    • SAOMC_SM-F936B_OXM_EUX_12_0045 EUX /-/EUX/EUX
    • Kernel : 5.10.81-afaneh92-gd8d6af751972 (flashed for twrp)
    I would like to install nethunter on the device with a working kernel
    I tired my best to understand the docu on kali but its not the best
    i am also new to compiling kernels at that level so maybe someone can help here
    :)
    I attached as much as i could

    So the steps i took so far is
    1. Unlocked Bootloader
    2. installed the twrp ( like descriped here : https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-z-fold4-snapdragon.4498743/ )
    3. installed magisk
    Then for nethunter
    (https://www.kali.org/docs/nethunter/)
    i downloaded the kernel source :
    1. https://opensource.samsung.com/uploadSearch?searchValue=SM-F936 (my device is EUX see infos for device above)
    2. downloaded the proper=? toolchain , there is an readme_kernel inside the kernel_source with a link to the toolchain , i am unsure about this
      1. https://opensource.samsung.com/uploadSearch?searchValue=toolchain
        1. there are two options i took the S22(Exynos) file ( hope thats right ?)
    3. now we come to the difficult part :-(
    first i tried to compile via the instructions on kali docs
    1. unpack the kernel file i did and there a subfolders so i decided to use the subfolder common as the root mentioned in the docs:
      1. you can begin by cloning our kernel builder to the root of your kernel’s folder, and prepare the environment:
      2. from common folder i did git clone https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel
      3. cd kali-nethunter-kernel
        1. I did not change the configs as i am new to that so i know there are some exports inside the build config inside the kernel file but i dont know how get them together
        2. ./build.sh
        3. S. Setup Environment and download toolchains.
        4. 2. Configure & compile kernel from scratch
        5. It found the devconfig so i took it as mentioned in the docs (Select your device’s defconfig, then save and exit to start the building process.)
        6. did not edit the kernel config till jet

    and ran into the error attached in the error txt


    I would like to understand how i can build the kernel the normal way , without the nethunter tool
    and maybe someone could help to make this working with nethunter that would be great !
    i want to understand the process and i am willing to help , so i am not asking for a final kernel , more for the way to go in general to also give the community a benefit for the next new kernel we want to port
    as mentioned the docs are not the best !

    thanks for your time
    1
    Which toolchain to you use in nethunter kernel builder? I'd recommend clang-12.
    Download, extract somewhere and add it's path to kali-nethunter-kernel/config (clang-10 is the default). no need for setup environment again.