@jasmine8gu
I am don’t know much about the combination of modes in your post.
Also not sure about the support from driver side.
But you can get the iwconfig source from wireless-tools package.
https://hewlettpackard.github.io/wireless-tools/Tools.html
Latest release - https://hewlettpackard.github.io/wireless-tools/wireless_tools.29.tar.gz
I just tried to cross build it statically as follows.
$ make BUILD_STATIC='y' LDFLAGS='-static' CC=aarch64-linux-gnu-gcc
$ file iwconfig
iwconfig: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0,
I think you can ‘adb push’, give execute permission to the binary file and run it on target board.
chmod +x iwconfig (for execute permission)
./iwconfig -h (for help)
AOSP may have some permission issue in certain locations I believe.(Like it has some partitions mounted as read only etc.)
In debian, you can just copy to /tmp and execute.