Ethernet Config — AIDL Interface
This document describes the Bliss-compatible AIDL API exposed by Ethernet Config (com.example.ethernetconfig). The interface matches the legacy Bliss Ethernet Manager so existing integrations can migrate with minimal changes.
The service registers a system binder named blissethernet, which powers both the Java/Kotlin client API and adb shell service call blissethernet.
For end-to-end device validation (including persist.bass.ethernet.* auto-config), see Testing Guide. Overview and prop setup: Ethernet Config.
Prerequisites
- Ethernet Config installed as a privileged/system app (Bass ROM builds include it).
- The
blissethernetservice registered inServiceManager(started at boot via init /start-bliss-ethernet). - For third-party apps: caller must be authorized (see
Authorization ).
IP assignment modes
Use these integer values with getIpAssignment / setIpAssignment:
Static IP address format: <IPv4>/<prefix> (e.g. 192.168.1.100/24).
Client usage
Gradle
implementation fileTree(dir: 'system_libs/', include: ['*.jar'])
Or copy the AIDL sources into your module and enable buildFeatures { aidl = true }.
Java
import org.blissos.ethernet.BlissEthernetManager;
import org.blissos.ethernet.BlissEthernetAssignment;
BlissEthernetManager blissEthernetManager = BlissEthernetManager.getInstance(context);
String[] interfaces = blissEthernetManager.getAvailableInterfaces();
boolean up = blissEthernetManager.isAvailable("eth0");
blissEthernetManager.setIpAssignment("eth0", BlissEthernetAssignment.STATIC);
blissEthernetManager.setIpAddress("eth0", "192.168.1.100/24");
blissEthernetManager.setGateway("eth0", "192.168.1.1");
blissEthernetManager.setDnses("eth0", new String[] { "8.8.8.8", "8.8.4.4" });
Manifest (client app)
<uses-permission android:name="org.blissos.ethernet.permission.ACCESS_ETHERNET_MANAGER" />
AIDLs
IBlissEthernet.aidl:
package org.blissos.ethernet;
import org.blissos.ethernet.IBlissEthernetServiceListener;
interface IBlissEthernet {
String[] getAvailableInterfaces();
boolean isAvailable(String iface);
void setListener(in IBlissEthernetServiceListener listener);
void setInterfaceUp(String iface);
void setInterfaceDown(String iface);
String getEthernetMacAddress(String ifname);
int getIpAssignment(String iface);
void setIpAssignment(String iface, int assignment);
String getIpAddress(String iface);
void setIpAddress(String iface, String ipAddress);
String getGateway(String iface);
void setGateway(String iface, String gateway);
String[] getDnses(String iface);
void setDnses(String iface, in String[] dnses);
}
IBlissEthernetServiceListener.aidl:
package org.blissos.ethernet;
oneway interface IBlissEthernetServiceListener {
void onAvailabilityChanged(String iface, boolean isAvailable);
}
Method reference
Partial updates (setIpAddress, setGateway, setDnses) merge with the current interface configuration before applying.
Authorization
A call succeeds only if the caller is one of:
- System UID or shell UID (e.g.
adb shell service call …) - Same app as the server (
com.example.ethernetconfig) - Holder of
org.blissos.ethernet.permission.ACCESS_ETHERNET_MANAGER - Package listed in
bliss_ethernet_authorized_packages, or allow-all mode enabled in the server app resources
Unauthorized callers receive SecurityException.
ADB interface
adb shell service call blissethernet <code> [parameters...]
<code> is the 1-based transaction ID matching AIDL method order.
Examples
# List interfaces
adb shell service call blissethernet 1
# isAvailable(eth0)
adb shell service call blissethernet 2 s16 eth0
# getIpAssignment — 0=UNASSIGNED, 1=DHCP, 2=STATIC
adb shell service call blissethernet 7 s16 eth0
# Set static IP
adb shell service call blissethernet 8 s16 eth0 i32 2
adb shell service call blissethernet 10 s16 eth0 s16 192.168.1.100/24
adb shell service call blissethernet 12 s16 eth0 s16 192.168.1.1
Verify service registration
adb shell service list | grep blissethernet
If missing after boot, see Ethernet Config — Boot start.
Compatibility notes
- Package namespace:
org.blissos.ethernet(unchanged from Bliss Ethernet Manager) - Service name:
blissethernet(unchanged) - AIDL signatures: Match the published Bliss Co-Labs interface
- Listener:
onAvailabilityChangedfires whileBlissEthernetServiceis running