`service-connectivity` is a jar that system_server loads dynamically.
Such jars can be dexopted now. This CL adds `service-connectivity` to a
`systemserverclasspath_fragment`, which does not actually add the jar to
the classpath, but tells the build system to dexopt it.
NOTE: The corresponding `exported_systemserverclasspath_fragments` needs
to be added to the `prebuilt_apex` once a new prebuilt is dropped.
Bug: 203198541
Test: m com.android.tethering
Change-Id: I53745baaf1bc7142cc12a1e6cd8d84c9b338ac9d
Merged-In: I53745baaf1bc7142cc12a1e6cd8d84c9b338ac9d
(cherry picked from commit 9ecc66ddba)
Add new symbols to libservice-connectivity loaded on T only, and the
framework libraries to apex and tests.
Ignore-AOSP-First: Avoiding conflicts; cherry-pick will follow
Bug: 197717846
Test: atest FrameworksNetTests
Change-Id: Iae44344701a3267110e5cbf271120201134d59e5
This CL builds NetworkStats related codes with the
connectivity module instead of platform.
Ignore-AOSP-First: Avoiding conflicts; cherry-pick will follow
Test: TH
Bug: 197717846
Change-Id: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
This is basically a no-op since the apex/fs is r/o anyway,
but it appears like it might help the emulator build...
Test: N/A
Bug: 217565060
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5e9c9fb41687aa5a4b15ff2bf21eafecada726a8
Allow framework-connectivity to depend on framework-connectivity-t
stubs, and framework-connectivity-t to depend on prebuilt (to avoid
circular dependencies) framework-connectivity stubs to compile its own
stubs, and framework-connectivity.impl to compile its implementation.
Also reorganize jarjar rules so that service and framework jar can use
static libraries in framework-connectivity without packaging their own,
reducing duplicate code.
Bug: 204830222
Test: m
Change-Id: I75c34986e7c479de23cdb2e9b360fa1fede018c9
* changes:
Prevent native_init from starting TrafficController
Remove libutils dependency from libservice-connectivity
Merge libtraffic_controller_jni into libservice-connectivity
[NETD-TC#15] Make ConnectivityService and PermissionMonitor calls BpfNetMaps on T
There is not really a point to separate these two as they are all used
in ConnectivityService.
As a future TODO, we might want to rename libservice-connectivity to
libcom_android_server_jni to be more inline with the jarjar'ed jni lib
versions.
Test: atest FrameworksNetTests:ConnectivityServiceTest
Change-Id: I1b9f4fde345038bda6b3ffcf8e3f47cf9262e052
1. Add libnetd_updatable.so in com.android.tethering. The library is
loaded by netd. Currently, it mainly targets on a few functions which
access BPF maps. The functionality may extend in the future.
2. Attach gcroup progs from libnetd_updatable.so.
3. Move (privileged)TagSocket and untagSocket implementation to mainline
module. Combine privilegedTagSocket and untagSocket into a single
function.
4. Split related unit tests from netd_unit_test to
libnetd_updatable_unit_test as well.
Bug: 202086915
Test: cd system/netd; atest
Test: atest TrafficStatsTest NetworkUsageStatsTest
Change-Id: Ib556458103a4cbb643c1342d9b689ac692160de0
* changes:
Don't enable DscpPolicyTracker on pre-T devices.
Allow service JNI in FrameworksNetIntegrationTests.
Don't manually load the JNI library in DscpPolicyTracker.
Process DSCP QoS events for policies
Allow using BpfMap and TcUtils in unit tests.
Disable the tethering.inprocess APEX in stable API module
branch, as it builds against unstable API stubs that cannot be
built there.
Ignore-AOSP-First: this allows avoiding merge conflicts in AOSP
Bug: 190249673
Change-Id: I474faea75293f33fa4cd53c7619087503c658b74
Test: m
New events to handle adding and removing of DSCP QoS policies.
Async indication sends status back to client if the policy
has been added, failed, or if the policy limit has been
reached.
Bug: 202871011
Change-Id: I7988d22ae625ad0dd415927d2943de4a749e6fb8
This is necessary to disable the .inprocess APEX, in branches that only
use stable APIs, as it depends on unstable stubs. override_apex does not
support defaults.
Bug: 190249673
Test: m
Change-Id: Ib4a27b65f3c5b6d4b0ac69e85cf671038efc5744
Nearby will be merged together with the tethering/connectivity APEX, so
that module maintenance efforts can be reduced, and the two codebases
can evolve the interfaces that they expose to each other over time.
Bug: 189355156
Test: m
Ignore-AOSP-First: Nearby is not yet in AOSP. This introduces minimal
unavoidable merge conflicts until it is merged there.
Change-Id: If4b40689a257d2806f895cd2dded97fc699adc5f
This CL provides native methods to access BPF maps via a native library.
Bug: 202086915
Test: m; flash; boot;
Change-Id: I2e5d03d0c2e31ba11996d1b28ead9b552397fe29
This is a clean move. The content of netd.c is not changed. The object
name is still netd.o. But the module name is renamed to netd.o_mainline
to avoid name collision in sc-mainline-prod branch.
Modified Android.bp according to the file location. The sub_dir is
newly specified. The object file will be compiled to:
- apex/com.android.tethering/etc/bpf/net_shared/netd.o
The extracted programs and maps will be in:
- sys/fs/bpf/net_shared/
The netd.o will not be loaded in pre-T because the bpfloader before T
does not load objects from paths other than:
- apex/com.android.tethering/etc/bpf/
- /system/etc/bpf/
Bug: 202086915
Test: cd system/netd; atest
Test: atest TrafficStatsTest NetworkUsageStatsTest
Change-Id: I5281c851341f9258a37d8aad6da4196c06342940
- Add a default to framework-connectivity-tiramisu for disabling
T-only build rules.
- Separate the tiramisu hidden apis from hiddenapi txt files, so
that the framework-connectivity-tiramisu file can avoid being
referenced by the APEX when the JAR is not part of it.
Bug: 206893064
Test: m
Merged-In: I37c7385b456e4d71789aafe33cc8375adf40a681
Change-Id: I37c7385b456e4d71789aafe33cc8375adf40a681
* changes:
DO NOT MERGE: disable connectivity-tiramisu build
Prepare T build rules for backwards compatibility
Build framework-connectivity-tiramisu library
Set clatd privs to clat:clat:-r-sr-sr-x and set its parent
directory privs to root:system:dr-xr-x---. Makes sure that
only root and system group members can execute the binary.
Test: flash and check the file permission
$ adb shell ls -lZ /apex/com.android.tethering/bin
dr-xr-x--- 2 root system u:object_r:system_file:s0 4096 1970-01-01 08:00 for-system
$ adb shell ls -lZ /apex/com.android.tethering/bin/for-system
-r-sr-sr-x 1 clat clat u:object_r:clatd_exec:s0 24352 1970-01-01 08:00 clatd
Bug: 212345928
Test: test clat
1. Connect to ipv6-only wifi.
2. Make IPv4 traffic.
$ ping 8.8.8.8
Change-Id: I9537d47b135e6e0324fb40ece2b9f7befb159244