Google is committed to advancing racial equity for Black communities. See how.

Tethering

The Tethering module shares an Android device's internet connection with other connected client devices, which can connect to tethering devices over Wi-Fi, USB, Bluetooth, or Ethernet. This module includes the tethering component (USB, Wi-Fi access point, Bluetooth, etc.) and its dependencies (interaction with tethering entitlement, IpServer, and offloadController). This module is updatable, meaning it can receive updates to functionality outside of the normal Android release cycle.

The Tethering module enables OEMs throughout the Android ecosystem to use a single, standard reference implementation that brings the following benefits.

  • End users get a consistent experience across Android devices and fixes to interoperability issues through module updates.

  • OEMs can fulfull carrier requirements while also reducing costs for individual customizations (as they don't need different implementations of the same requirements in different ways).

IPv4 and IPv6 support

The Tethering module supports IPv4 and IPv6 dual stack.

  • For IPv4 networks, the module sets up network address translation (NAT) and adopts dynamic host configuration protocol (DHCP) for IP address assignment.

  • For IPv6 networks, the module adopts IPv6 stateless address autoconfiguration (SLAAC) for IP address assignment.

Module boundary

In Android 11, the Tethering module moves the following Android 10 files to packages/modules/Tethering.

  • frameworks/base/services/core/java/com/android/server/connectivity/Tethering.java
  • frameworks/base/services/core/java/com/android/server/connectivity/tethering/
  • frameworks/base/services/core/java/com/android/server/NetworkManagementService.java
  • frameworks/base/services/net/java/android/net/ip/{InterfaceController,IpServer,RouterAdvertisementDaemon}.java
  • frameworks/base/services/net/java/android/net/{netlink,dhcp}/*
  • frameworks/base/services/net/java/android/net/util/{InterfaceSet,InterfaceParams,NetdService,PrefixUtils,SharedLog,VersionedBroadcastListener}.java
  • frameworks/base/core/java/android/net/{ITetheringEventCallback,ITetheringStatsProvider}.aidl
  • frameworks/base/core/java/android/net/{NetworkUtils,util/IpUtils}.java
  • frameworks/base/core/java/com/android/internal/util/{BitUtils,IndentingPrintWriter,State,StateMachine}.java
  • frameworks/base/core/java/com/android/server/connectivity/MockableSystemProperties.java
  • frameworks/base/core/java/android/os/INetworkManagementService.aidl
  • frameworks/base/core/java/android/bluetooth/BluetoothPan.java
  • frameworks/base/services/core/jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp
  • packages/apps/Settings/src/com/android/settings/wifi/tether/TetherService.java
  • packages/apps/Settings/src/com/android/settings/network/TetherProvisioningActivity.java

Module format

The Tethering module (com.google.android.tethering) is in APK format and is available for devices running Android 11 or higher.

Module dependences

The Tethering module has the following dependencies:

  • Public and system API methods in the system server
  • Stable AIDL IPCs interface with the system server
  • tetheroffload HIDL (defined in hardware/interfaces/tetheroffload/)
  • DHCP server (part of the Network Stack module)

Customization

The Tethering module doesn't support customization.

Testing

The Android Compatibility Test Suite (CTS) verifies functionality of the Tethering module.