seemoo-lab / nexmon

The C-based Firmware Patching Framework for Broadcom/Cypress WiFi Chips that enables Monitor Mode, Frame Injection and much more
GNU General Public License v3.0
2.43k stars 453 forks source link

Trying to build for Nexus 6p nougat 7.1.2 #333

Open Ocelot124286 opened 5 years ago

Ocelot124286 commented 5 years ago

Every time I run "make" in the patches/bcm4358/7_112_201_3_sta/nexmon directory I get

sec/ioctl.c:48:21: fatal error: bcmpcie.h: No such file or directory compilation terminated.

Are you missing a file?

TheMMcOfficial commented 5 years ago

Did you got all the requirements?

Install some dependencies: sudo apt-get install git gawk qpdf adb flex bison

Only necessary for x86_64 systems, install i386 libs:

sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 Clone our repository: git clone https://github.com/seemoo-lab/nexmon.git

In the root directory of the repository: cd nexmon

Setup the build environment: source setup_env.sh Compile some build tools and extract the ucode and flashpatches from the original firmware files: make Go to the patches folder of your target device (e.g. bcm4339 for the Nexus 5): cd patches/bcm4339/6_37_34_43/nexmon/

Compile a patched firmware: make Generate a backup of your original firmware file: make backup-firmware Install the patched firmware on your smartphone: make install-firmware (make sure your smartphone is connected to your machine beforehand)

Ocelot124286 commented 5 years ago

I've installed everything. It just says its missing bcmpcie.h, bcmpcie.h isn't missing for the nexmon oreo nexus 6p build

TheMMcOfficial commented 5 years ago

Do you have the NDK install and setup correctly ?

Ocelot124286 commented 5 years ago

I think so, can you run me through it just in case?

TheMMcOfficial commented 5 years ago

go there and Download the NDK 11c https://developer.android.com/ndk/downloads/older_releases

After extract it wherever you want (I extract mine in /opt) and run does command. After you should be able to compile nexmon if you got everything to compile it.

export ANDROID_NDK=/opt/android-ndk-r11c
export PATH=$PATH:$ANDROID_NDK
export NDK_ROOT=/opt/android-ndk-r11c
Ocelot124286 commented 5 years ago

Same error, I don't know what else to do

TheMMcOfficial commented 5 years ago

What Linux distro do you use ?

Ocelot124286 commented 5 years ago

Kali linux- port of Debian I believe

TheMMcOfficial commented 5 years ago

I use kali 2019.2 (64 bits version) and everything works fine I don't know what you are doing wrong...

Ocelot124286 commented 5 years ago

I will try reinstalling Kali and I'll report back. Maybe it's because I'm using x86

kimocoder commented 4 years ago

Everything works fine

Ocelot124286 commented 4 years ago

Every reinstall I get the same error. I might try with deepin

kimocoder commented 4 years ago

I just compiled it for Nexus 6P and running airodump-ng on it, so I know it works

Ocelot124286 commented 4 years ago

Can you send it to me? Or email me at inotreallyabot@gmail.com

kimocoder commented 4 years ago

What do you need?

Ocelot124286 commented 4 years ago

The patched file FW-bcmhd.bin or something like that

kimocoder commented 4 years ago

It's in the NetHunter repo, fresh

https://gitlab.com/kimocoder/kali-nethunter-devices/blob/9c9c41c74f31995f310388c7a86a41fa70141daf/oreo/angler/vendor/firmware/fw_bcmdhd.bin

kimocoder commented 4 years ago

And btw, there is the NetHunter kernel for Android 8 OREO with hid/injection/cdrom/nexmon also.

https://gitlab.com/kimocoder/kali-nethunter-devices/commit/9c9c41c74f31995f310388c7a86a41fa70141daf#f19fbdc1b8ad6bdbf478ad0f8651b9f726fa2e9b

Ocelot124286 commented 4 years ago

For Android 7.1.2