Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

the firmware for 4339 looks wrong #90

Open
izixxxc opened this issue May 5, 2020 · 5 comments
Open

the firmware for 4339 looks wrong #90

izixxxc opened this issue May 5, 2020 · 5 comments

Comments

@izixxxc
Copy link

izixxxc commented May 5, 2020

Current Behavior

Sections are misaligned. Haven't analyzed what was done but it doesn't look right.
Surprised it works.

Expected Behavior

Firmware patched with Nexmon.

Detailed steps to reproduce the problem

Build patched firmware for the same version with Nexmon
Binary compare
Firmware version is 6_37_34_43

Device details

Any

Suggested Solution

Build firmware with Nexmon
If some custom work has been done to it we wanna know

By submitting this, I agree that:

  • I am not a 13 year old who is trying to disconnect his friends from their wifi.
  • I know what this app is supposed to do.
  • I know what monitor-mode and a wifi adapter is, and what the firmware has to do with it.
  • I have read the project's README and it didn't help.
  • I don't speak 3rd grade english and my sentences make sense.
@chrisk44
Copy link
Owner

chrisk44 commented May 5, 2020

I'm surprised to see that. The file that comes with the app was pulled from the official Nexmon repository. I never built it from source, I downloaded a prebuilt binary from the repo.

Other than the misalignment, did you notice any other differences?

@chrisk44
Copy link
Owner

chrisk44 commented May 5, 2020

The files indeed look different. It's been a long time, I'll look into it.

@chrisk44
Copy link
Owner

chrisk44 commented May 5, 2020

Ok, what I just realized is that I may have built it on my own, with the nexmon repo that is forked on my account. The files must contain some kind of timestamp or something, because the md5 hash of the output files is different after consecutive builds, so I can't verify exactly how I built it.

I built the firmware from the official repo. As expected, the latest build has many differences with the one from the app, but I tried a lot of previous commit points, and I found that commits 9347534,
0b78f7a, d8d98a0, 2813d86, 3a4f2b1, d50a0c2, and fdee916 are quite similar to the one I've been shipping. Those commits are quite old, they are from 2016, around the time I first built the app and included the firmware. I never updated it, although there was a time I accidentally changed the file and then changed it back. The file was in app/src/main/assets/fw_bcmdhd.bin and was later renamed to fw_bcmdhd_4339.bin when I included the firmware for 4358.

To be honest I have no idea how to verify exactly which one it is.

If some custom work has been done to it we wanna know

You are absolutely right. I assure you I haven't changed anything by myself (I wouldn't know how, even if I wanted to), it's all Nexmon.

@izixxxc
Copy link
Author

izixxxc commented May 5, 2020

After some more digging its plausible that the fw in your app was patched twice. That is: a patched version was patched again by error. Perhaps if you find the time you could replace it with the fresh build and also add support for other chip versions supported by nexmon.

If I can have a feature request instead of replacing original fw permanently the hw could be replaced only till the app is closed.

@chrisk44
Copy link
Owner

chrisk44 commented May 5, 2020

As the development for this has stopped in favor of a completely reworked version, I will not be implementing any new functionality.

However, you can do what you asked by setting the 'enable/disable monitor mode' commands in the app's settings to something like:
Enable:

ifconfig wlan0 down;
cp /path/to/nexmon.bin /vendor/firmware/fw_bcmdhd.bin;
ifconfig wlan0 up;
nexutil -m true

Disable:

nexutil -m false;
ifconfig wlan0 down;
cp /path/to/default.bin /vendor/firmware/fw_bcmdhd.bin;
ifconfig wlan0 up

These are just examples, ifconfig might not exist on some devices, but you get the point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants