aircrack-ng / rtl8812au

RTL8812AU/21AU and RTL8814AU driver with monitor mode and frame injection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android: Two wlan interfaces being active simultaneously

seppzer0 opened this issue · comments

I've been able to build latest v5.6.4.2 branch for an Android kernel with Kali Nethunter support.

For reference, here is the diff I applied to build the driver into the kernel:

Common subdirectories: rtl8812au_mod/android and rtl8812au/android
Common subdirectories: rtl8812au_mod/core and rtl8812au/core
Common subdirectories: rtl8812au_mod/docs and rtl8812au/docs
Only in rtl8812au: .git
Only in rtl8812au: .github
Only in rtl8812au: .gitignore
Common subdirectories: rtl8812au_mod/hal and rtl8812au/hal
Common subdirectories: rtl8812au_mod/include and rtl8812au/include
diff rtl8812au_mod/Makefile rtl8812au/Makefile
11,15c11,12
< EXTRA_CFLAGS += -Wno-parentheses-equality
< EXTRA_CFLAGS += -Wno-pointer-bool-conversion
< EXTRA_CFLAGS += -Wno-parentheses-equality
< EXTRA_CFLAGS += -Wno-pointer-bool-conversion
< EXTRA_CFLAGS += -Wno-pragma-pack
---
> #EXTRA_CFLAGS += -Wno-parentheses-equality
> #EXTRA_CFLAGS += -Wno-pointer-bool-conversion
99,100c96,97
< CONFIG_PLATFORM_I386_PC = n
< CONFIG_PLATFORM_ANDROID_ARM64 = y
---
> CONFIG_PLATFORM_I386_PC = y
> CONFIG_PLATFORM_ANDROID_ARM64 = n
1727c1724
< 	$(MAKE) ARCH=$(ARCH) SUBARCH=$(ARCH) REAL_CC=${CC_DIR}/clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) O="$(KBUILD_OUTPUT)" modules
---
> 	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)  modules
Common subdirectories: rtl8812au_mod/os_dep and rtl8812au/os_dep
Common subdirectories: rtl8812au_mod/platform and rtl8812au/platform
Common subdirectories: rtl8812au_mod/tools and rtl8812au/tools

The problem is that when launching Kali Nethunter, there are two wlan interfaces working simultaneously (see fig. below):

  • wlan0 (internal wi-fi card);
  • wlan1 (? an abstract interface).

image

wlan1 shows up even if there is no external device plugged in.

I've read about CONFIG_CONCURRENT_MODE that can cause two interfaces working at the same time, but according to Makefile, the -DCONFIG_CONCURRENT_MODE is not passed for CONFIG_PLATFORM_ANDROID_ARM64 option.

So it is currently unclear why there is wlan1 showing up along with wlan0.

Alright, I've done some more research on this, and it seems like the driver does not have to do anything with this.
I found in official documentation that this is most likely latest Android's quirk on having multiple interfaces working concurrently.

When my external Wi-Fi adapter is plugged in, the RTL8812AU driver shows up for the wlan2 interface and works properly.

Closing the issue as it no longer serves a purpose.