PDA

View Full Version : I need help porting nethunter to new device.



PickFlash
2022-01-10, 04:35
Hello, I want to port nethunter to a moto G4 plus.

Here https://www.kali.org/docs/nethunter/porting-nethunter/ says I should follow directions on the main docs page:

4784
so I followed the directions on the main docs page, https://www.kali.org/docs/nethunter/building-nethunter/
(https://www.kali.org/docs/nethunter/building-nethunter/)and in the python build.py command because there is no option for moto g4 plus, I can't run it. What should I do?

PickFlash
2022-01-21, 06:20
Ok, I ran the python build.py command without specifying a device, using the - - generic option.

What should I do with the image?

The configuring the kernel page shows a graphical interface, I don't know how to access it.

I don't understand the correlation between the building nethunter doc page and the porting page. I have that generic image from the building instructions, and the source code from Motorola for the moto g4bplus.

Which one should I use?

What is the toolchain for? How should I use it with the image or with the source code?

Ronk
2022-04-08, 23:43
Okay, I have been struggling with this for a day or two and I at least know the answers to your questions.
The difference between the "building" page and the "porting" page is that on the building page they are talking about building nethunter itself, but on the porting/building page they are now talking about building a kernel to use when you build nethunter.

What they want is for you to have cloned nethunter and run the bootstrap.sh script. This will download the device configurations for the nethunter build. Now if your device isn't supported (which it wasn't), you have to add it yourself before building Nethunter.
You should skip the manual porting page and go to the porting with kernel builder page. Clone (like they say to) the kernel-builder to the root of where you have your kernel source at. CD into that directory and run the build.sh.
Then keep following the instructions.
The toolchain is basically the kernel compiler. If you have a kernel image, you've already used it.

Hope that helps. I'm off to try and get some answers, myself :)