802.1X authentication setup over Ethernet in AOSP Android for secure enterprise network connectivity
, ,

802.1x Authentication over Ethernet in AOSP Android

In today’s enterprise environments, secure wired network access is essential—especially in sectors like education, government, and large corporations. IEEE 802.1X, a port-based Network Access Control (PNAC) protocol, provides a robust mechanism for authenticating devices connected via Ethernet. However, native support for wired IEEE 802.1X on Android devices has historically been limited or inconsistent. This blog…


In today’s enterprise environments, secure wired network access is essential—especially in sectors like education, government, and large corporations. IEEE 802.1X, a port-based Network Access Control (PNAC) protocol, provides a robust mechanism for authenticating devices connected via Ethernet.

However, native support for wired IEEE 802.1X on Android devices has historically been limited or inconsistent.

This blog presents a proposed solution to implement Ethernet 802.1X on Android devices overcoming the gaps in native support and ensuring compatibility across various device types.

Why wired 802.1X matters on Android devices

Android is no longer only a phone OS. It runs on kiosks, POS terminals, medical carts, classroom panels, industrial HMIs and digital signage. Many of these sit on a wired LAN, and many get deployed in places that enforce IEEE 802.1X port-based network access control: universities, government buildings, hospitals and corporate campuses.

On those networks the switch port stays closed until the device proves its identity. A stock AOSP build can’t do that over Ethernet, so the device never gets an IP address and never reaches the network.

802.1X in 60 seconds

Diagram showing an Android device supplicant, switch port authenticator, and RADIUS authentication server, with EAPOL leading from an unauthorized port to an authorized port allowing DHCP and normal traffic.

The supplicant and authenticator speak EAP over LAN (EAPOL). The authenticator relays the EAP conversation to the RADIUS server inside RADIUS packets. Until the server accepts the device, the port is unauthorized and passes only EAPOL traffic. After success the port is authorized and DHCP and normal traffic flow.

The usual exchange:

  1. The link comes up, and the supplicant sends EAPOL-Start (or the switch sends an EAP-Request/Identity).
  2. The device replies with its identity.
  3. The switch relays the identity to the RADIUS server as an Access-Request.
  4. The server and device run the chosen EAP method (TLS, PEAP, TTLS and so on), tunnelled through the switch.
  5. On success the server sends Access-Accept, the switch sends EAP-Success, and the port opens.
  6. The device now runs DHCP and gets its IP configuration.

Why stock Android can’t do it

AOSP already ships wpa_supplicant, but only as a Wi-Fi component. The wired driver is not enabled in the AOSP build, so the stock supplicant can only drive Wi-Fi interfaces and cannot exchange EAPOL frames on an Ethernet port. The Ethernet path in AOSP is built around link state, IP configuration and network scoring. It has no concept of EAP credentials, no supplicant lifecycle and no authenticating state. Wi-Fi Enterprise is the nearest analogue, but it is tightly bound to the Wi-Fi framework and the nl80211 driver.

That is why wired 802.1X on Android is a platform-level change, not an app. A regular app can’t open the raw EAPOL socket, can’t bring a port into the authorized state, and can’t hold the network until authentication finishes. The original author’s replies to commenters say the same: the solution is built into AOSP source, not plug and play, so it can’t be added to a retail tablet.

Components that need to change

ComponentRole in the solution
Ethernet supplicantA wpa_supplicant instance bound to eth0, built with the wired driver enabled (off in stock AOSP), handling EAP, certificates and EAPOL
Supplicant interfaceThe path from EthernetService to the native supplicant: EthernetService calls a Supplicant HAL service, which calls an Ethernet HAL, which controls the wired supplicant daemon (AIDL on recent releases, HIDL on older ones)
EthernetManager / EthernetServicePublic and system APIs to store 802.1X config, start or stop authentication, and report state
IpConfigurationExtended to carry enterprise EAP config (method, identity, certificates) next to the usual IP settings
SELinux policyA domain for the supplicant, plus permissions for sockets, config files and keystore access

Layered Ethernet configuration diagram showing settings UI, EthernetManager, EthernetService, Supplicant HAL, Ethernet HAL, wpa_supplicant, and Linux kernel, with SELinux policy covering the layers.

Supported EAP methods compared

MethodCredentialsServer cert validationSecurity notes
EAP-TLSClient certificateYes, mutualStrongest. Best for managed fleets. Needs a PKI and certificate provisioning
PEAP (MSCHAPv2)Username and password inside a TLS tunnelYes, if configuredCommon in enterprises. Weak if CA validation is skipped
EAP-TTLSUsername and password inside a TLS tunnelYes, if configuredSimilar to PEAP, with more flexible inner methods
EAP-PWDShared password, no certificatesNot applicableResists offline dictionary attacks. Limited server support
EAP-MD5Password hash challengeNoWeak, with no mutual authentication or key derivation. Use only on legacy or lab networks

For production, prefer EAP-TLS. If you use PEAP or TTLS, always pin or validate the CA certificate and the server name. Skipping validation exposes users to rogue authenticators.

Prabhy System Technology has developed and thoroughly tested the proposed solution on AOSP Android versions 4.4, 7, 9, 10, 11, 12, 13, 14, and 15.

Proposed solution is compliance with EDLA certification requirements.

Contact for more information.


19 responses to “802.1x Authentication over Ethernet in AOSP Android”

  1. DELARUE David Avatar

    Hello,
    I would like to know how to configure an 802.1x Ethernet (EAP/TLS) connection on an Android tablet without 802.1x supplicant. Is there a solution, an application…?
    My tablet is on Android 10, 11 and 12
    Thanks for your feedback
    Best regards

    1. Dharmesh Avatar

      Hello,

      I have implemented solution in Android Q AOSP source code. The solution is not plug and play so not possible in your tablets.

  2. Christian LIRONDIERE Avatar
    Christian LIRONDIERE

    Dear dharmesh, i would like to make a 802.1x Authentication over Ethernet on Android, and you indicate on your blog you succeed on it by modifying some components. Could you tell me more about that? What kind of modification? Help appreciate. Sincerly, Chris

    1. Christian LIRONDIERE Avatar
      Christian LIRONDIERE

      Oups, yesterday i didn’t take attention you talk about an AOSP version…. I’m developping with Kotlin but on “classic” android, so I think your solution is not suitable to me… Thanks for the time you spent to reply to me

    2. qkmin Avatar
      qkmin

      I would like to know more, is there any source code available

      1. Dharmesh Avatar

        Source is available on commercial terms. It is implemented in AOSP Android Q source code and tested successfully. Let me know what kind of information you need.

  3. moto7sh Avatar

    Hello, I am looking to implement this in our device that is built in AOSP, please let me know if you are interested in a side project. I look forward to hearing from you.

  4. moto7sh Avatar

    Can you share with me your email so we can talk about this further.

  5. Vladimir Avatar
    Vladimir

    Hello , can you please some how share your patches. I need the same solution for Android 9. So, maybe I can port it.

    1. Dharmesh Avatar

      Hello Vlandimir, Code is available on a commercial basis.

      1. Vladimir Avatar
        Vladimir

        Hello ? How can I contact with you to discuss prices and etc.

  6. aduba7 Avatar
    aduba7

    Hi, Do you have a 802.1x ethernet supplicant that works for Samsung S6 or A7 please?

  7. yongheng Avatar
    yongheng

    802.1x for aosp android 9

    1. Dharmesh Avatar

      Hello Yongheng,

      Thanks for your valuable inquiry.

      Let me know what kind of information you required. We have a solution for 802.1x for AOSP Android 9.0.

      1. lizhao Avatar
        lizhao

        hello,802.1x for aosp android 11,
        How can I contact with you to discuss prices and etc.

      2. Dharmesh Avatar

        Please go to “https://prabhusystemtech.com/contact/” link and drop a message with this details.

  8. Slava Avatar
    Slava

    Hello, Can we discuss the details of commercial cooperation on this solution?
    rest regards.

    1. Dharmesh Avatar

      Can I use slavka1010@gmail.com email for official conversation??

Leave a Reply