Commit Graph

93 Commits

Author SHA1 Message Date
Maciej Żenczykowski
577c46a185 Merge "Add bpf jni into connectivity module" 2021-12-23 18:44:48 +00:00
markchien
8fb75e3916 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
2021-12-23 14:33:01 +08:00
Jiakai Zhang
86c139aedb 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
2021-12-21 09:36:33 +00:00
markchien
598a75ba8c Add defaults to enable/disable connectivity/tethering next
The defaults can be used to enable/disable connectivity next targets
depending on the branch, while minimizing merge conflicts.

The "next" target may use unstable APIs. It need to be disabled in the
branch which only have the last stable SDK available.

Also correct TetheringTestsLatestSdkLib which should use stable API.

Test: TH
Change-Id: I00d91bbd513277c1cedf67d18ac9f56cc4037309
2021-11-24 12:20:23 +08:00
markchien
5a8c806e55 Separate tethering build target to Tethering and TetheringNext
To avoid much code diverge between aosp and its downstream, we need to
separate the build target which build with latest stable sdk in release
branch and build with unfreeze sdk in dev branch. So we could use new
API with APIshim in dev branch without impacting release branch.

BYPASS_INCLUSIVE_LANGUAGE_REASON=the wording is the file name of
existing file.
Bug: 204265450
Test: m
Change-Id: I949fd83b1eed7461e0b381193b190cf15080bc1b
2021-11-04 08:53:12 +00:00
Chalard Jean
8d83bc0aed Merge "Remove a useless comment" am: c486f0248b am: dcd4438dfa
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1777769

Change-Id: Ie372ac7544afa86dd6c8f1298974e307e76f08b3
2021-07-27 03:25:33 +00:00
Chalard Jean
f126170e98 Remove a useless comment
b/145383354 is obsolete and this works as is (or we'd have found
out by now). Also min SDK version is set in the bp file and
would be overridden anyway.

Test: comment-only change
Change-Id: I6ad3263557ef67aa642672863eed82a312c2ab40
2021-07-27 02:59:11 +00:00
Remi NGUYEN VAN
d1a4e1b4c4 Merge "Bump Tethering apex version code for S" am: 8b3213f38e am: 8ea56369dc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1768350

Change-Id: I702d805bd124b592ff1c44362872837b530a3fc9
2021-07-20 15:08:33 +00:00
Remi NGUYEN VAN
1d6e7d5117 Bump Tethering apex version code for S
The version code in the manifest is only used for development
builds, as release builds dynamically replace it.

319999900 is appropriate as it indicates that the module is compatible
with S and earlier, and allows installing development versions on any
S build, which use 31xxxxxxx versions. It will also still allow installing
production T modules (32xxxxxxx) on a development S build. This is
convenient for local testing.

The same convention is also used for other modules including
NetworkStack.

Bug: 193853555
Test: m com.google.android.tethering, check version code

Change-Id: Ib8905a641780bed490a38327facee4a76e7770a3
2021-07-19 18:09:20 +09:00
Remi NGUYEN VAN
13b8b17b11 Bump Tethering apex version code for R
The version code in the manifest is only used for development
builds, as release builds dynamically replace it.

Tethering should have been using 309999900 during S development. That
version was used in many downstream branches, so make it consistent so
it can be bumped for S in all branches.

Bug: 193853555
Test: m com.google.android.tethering, check version code
Merged-In: Ia3d5f2201ce67308df8e2689f6c99e28049a4877
Merged-In: I0d4bd06e79adedbf582d2fed551d9f1bde521fd1
Merged-In: Ie3a058b904cb2e3704c3a0725c8f720f81bb235e
Change-Id: I644f0d801efb491be45c3dc29fa1058476282772
2021-07-19 18:07:23 +09:00
Paul Duffin
f9a0c868c4 Enable tethering to perform its own hidden API processing
Previously, the hidden API encoding of the tethering boot dex jars,
i.e. those dex jars that tethering contributes to the bootclasspath
were done as part of the monolithic hidden API processing. This change
causes the encoding to be done by the tethering's
bootclasspath_fragment.

This change involves the following:
* Addition of the fragments property to the tethering's
  bootclasspath_fragment module to list all the other
  bootclasspath_fragment modules on which this depends.
* Addition of the additional_stubs property to add stubs for APIs that
  are not provided by another bootclasspath_fragment.

The build automatically checks that the hidden API flags which are
computed by tethering and encoded into its boot dex jars match those
that are generated by the monolithic processing so this is guaranteed
to be safe.

Bug: 179354495
Test: m com.android.tethering
      - ensure that the generated APEX is byte-for-byte identical
        before and after these changes.
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - make sure that they are not changed by this.
(cherry picked from b28cb44e4b)

Merged-In: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
Change-Id: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
2021-06-30 00:00:41 +01:00
Paul Duffin
b28cb44e4b Enable tethering to perform its own hidden API processing
Previously, the hidden API encoding of the tethering boot dex jars,
i.e. those dex jars that tethering contributes to the bootclasspath
were done as part of the monolithic hidden API processing. This change
causes the encoding to be done by the tethering's
bootclasspath_fragment.

This change involves the following:
* Addition of the fragments property to the tethering's
  bootclasspath_fragment module to list all the other
  bootclasspath_fragment modules on which this depends.
* Addition of the additional_stubs property to add stubs for APIs that
  are not provided by another bootclasspath_fragment.
* Moving hidden API flag file entries related to tethering from the
  flag files in frameworks/base/boot/hiddenapi directory into the
  tethering directory with an appropriate OWNERS file to allow them to
  be managed by the Soong and compat team.
* Addition of a PREUPLOAD.cfg hook script to ensure that the flag files
  are sorted.

The build automatically checks that the hidden API flags which are
computed by tethering and encoded into its boot dex jars match those
that are generated by the monolithic processing so this is guaranteed
to be safe.

Bug: 179354495
Test: m com.android.tethering
      - ensure that the generated APEX is byte-for-byte identical
        before and after these changes.
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - make sure that they are not changed by this.
Change-Id: I4d9621325c7fcea5043cbca4c577ba2ac6125c0c
Ignore-AOSP-First: merge conflicts
2021-06-28 23:41:38 +01:00
Nikita Ioffe
5f33357348 Mark tethering apex as compressible
Bug: 178713634
Test: presubmit
Change-Id: I621305e47b5b86408a72c622b1e367cd0e75f82c
Merged-In: I621305e47b5b86408a72c622b1e367cd0e75f82c
(cherry picked from commit 31cef5ebe2)
2021-05-27 15:21:33 +01:00
Anton Hansson
db3b06959f Include sdk versioning proto in tethering apex
Allows SdkExtensions to inspect its version to decide what the extension
sdk version is on-device.

Bug: 188787081
Test: m com.android.tethering and inspect
Merged-In: If2d28b02be871594fed1fbb40b7aad284b553afb
Change-Id: If2d28b02be871594fed1fbb40b7aad284b553afb
2021-05-27 07:35:31 +00:00
Nikita Ioffe
d2d0d82a1d Merge "Mark tethering apex as compressible" 2021-05-26 10:29:16 +00:00
Anton Hansson
89eb55fb8a Include sdk versioning proto in tethering apex
Allows SdkExtensions to inspect its version to decide what the extension
sdk version is on-device.

Bug: 188787081
Test: m com.android.tethering and inspect
Ignore-AOSP-first: internal topic, will cherry-pick after submission
Change-Id: If2d28b02be871594fed1fbb40b7aad284b553afb
2021-05-25 13:01:31 +01:00
satayev
8bb425a75e Add bootclasspath_fragment.
Note that the contents of the bootclasspath_fragment are added as
dependencies to an apex, so there is no need to duplicate them in
java_libs.

Bug: 180105615
Test: atest CtsClasspathsTestCases
Ignore-AOSP-First: multiple previous changes aren't cherry-picked yet
Change-Id: Ia19ed0d5e13676882239dd5a1456c97549119994
2021-05-12 16:42:59 +01:00
satayev
5ba2950bfb Add bootclasspath_fragment.
Note that the contents of the bootclasspath_fragment are added as
dependencies to an apex, so there is no need to duplicate them in
java_libs.

Bug: 180105615
Test: atest CtsClasspathsTestCases
Change-Id: Ia19ed0d5e13676882239dd5a1456c97549119994
Merged-In: Ia19ed0d5e13676882239dd5a1456c97549119994
2021-05-12 16:08:11 +01:00
Remi NGUYEN VAN
6d575cace8 Add framework-connectivity to the Tethering APEX
Add framework-connectivity and its jni library dependency to the APEX.

Bug: 171540887
Test: device boots, has connectivity
Ignore-AOSP-First: Merge conflicts, will cherry-pick

Change-Id: I72fc7fee7bfcd909cbc79b4c34e8b3f29055d378
2021-03-24 23:05:29 +09:00
Remi NGUYEN VAN
2fb22c2a2b Add ServiceConnectivityResources to in-process APEX
The APK was added to the standard APEX, but is missing in the
in-process APEX.

Bug: 182557971
Merged-In: Ic2491f04880ff66abc3b2d3aaee6168e18f6d68a
Merged-In: Ibf982ceb5f0fd61c822399e3eeeb1ef5e500604d

Change-Id: Ibf982ceb5f0fd61c822399e3eeeb1ef5e500604d
Test: m
2021-03-14 12:33:30 +09:00
Remi NGUYEN VAN
f0f0ccad71 Add ServiceConnectivityResources to in-process APEX
The APK was added to the standard APEX, but is missing in the
in-process APEX.

Bug: 182557971
Ignore-AOSP-First: corresponding change is not yet in AOSP
Change-Id: Ibf982ceb5f0fd61c822399e3eeeb1ef5e500604d
Test: m
2021-03-12 15:08:03 +00:00
Remi NGUYEN VAN
60f4c2f425 Add ServiceConnectivityResources to tethering
The resource package is used by service-connectivity to load its own
resources.

Bug: 182125649
Test: atest FrameworksNetTests

Merged-In: I3c7fc6285f10318ecef05a64e1179054bb831d99
Merged-In: Ic2491f04880ff66abc3b2d3aaee6168e18f6d68a

Change-Id: I3c7fc6285f10318ecef05a64e1179054bb831d99
2021-03-12 17:50:41 +09:00
Remi NGUYEN VAN
affd94b26d Add ServiceConnectivityResources to tethering
The resource package is used by service-connectivity to load its own
resources.

Bug: 182125649
Test: atest FrameworksNetTests
Ignore-AOSP-First: Need to merge manually in relevant branches

Change-Id: I3c7fc6285f10318ecef05a64e1179054bb831d99
2021-03-09 17:47:49 +09:00
Bob Badour
a3f610a7b2 Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity" am: f5b346ed1d am: c384c677ef
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1587901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2f5af6eb56b232f1b79ff48ca6824f2ec726f01a
2021-02-19 07:48:38 +00:00
Bob Badour
f5b346ed1d Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity" 2021-02-19 06:23:22 +00:00
Treehugger Robot
d201e37561 Merge "Set updateable:false explicitly in apex rules." am: c72a6cae30 am: 89cd911569
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1590053

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I073da66ae98c1de75870ba2da1e5504a319902b2
2021-02-18 10:24:59 +00:00
Mathew Inwood
adfc933979 Set updateable:false explicitly in apex rules.
Currently, this is the default so this is a no-op,
But the default is changing to true.

Bug: 180375550
Test: Treehugger
Change-Id: Ib841e474ab2b2ff2b54c160bb06c3bbbeea92675
2021-02-16 14:58:27 +00:00
Bob Badour
97e6be27f6 [LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity
Added SPDX-license-identifier-Apache-2.0 to:
  Tethering/Android.bp
  Tethering/apex/Android.bp
  Tethering/bpf_progs/Android.bp
  Tethering/common/TetheringLib/Android.bp
  Tethering/tests/Android.bp
  Tethering/tests/integration/Android.bp
  Tethering/tests/mts/Android.bp
  Tethering/tests/privileged/Android.bp
  Tethering/tests/unit/Android.bp
  tests/cts/hostside/Android.bp
  tests/cts/hostside/aidl/Android.bp
  tests/cts/hostside/app/Android.bp
  tests/cts/hostside/app2/Android.bp
  tests/cts/hostside/certs/Android.bp
  tests/cts/net/Android.bp
  tests/cts/net/api23Test/Android.bp
  tests/cts/net/appForApi23/Android.bp
  tests/cts/net/jni/Android.bp
  tests/cts/net/native/dns/Android.bp
  tests/cts/net/native/qtaguid/Android.bp
  tests/cts/net/util/Android.bp
  tests/cts/tethering/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I8534c580f0e2a17be146300b67b3604817b64507
2021-02-16 04:09:58 -08:00
Nikita Ioffe
31cef5ebe2 Mark tethering apex as compressible
Bug: 178713634
Test: presubmit
Change-Id: I621305e47b5b86408a72c622b1e367cd0e75f82c
2021-02-04 01:42:45 +00:00
Maciej Żenczykowski
866a65d07c Merge "move bpf test map into a separate file" am: ab44322f9c am: e15c4e0281
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1554234

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I92792b09a33e78a86ecaa96a70654a3bca181335
2021-01-19 12:00:00 +00:00
Maciej Żenczykowski
e9810ffef1 move bpf test map into a separate file
This allows for better separation of test vs production code:
we will add more test maps and programs here later.

Test: builds
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7b22e3e148ebf43fdf43dc68d0dea354f7627688
2021-01-18 18:36:00 -08:00
Remi NGUYEN VAN
a8208c50f8 Merge "Revert^2 "Add service-connectivity to tethering APEX"" am: 73fa31b404 am: f3b8223844
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1542627

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I14b6da2e75fce0274e64701cf79dca46abad0f60
2021-01-12 02:21:57 +00:00
Remi NGUYEN VAN
2812f607a0 Revert^2 "Add service-connectivity to tethering APEX"
Add the connectivity service JAR to the tethering APEX.
This change should not be released in monthly updates until the
modularization work is done, so will be reverted in module release
branches.

This rolls forward the change. The original topic was reverted because
of a bad merged-in clause; this is fixed and re-verified in this topic.

Test: Boot, wifi connects and has internet access
Bug: 171540887

Change-Id: Ib0ac49609e444a53a6fee4575f5078e15f364eef
2021-01-08 01:24:36 +00:00
Treehugger Robot
42e3663c76 Merge "Revert "Add service-connectivity to tethering APEX"" am: 4f430ae5ec am: 67650555b1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1541543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I77fdad4bf192ba260118f6ef2b7c2fd0b2ae3b3d
2021-01-07 18:48:00 +00:00
Pete Bentley
850ca6f6b4 Revert "Add service-connectivity to tethering APEX"
Revert "Set setCurrentProxyScriptUrl as public"

Revert submission 1532910-connectivity_jar_in_apex

Reason for revert: Breaks boot tests: b/176969905
Reverted Changes:
Ie41a5b569:Set setCurrentProxyScriptUrl as public
Id7b6a4664:Move service-connectivity to the tethering APEX
Ia7cb83834:Add service-connectivity to tethering APEX

Change-Id: I9f31d4810a92e620f02cc8d24bdf18fe28001a2b
2021-01-07 13:51:18 +00:00
Lorenzo Colitti
4b2bf51ef9 Merge "Add service-connectivity to tethering APEX" am: 7998551cdc am: 3ebe8d0394
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1488520

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5f1f8a73b73277709568a79b623fa88f13b95179
2021-01-07 09:49:41 +00:00
Remi NGUYEN VAN
bd5cc4231d Add service-connectivity to tethering APEX
Add the connectivity service JAR to the tethering APEX.
This change should not be released in monthly updates until the
modularization work is done, so will be reverted in module release
branches.

Test: Boot, wifi connects and has internet access
Bug: 171540887
Merged-In: Ic496cd62be8c90928ccc619519ebe517beea78f0

Change-Id: Ia7cb83834b854e8c495c4ef17ec69ad032509208
2021-01-07 06:17:33 +00:00
Nikita Ioffe
b6313e4e2c Merge "com.android.tethering: set min_sdk_version 30" am: 06bf173b20 am: b2bfb81567
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1489717

Change-Id: I8ff9ecaa92dbbf39659211b05ef9469c25909e12
2020-11-09 06:06:37 +00:00
Nikita Ioffe
583e35a12e com.android.tethering: set min_sdk_version 30
Tethering is updatable apex module that was launched in R, hence it and
all it dependencies should specify min_sdk_version <= 30.

Test: m
Bug: 171668006
Bug: 171330443
Change-Id: Ic91cf96dda6419d1038b0329b920f9cd24482aef
Merged-In: Ic91cf96dda6419d1038b0329b920f9cd24482aef
(cherry picked from commit bee20e84f8)
(cherry picked from commit 1fe1e539e1)
2020-11-05 20:30:40 +00:00
markchien
0582605da7 Bump Tethering apex version code
The version code in the manifest is only used for development
builds, as release builds dynamically replace it.

Bug: 170183552
Test: m
Change-Id: I51916756f41672d372e3a4adce3a8edf5d472c0d
2020-10-22 06:49:24 +00:00
Nucca Chen
b463014633 Merge "Move BPF offload program from netd to mainline" am: c26848e7bd am: a0d6f9712b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424189

Change-Id: Ic90ce1bc5a5abd1eb515e5392b2980cdd001dc9f
2020-09-18 04:56:57 +00:00
Nucca Chen
a0d6f9712b Merge "Move BPF offload program from netd to mainline" am: c26848e7bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424189

Change-Id: Ia0b8a185f44dac7db365fcb9fc865a82bd552d62
2020-09-18 04:27:28 +00:00
Hungming Chen
56c632caed Move BPF offload program from netd to mainline
Test: as the follows.
$ adb shell ls sys/fs/bpf | grep offload
map_offload_tether_ingress_map
map_offload_tether_limit_map
map_offload_tether_stats_map
prog_offload_schedcls_ingress_tether_ether
prog_offload_schedcls_ingress_tether_rawip

$ adb shell dumpsys netd --short
  TetherController
    BPF ingress map: iif(iface) v6addr -> oif(iface) srcmac ..
      13(rmnet_data3) 2401:e180:8842:6e3:bc6a:2e45:c30:f418 -> ..
    BPF stats (downlink): iif(iface) -> packets bytes errors
      13(rmnet_data3) -> 7 488 0
    BPF limit: iif(iface) -> bytes
      13(rmnet_data3) -> 9223372036854775807

Log:
bpfloader: Loaded object: /apex/com.android.tethering/etc/bpf/offload.o

Change-Id: I71b7efb1f4bd6eb1cd469a0e1e4a56342dc6e579
2020-09-16 20:38:14 +08:00
android-build-team Robot
8e291dea63 Make change and version bump to r_aml_300900700 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ieed62e845451de7c90a0f71a21289003e5ea8b72
2020-07-09 03:16:41 +00:00
android-build-team Robot
0076305369 Make change and version bump to r_aml_300900600 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Idac701bf872c3e7d5b854c6a19ca0da5d01d6699
2020-07-08 03:17:08 +00:00
android-build-team Robot
ce11e33b62 Make change and version bump to r_aml_300900500 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I7daf3a7b2989105022a05e6b3c7d3fdbe165baed
2020-07-07 03:16:56 +00:00
android-build-team Robot
37718b7db0 Make change and version bump to r_aml_300900400 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I538efbc8e379b929f50ad1762bdf759ca31cdbb8
2020-07-06 03:16:59 +00:00
android-build-team Robot
806c971702 Make change and version bump to r_aml_300900300 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ic95844fa021e178f665d3cc74e795e510cee29db
2020-07-04 03:16:40 +00:00
android-build-team Robot
5761320c2f Make change and version bump to r_aml_300900200 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ic32f7f6c83b8bc61d3ef93c03857ea205c6b0dbe
2020-07-03 03:17:10 +00:00
android-build-team Robot
1a727e2525 Make change and version bump to r_aml_300900100 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I182d7ddf35e0684e7b6cb54fed43662a26a9d3dd
2020-07-02 03:16:45 +00:00