Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Overview
Stay organized with collections
Save and categorize content based on your preferences.
Android provides a default Android framework implementation that includes
support for various Wi-Fi protocols and modes, including:
- Wi-Fi infrastructure (STA)
- Wi-Fi hotspot (Soft AP) in either tethered or local-only modes
- Wi-Fi Direct (p2p)
- Wi-Fi Aware (NAN)
- Wi-Fi RTT (IEEE 802.11mc FTM)
An application using Wi-Fi services directly communicates with the various Wi-Fi
services through Binder. The Wi-Fi services run in the System Service and
communicate with the HAL over the provided HIDL and AIDL interfaces.
This diagram shows the general structure of the Android Wi-Fi stack.
Figure 1. Android Wi-Fi architecture
Application framework
At the application framework level is application code, which uses the various
android.net.wifi
APIs to interact with the Wi-Fi framework and hardware. Internally, this code
calls the Wi-Fi process through the Binder IPC mechanism.
Wi-Fi services
The Wi-Fi services run in the System Service, and are located in
packages/modules/Wifi/service/
. The Wi-Fi service communicates with the
Wi-Fi HAL over AIDL.
There are various Wi-Fi services:
- Wi-Fi Service: Primary mechanism for controlling Wi-Fi infrastructure modes
(both STA and AP).
- Wi-Fi P2P Service: Manages the Wi-Fi Direct mode.
- Wi-Fi Aware Service: Manages the Wi-Fi Aware mode.
- Wi-Fi RTT Service: Manages the IEEE 802.11mc FTM functionality.
The Wi-Fi framework also includes a stand-alone process, wificond, located
at system/connectivity/wificond
. The wificond process communicates with
the Wi-Fi driver over standard nl80211
commands.
Wi-Fi HALs
The Wi-Fi framework has three Wi-Fi HAL surfaces represented by three different
interfaces: Vendor HAL, Supplicant HAL, and Hostapd HAL.
For details about implementations of the various HALs, see
Wi-Fi HAL.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Overview\n\nAndroid provides a default Android framework implementation that includes\nsupport for various Wi-Fi protocols and modes, including:\n\n- Wi-Fi infrastructure (STA)\n- Wi-Fi hotspot (Soft AP) in either tethered or local-only modes\n- Wi-Fi Direct (p2p)\n- Wi-Fi Aware (NAN)\n- Wi-Fi RTT (IEEE 802.11mc FTM)\n\nAn application using Wi-Fi services directly communicates with the various Wi-Fi\nservices through Binder. The Wi-Fi services run in the System Service and\ncommunicate with the HAL over the provided HIDL and AIDL interfaces.\nThis diagram shows the general structure of the Android Wi-Fi stack.\n\n**Figure 1.** Android Wi-Fi architecture\n\nApplication framework\n---------------------\n\nAt the application framework level is application code, which uses the various\n[android.net.wifi](https://developer.android.com/reference/android/net/wifi/package-summary)\nAPIs to interact with the Wi-Fi framework and hardware. Internally, this code\ncalls the Wi-Fi process through the Binder IPC mechanism.\n\nWi-Fi services\n--------------\n\nThe Wi-Fi services run in the System Service, and are located in\n`packages/modules/Wifi/service/`. The Wi-Fi service communicates with the\nWi-Fi HAL over AIDL.\n\nThere are various Wi-Fi services:\n\n- Wi-Fi Service: Primary mechanism for controlling Wi-Fi infrastructure modes (both STA and AP).\n- Wi-Fi P2P Service: Manages the Wi-Fi Direct mode.\n- Wi-Fi Aware Service: Manages the Wi-Fi Aware mode.\n- Wi-Fi RTT Service: Manages the IEEE 802.11mc FTM functionality.\n\nThe Wi-Fi framework also includes a stand-alone process, **wificond** , located\nat `system/connectivity/wificond`. The **wificond** process communicates with\nthe Wi-Fi driver over standard `nl80211` commands.\n\nWi-Fi HALs\n----------\n\nThe Wi-Fi framework has three Wi-Fi HAL surfaces represented by three different\ninterfaces: Vendor HAL, Supplicant HAL, and Hostapd HAL.\n\nFor details about implementations of the various HALs, see\n[Wi-Fi HAL](/docs/core/connect/wifi-hal)."]]