Commit Graph

24 Commits

Author SHA1 Message Date
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
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
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
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
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
Bob Badour
f5b346ed1d Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity" 2021-02-19 06:23:22 +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
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
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
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
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
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
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
Treehugger Robot
bfd392c4c0 Merge "Override tethering module APK-in-APEX for Go variant" 2020-05-08 12:11:47 +00:00
Jooyung Han
8182d8bd56 Set min_sdk_version for updatable mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 145796956
Bug: 150999716
Test: m
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
2020-05-07 17:30:00 +09:00
markchien
dbaff66f45 Override tethering module APK-in-APEX for Go variant
Bug: 155604224
Test: build
Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
Merged-In: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
2020-05-07 06:35:05 +00:00
Jooyung Han
4475b7fc93 Add min_sdk_version:R to updatable apexes
APEXes introduced in R need to set min_sdk_version to ensure that they
are built against correct version of stubs (libc/liblog/...).

Bug: 152655956
Test: m
Merged-In: I4a893c34b09334eea124266287301e479b9e8a59
Change-Id: I4a893c34b09334eea124266287301e479b9e8a59
(cherry picked from commit f1460fad52)
2020-04-09 16:05:04 +09:00
Jiyong Park
5c72ad41f0 Mark updatable APEXes
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.

Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Idb55300a60a261c7bb6359439ed220ff51fcf06c
(cherry picked from commit 8201bdfab070fb2b93a997947095fad003060da9)
Change-Id: Idb55300a60a261c7bb6359439ed220ff51fcf06c
2020-02-29 09:18:24 +00:00
markchien
9d3538260b [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
markchien
8f831c09e5 Change Tethering package name
".apex" is easy to confuse.
Rename as below:
apex: com.android.tethering.apex -> com.android.tethering
apk: com.android.tethering -> com.android.networkstack.tethering

Bug: 146471733
Test: build

Change-Id: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
Merged-In: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
2019-12-19 13:06:50 +08:00
markchien
0abdd119f2 [Tether17] create com.android.tethering.apex package
Add APEX com.android.tethering.apex for tethering module.
It have tethering apk now and would have jar and library
in follow up CL.

Bug:144320626
Test: build
Change-Id: Ie6158639886e90180dd90347e802a5fe062031b2
2019-12-02 01:54:31 +00:00