Commit graph android_packages_modules_Co.../Tethering/apex/Android.bp
Message SHA1
Merge "Using common apex_defaults for com.android.tethering module." am: 6802eadef5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2007756

Change-Id: I2ff4e2d44bc8787c9a07027147d1adea1df4c1b4

Gurpreet Singh   authored and   Automerger Merge Worker   commited 2022-03-07 17:57:46 +00:00
36996876b0
Using common apex_defaults for com.android.tethering module.
In /packages/modules/common/sdk/ModuleDefaults.bp file, some
apex_defaults are added to provide common parameters corresponding to
Q, R, S, and T releases.
(Refer to CL link for above mentioned change -
https://android-review.googlesource.com/c/platform/packages/modules/common/+/2005890?forceReload=true)

This CL is using the apex_default corresponding to R release for the
com.google.android.tethering module.

Bug: 172589606
Test: USE_RBE=true m
Since there are no runtime changes, successful code build is enough for
testing.

Change-Id: I4b3b3d6add96da1ee4421227996b54f7b96bc2c2

Gurpreet Singh   commited 2022-03-04 15:34:29 +00:00
a12858d494
DO NOT MERGE: Rename framework-connectivity-tiramisu on buildstubs-t & Tethering/apex
Bug: 215434166
Ignore-AOSP-First: This is to avoid merge conflicts when merging in AOSP
Test: build, flash, device boot to home.
Change-Id: Idb4e1efd6cc306f0109951048c77e897789d3bf8

paulhu   authored and   Paul Hu   commited 2022-03-01 05:55:33 +00:00
9211a8fc38
Rename framework-connectivity-tiramisu to framework-connectivity-t
Bug: 215434166
Test: build, flash, device boot to home.
Merged-In: I9ebedf8813cbfa30d979bc35a3b2306715be682b
Change-Id: I9ebedf8813cbfa30d979bc35a3b2306715be682b

paulhu   commited 2022-03-01 09:44:21 +08:00
537f72061a
Add JNI stats libraries to apex Android.bp
This is separated from ag/16766427 to avoid merge
conflict at downstream branches. For some downstream branches,
the library does not exist and this part is commented out.

Bug: 197717846
Test: atest FrameworksNetTests
Merged-In: Idb6da7ce678fbb3f4839604726cbdbdf223144c1
Merged-In: Iae44344701a3267110e5cbf271120201134d59e5
Change-Id: I9d7f6cea1cdb3c8117e677d8c204e3985295ada0

junyulai   authored and   Junyu Lai   commited 2022-02-28 04:16:58 +00:00
6187e7c79a
[MS54.8] Add hiddenapi-unsupported-t.txt to apex Android.bp
This is separated from ag/16657723 to avoid merge
conflict at downstream branches. For some downstream branches,
the library does not exist and this part is commented out.

Test: TH
Bug: 197717846
Merged-In: I4eeb7ea9cfc3139991caf0fc22474e0052a0391c
Merged-In: I33e0d699086c87ce8e940036c9a52908bbbcf6c5
Change-Id: I031e5687fa47594b50ca1b40570e01cdec356827

junyulai   authored and   Junyu Lai   commited 2022-02-28 04:15:51 +00:00
4eccfdec89
DO NOT MERGE Add mock filegroups to deal with merge conflict problem
This is a preparing CL to cherry-pick netstats jni from git_master to
aosp. Define some mock files to deal with merge conflict problem between aosp
and sc-mainline-prod. The filegroups framework-connectivity-tiramisu-jni-sources
and services.connectivity-netstats-jni-sources is located in
framework/base which do not open for development in sc-mainline-prod.

Bug: 197717846
Test: m libservice-connectivity
Test: m com.google.android.Tethering
Ignore-AOSP-First: this is used to prevent merge conflict.
Change-Id: I33e0d699086c87ce8e940036c9a52908bbbcf6c5

markchien   authored and   junyulai   commited 2022-02-24 19:50:10 +08:00
dc72f289c1
DO NOT MERGE: Add build stubs to sc-mainline-prod for NetworkStats
Test: m service-connectivity
Ignore-AOSP-First: needed in sc-mainline-prod only
Bug: 197717846
Change-Id: Idb6da7ce678fbb3f4839604726cbdbdf223144c1

junyulai   commited 2022-02-22 15:43:06 +08:00
66ed3dbc67
Merge "Move permissions allowlist for Tethering" am: a828eb711c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1909681

Change-Id: Ib5243e699e97d008df879b754a8399e435553792

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-02-15 04:54:44 +00:00
3febed8d4d
Merge "Move permissions allowlist for Tethering"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-02-15 04:43:27 +00:00
a828eb711c
Move permissions allowlist for Tethering
The allowlist will now be in the apex instead.

Test: boots && check permissions.xml is bundled
Bug: 190375768

Change-Id: Ia7434cba54d2b51479e52323f22c7f454499991d

Andrei Onea   commited 2022-02-10 15:04:46 +00:00
52eac028fc
Merge "Dexopt service-connectivity." into sc-mainline-prod
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2022-02-08 12:32:18 +00:00
75e4f62ee1
Dexopt service-connectivity.
`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)

Jiakai Zhang   commited 2022-02-08 11:15:05 +00:00
0a9df3b900
Reorganize connectivity framework dependencies am: 6a20eeda42
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1965526

Change-Id: I6c384f50da0a4f1521cde195640d1db9fa4fa173

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2022-02-01 09:14:16 +00:00
7abb73ca83
Reorganize connectivity framework dependencies
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

Remi NGUYEN VAN   commited 2022-02-01 13:33:48 +09:00
6a20eeda42
Merge changes Ifd6be50a,I857e40c9,I1b9f4fde,Ib3b43cf2 am: 76709a18e9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1966602

Change-Id: I172654f1eb824ce8a241ef3551d31b1385fa5365

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-02-01 03:17:27 +00:00
f0a36ba740
Merge changes Ifd6be50a,I857e40c9,I1b9f4fde,Ib3b43cf2
* 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

Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-02-01 03:02:36 +00:00
76709a18e9
Merge "[NETD-BPF#19] Mainline part of bpf code from netd" am: 523eaffcdf
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1849156

Change-Id: Id7ee21b5e4c51725b5c8fe92e10531b2bce68dd7

Ken Chen   authored and   Automerger Merge Worker   commited 2022-01-31 23:08:34 +00:00
cdbe931643
Merge libtraffic_controller_jni into libservice-connectivity
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

Patrick Rohr   commited 2022-01-31 16:18:51 +01:00
361b859b00
[NETD-BPF#19] Mainline part of bpf code from netd
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

Ken Chen   commited 2022-01-30 09:51:25 +08:00
1647f60d66
Merge "DO NOT MERGE: Disable tethering.inprocess APEX in stable branch" into sc-mainline-prod
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2022-01-28 03:30:13 +00:00
da53c1039a
Merge changes from topic "dscp_policies" am: 2a947ceb50
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1963241

Change-Id: Ibf006cef2191a407978edbae20ac9910e03a7be5

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2022-01-27 23:37:51 +00:00
aa8facf3ac
Merge changes from topic "dscp_policies"
* 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.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-01-27 23:25:54 +00:00
2a947ceb50
DO NOT MERGE: Disable tethering.inprocess APEX in stable branch
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

Remi NGUYEN VAN   commited 2022-01-27 13:24:25 +00:00
d981a68aa0
Merge "Add var to enable/disable tethering next APEX" am: e9370c5ef4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1962623

Change-Id: I5cf08bb97b66dbc1234bca87317125bddf51bffa

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2022-01-27 11:58:06 +00:00
23565ae472
Merge "Add var to enable/disable tethering next APEX"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-01-27 11:41:26 +00:00
e9370c5ef4
Process DSCP QoS events for policies
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

Tyler Wear   authored and   Patrick Rohr   commited 2022-01-27 10:19:27 +00:00
723882126a
Add var to enable/disable tethering next APEX
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

Remi NGUYEN VAN   commited 2022-01-27 13:21:25 +09:00
f24553d950
[NETD-TC#14] Add traffic controller JNI to tethering module am: 790c83e387
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1948169

Change-Id: Iaaf605cb362b2065073e686be1faf65e92b93ed9

Wayne Ma   authored and   Automerger Merge Worker   commited 2022-01-23 22:24:15 +00:00
5513ee9b4e
[NETD-TC#14] Add traffic controller JNI to tethering module
This CL provides native methods to access BPF maps via a native library.

Bug: 202086915
Test: m; flash; boot;
Change-Id: I2e5d03d0c2e31ba11996d1b28ead9b552397fe29

Wayne Ma   commited 2022-01-24 00:22:26 +08:00
790c83e387
Merge "move clatd.c bpf program to mainline" am: 6ce19fab40
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1955267

Change-Id: I7e057f843aa2cfe25daffdc4b9c6b3c31ec7f2db

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-01-21 08:30:35 +00:00
1aac16799f
move clatd.c bpf program to mainline
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7e88fcc34c21695e844d607836df4661790cba03

Maciej Żenczykowski   commited 2022-01-20 21:00:22 -08:00
849b3aadc4
Merge "Move netd.c to Tethering module" am: 1f36542d1e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1952100

Change-Id: I9d567b4ce495fc3165e420c0f1f1dea65919a960

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-01-21 03:01:37 +00:00
1a6998e796
Merge "Move netd.c to Tethering module"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2022-01-21 02:42:35 +00:00
1f36542d1e
Move netd.c to Tethering module
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

Ken Chen   commited 2022-01-21 07:40:33 +08:00
587d4231fc
Prepare T build rules for backwards compatibility
- 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

Remi NGUYEN VAN   authored and   paulhu   commited 2022-01-20 13:57:44 +08:00
24b3c37e0a
Merge "Build framework-connectivity-tiramisu library"
Paul Hu   authored and   Gerrit Code Review   commited 2022-01-20 03:02:56 +00:00
a77cad355b
Merge "Set the permission to file clatd and directory for-system" am: fac8864d14
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1927026

Change-Id: I79d96299f604f8d2aa80b6d2feba279fb46e7555

Treehugger Robot   authored and   Automerger Merge Worker   commited 2022-01-19 13:26:12 +00:00
6f9da1b3e7
Merge changes I0c4e2956,I37c7385b,I9628716f into sc-mainline-prod
* changes:
  DO NOT MERGE: disable connectivity-tiramisu build
  Prepare T build rules for backwards compatibility
  Build framework-connectivity-tiramisu library

Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2022-01-18 01:27:55 +00:00
40777633e4
Set the permission to file clatd and directory for-system
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

Hungming Chen   commited 2022-01-14 18:33:40 +08:00
f9d40ae77a
Merge "Add clatd binary to apex" am: bb766e83c3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1944727

Change-Id: I762d040254484ee60d0432e453bf7ae0ef7f698f

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2022-01-14 03:37:58 +00:00
d3a4dc8ee6
Add clatd binary to apex
Ship clatd binary with apex. This makes that the clatd binary becomes
updatable.

Bug: 212345928
Test: manual test
1. Connect to ipv6-only wifi.
2. Make IPv4 traffic.
   $ ping 8.8.8.8

Change-Id: I4f6f0944e94e165983a19a5d3c3a117274f6bbac

Hungming Chen   commited 2022-01-11 17:02:32 +08:00
378e323000
Merge "Add bpf jni into connectivity module" am: 577c46a185
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1888502

Change-Id: Ie66f13e424d113e4d7338a937ca78f9d40b483b5

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2021-12-23 19:02:55 +00:00
14e70e1577
Merge "Add bpf jni into connectivity module"
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2021-12-23 18:44:48 +00:00
577c46a185
Add bpf jni into connectivity module
This is the preparing CL for connectivity module to use bpf.

Bug: 179733303
Bug: 205088391
Test: atest ConnectivityCoverageTests
Change-Id: Ibe49d7f671b5050461e2c63c080d9457ad76c26c

markchien   commited 2021-12-23 14:33:01 +08:00
8fb75e3916
Dexopt service-connectivity.
`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
Merged-In: I9a009493fe0482967ab1f92516514715cfd457d6

Jiakai Zhang   commited 2021-12-21 09:36:33 +00:00
86c139aedb
DO NOT MERGE: disable connectivity-tiramisu build
Disable framework-connectivity-tiramisu and do not include it in the
apex, and add empty filegroups and replacement stub classes to make
service-connectivity-tiramisu only contain
ConnectivityServiceInitializer.

This allows continuing to build the com.android.tethering APEX in the S
release branch, while minimizing build conflicts as T classes are being
prepared to move to it.

Bug: 206893064
Test: m com.android.tethering
Ignore-AOSP-First: sc-mainline-prod only.
Change-Id: I0c4e29568eadb6ef85ddadebbb37723adb9f29cd

Remi NGUYEN VAN   authored and   paulhu   commited 2021-12-20 18:32:55 +08:00
22ea877f84
Prepare T build rules for backwards compatibility
- 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
Ignore-AOSP-First: Merge conflict. Cherry-pick to aosp afterwards
Change-Id: I37c7385b456e4d71789aafe33cc8375adf40a681

Remi NGUYEN VAN   authored and   paulhu   commited 2021-12-20 16:32:10 +08:00
955c33c267
Build framework-connectivity-tiramisu library
- Move nsd APIs and build framework-connectivity-tiramisu library
- Add nsd associated hidden apis
- Build service-connectivity-tiramisu-pre-jarjar library for
  T+ services.
- Move ConnectivityServiceInitialiizer to service-t directory
  to create S+ service instances which can avoid dependency on
  lower sdk library.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
Ignore-AOSP-First: Other commits has merged conflict.
CTS-Coverage-Bug: 207804007
Merged-In: I9628716f5c38047ff4ea2346b27589077259c436
Change-Id: I9628716f5c38047ff4ea2346b27589077259c436

paulhu   commited 2021-12-20 16:31:07 +08:00
49ccb6a5cc
Build framework-connectivity-tiramisu library
- Move nsd APIs and build framework-connectivity-tiramisu library
- Add nsd associated hidden apis
- Build service-connectivity-tiramisu-pre-jarjar library for
  T+ services.
- Move ConnectivityServiceInitialiizer to service-t directory
  to create S+ service instances which can avoid dependency on
  lower sdk library.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I9628716f5c38047ff4ea2346b27589077259c436
Change-Id: I9628716f5c38047ff4ea2346b27589077259c436

paulhu   commited 2021-12-17 00:04:24 +08:00
802ab9760f