Enabling WiFi with an USB WiFi adapter

All Replicant-supported devices need non-free firmware to be loaded to make the internal WiFi component work. See the WiFi research page for more information. Free replacements for these non-free firmwares do not yet exist.

However, free firmware does exist for WiFi adapters with the AR9271 and rt2500usb chipsets. Such adapters can be used with a device running Replicant 6.0. A USB OTG (On-The-Go) cable is needed to connect the WiFi adapter to the phone.

Replicant compatible devices

WiFi adapters work best with the Galaxy Note 2 or the supported tablets because of their large batteries, though connection issues or crashes of the RepWifi app can happen.

Otherwise, the Galaxy S 3 works well, while the Galaxy Nexus, Galaxy Note and especially the Galaxy S 2 are more unstable and have a smaller battery life. Extended See known issues for more details. Using an USB OTG Y-cable with an additional power source helps preventing battery-related issues.

WiFi adapters

More adapters exist that have the AR9271 chipset than are listed below. The listed adapters are the ones that are known to us.

Known to work

Should work but not tested

WiFi adapter usage

In Replicant versions before 6.0 0004 rc1, using the WiFi adapter with the RepWifi app was the recommended and most convenient way.

As of Replicant 6.0 0004 rc1, RepWifi has been removed since it is now possible to configure WiFi connections through the adapter with the pull-down quicksettings or the regular WiFi menu in the settings. In 6.0 0003 and older, these methods only worked with the internal WiFi component of the device.

With the RepWifi app

Replicant 6.0 version before 0004 rc1 shipped with the RepWifi app. Root access for apps needs to be enabled to make the app work.

The app has the following capabilities:
  • searching for WiFi access points
  • connecting to WPA/WPA2 secured and unsecured networks
  • storing network connections (including passwords)
  • managing stored network connections (viewing and deleting them)

Forum thread about the app and its development

With the WiFi scripts

While the RepWifi app should be preferred, use cases might exist where the WiFi scripts yield better results. The scripts were developed before work on the RepWifi app was started. Scripts both for Replicant 6.0 and Replicant 4.22 exist. It is unlikely that the WiFi scripts will be improved further as the development focus lies on the RepWifi app.

The scripts can be retrieved by cloning the user-scripts repository:

git clone -b replicant-6.0

for Replicant 6.0 and

git clone -b replicant-4.2

for Replicant 4.2.

For the next steps, ADB needs to be set up and running as root. Connect the device to your PC. The scripts are in the networking/wifi folder. Run the setup script the folder to push the scripts to the device:


Then disconnect the device and attach the WiFi adapter. Make sure root access for apps is enabled. Open a terminal emulator. If the terminal is not running as root, you can gain root by running:


Navigate to the data/misc/wifi directory and run the script to scan and select the network access point:


After selecting the preferred AP and entering the password (if required), a WiFi connection should be successfully established.

Forum thread about the WiFi scripts and their development (contains some more usage notes, especially for Replicant 4.2)

Known issues

  • The adapter usage causes high battery drain. Frequent usage might result in a shortened lifecycle of the battery and battery damage is possible.
  • In the case of a low battery charge, it might not be possible to power the WiFi adapter. It is then not possible to use the it adapter until after the next recharge. If the adapter is not recognized, make sure to fully charge the battery and then try again.
  • The displayed battery charge level can be inaccurate and not up-to-date. As the adapter causes an unusually quick battery drain, the actual battery charge level can be a lot lower than what is currently displayed. This can be observed when the phone is rebooted after adapter usage. The displayed level can be a lot lower than before the reboot. That primarily happen with the Galaxy S 2 (see #1791).
  • You can't create WiFi networks with external WiFi adapters (through connecting to existing ones works fine). It's mainly a limitation of the Android integration as the adapters compatible with the ath9k_htc driver can create networks (though it is limited to few clients at the same time). See the ath9k_htc page on the Linux wireless wiki for more details on what that driver is capable of.


1 According to WikiDevi page on the version 1 and WikiDevi page on the version 2 only version 1 of TP-Link TL-WN722N works with free software, while version 2 doesn't

2 Replicant 4.2 does not include the required drivers to make these adapters work. Custom kernel images are necessary for Replicant 4.2. The scripts for Replicant 4.2 run services with greater privileges and do not restrict file access as good as the scripts for Replicant 6.0 do, so using them is less secure.

Updated by Denis 'GNUtoo' Carikli over 3 years ago ยท 43 revisions

Also available in: PDF HTML TXT