Commit graph

108,748 commits

Message SHA1
Merge "Add 'automotive-general-tests' in Android.bp of CtsNetTestCasesUpdateStatsPermission" into main
Filip Zakrzewski   authored and   Gerrit Code Review   commited 2025-01-15 17:04:42 -08:00
177faec9e6
Add 'automotive-general-tests' in Android.bp of CtsNetTestCasesUpdateStatsPermission
This change helps make Automotive presubmit builds faster. There are no side effects of this change elsewhere, it requires builds to configure said target to take effect and if configured this change only make the test show up in the automotive zip file

BUG: 382649664
Flag: TEST_ONLY

Change-Id: Ibe0cb51911449eb0ae5160c1170c2a28add3be98

Filip Zakrzewski   commited 2025-01-15 16:52:21 -08:00
40371ec964
Merge changes Iddc8975b,I2cedd584 into main
* changes:
  Add diagnostics on failure for PrivateDns test
  Wait for default route for wifi check

Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-15 00:45:15 -08:00
ba7089227f
Merge "Address lint warnings in diagnostics collector" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-15 00:13:15 -08:00
cbf9b1163e
Add diagnostics on failure for PrivateDns test
IWLAN on U 24Q2 release may cause this test to fail, but this was
supposed to be addresed by CarrierConfigSetupTest already.

Add diagnostics on failure to figure out if the IWLAN config is as
expected.

Test: atest
Bug: 253698734
Change-Id: Iddc8975bb473979f9c2769cd178ef75644b82aa7

Remi NGUYEN VAN   commited 2025-01-15 16:12:40 +09:00
4d47b52f6d
Wait for default route for wifi check
Instead of only waiting for an IPv6 address, wait for global IPv6
addresses to be routable.

This mirrors the check used for AI_ADDRCONFIG in DnsResolver. Without
this, the later call to network.getAllByName may only return IPv4
addresses if IPv6 global addresses are not reachable.

Test: atest
Change-Id: I2cedd58431eb8abeb5ffd9fb8daedb061586373b

Remi NGUYEN VAN   commited 2025-01-15 16:12:04 +09:00
ee21b71492
Address lint warnings in diagnostics collector
This change was generated by running the formatting tool.

Test: m
Change-Id: I38f5b3d0cc60c12b3a312a9e8498565f73a638f1

Remi NGUYEN VAN   commited 2025-01-15 16:05:29 +09:00
6f694d0ef9
Merge "NetBpfLoad: use __ANDROID_API_FUTURE__ for unreleased" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-14 19:15:52 -08:00
c20e2c046d
Merge "Disallow legacy tether() API starting in B" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-01-14 17:40:40 -08:00
07410ab1a6
NetBpfLoad: use __ANDROID_API_FUTURE__ for unreleased
See https://android-review.git.corp.google.com/c/platform/system/core/+/3309495

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I148d7efc21ab3eea2db484be1b1ca706e2ed632c

Maciej Żenczykowski   commited 2025-01-14 16:23:24 -08:00
db9171f987
Disallow legacy tether() API starting in B
As part of the major tethering refactor to associate every IpServer with
a TetheringRequest, tether()/untether() APIs should be completely
removed in B and all tethering should go through startTethering() (with
the exception of Wifi LOHS and Wifi P2P, which will move to
startTethering() in a future CL).

Bug: 216524590
Test: atest CtsTetheringTests TetheringTests

Change-Id: If7981f1ee7d80ff0a1cc0069ba7a4ebf79144160

Quang Anh Luong   commited 2025-01-15 08:59:42 +09:00
30d8a25db3
NetBpfLoad: rename isAtLeastW to isAtLeast25Q2
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I485e24663b924bbac97faa6f06156587c8968b81

Maciej Żenczykowski   commited 2025-01-14 15:00:14 -08:00
98975122a4
Merge "Add ARP offload for APFv6 multi-devices tests" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-14 10:27:42 -08:00
84c8e5be80
Merge "Ignore DnsResolverTapTest in instant mode" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-14 00:59:06 -08:00
bccb913156
Ignore DnsResolverTapTest in instant mode
Fix: 388642353
Test: atest CtsNetTestCases:android.net.cts.DnsResolverTapTest \
      --instant
Change-Id: I2d20799ebe715a73b0697ad4e768e5fda7afb87d

Paul Hu   commited 2025-01-14 06:46:08 +00:00
df572afb80
Add ARP offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: I32dae14d3bd6400ff47cc545410242f2ccd8f1ab

Jimi Chen   authored and   Yuyang Huang   commited 2025-01-14 14:38:22 +09:00
9bab61613f
Merge changes Ida388b6f,I9ed00a76,I2d37fe56,I81633390,Ia16926b4, ... into main
* changes:
  Register reserved offer
  Add L2capNetworkSpecifier to blanket offer
  Add blanket offer to L2capNetworkProvider
  Add empty L2capNetworkProvider
  Implement matching semantics for L2capNetworkSpecifier
  Do not allow L2CAP specifier with ROLE_SERVER and remote address set
  Do not redact PSM from L2capNetworkSpecifier
  Use IntRange for setPsm
  Improve documentation of L2capNetworkSpecifier
  Have setRemoteAddress accept a Nullable remoteAddress

Patrick Rohr   authored and   Gerrit Code Review   commited 2025-01-13 20:26:09 -08:00
62928ee6e1
Merge "Check supported kernel version in V and 25Q2+" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-13 17:53:39 -08:00
d2668178e4
Merge "NetBpfLoad: enforce kernel 5.4 for Android W" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-13 17:35:46 -08:00
a1fb141012
Check supported kernel version in V and 25Q2+
V requires 4.19+ and 25Q2+ requires 5.4+

(while 25Q4 will presumably further bump to 5.10+)

On aosp/main we currently have:
  ro.build.version.sdk=35
    - which is returned by android_get_device_api_level()
  ro.build.version.codename=Baklava
    - which is looked at by IsAtLeastPreReleaseCodename/GetCodename

This is because we're already past the aosp/main automerge into 25Q1 cutoff.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I909d63406151fbafc15fa248133b9d1a5dc37bdb

Maciej Żenczykowski   commited 2025-01-13 14:37:56 -08:00
1758f413a2
Register reserved offer
The reserved offer adapts the reservation requests capabilities, and
additionally populates its own capabilities (namely the PSM provided by
the BluetoothServerSocket).

Test: TH
Change-Id: Ida388b6f1e4552242726bd4d7eba6215bb0577a3

Patrick Rohr   commited 2025-01-13 13:57:20 -08:00
f1ae5ab86c
Merge "Update debug counter in testReplyPing" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-13 10:11:48 -08:00
6a2286df41
Add device_config flag to change the threshold for logging log list
update failures to statsd

This will allow it easier to debug the logging logic, without needing to
hit the default threshold of 10.

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 378626065
Test: atest NetworkSecurityUnitTests && tested flag behavior manually
Change-Id: I10c652615e78a700bb84aabaa37ddc850e031e56

Bessie Jiang   commited 2025-01-13 15:30:33 +00:00
7e4361ee09
Merge "Simplify failure logging code by removed failureLogged boolean flag" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-13 01:13:01 -08:00
eea993cb78
Merge "[Thread] allow disabling border router auto-join" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2025-01-12 22:48:30 -08:00
37504029df
Update debug counter in testReplyPing
Change debug counter from DROPPED_IPV6_MULTICAST_PING to DROPPED_IPV6_NS_REPLIED_NON_DAD.
The DROPPED_IPV6_MULTICAST_PING counter is no longer used and scheduled for removal.

Test: atest CtsNetTestCases:android.net.cts.ApfIntegrationTest
Change-Id: I00eac8522b4e18b9bae8bfeab9d451314f88b5f9

Jimi Chen   commited 2025-01-13 03:36:47 +00:00
ecaf3e33c6
Move ARPHRD_ETHER assertion below test assume condition
Makes saner error if device does not even support APF at all.

Test: TreeHugger
Bug: 385979701
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ided37893d7e0d6b03436064f44d1fa9061f0951d

Maciej Żenczykowski   commited 2025-01-10 18:08:19 -08:00
0806b1bf84
Add L2capNetworkSpecifier to blanket offer
The blanket offer is used to respond to reservation requests and only
serves ROLE_SERVER networks, as ROLE_CLIENT networks are not reserved.

Test: TH
Change-Id: I9ed00a76fa0d61caf27e321ea17260fb12b69600

Patrick Rohr   commited 2025-01-10 14:46:54 -08:00
56ced95d2a
Add blanket offer to L2capNetworkProvider
Registers a blanket reservation offer which will receive reservation
requests filed using ConnectivityManager#reserveNetwork.

Test: TH
Change-Id: I2d37fe564a6c40f2c6dee1f6f7aa655c47628b85

Patrick Rohr   commited 2025-01-10 14:46:54 -08:00
77df9d3483
Add empty L2capNetworkProvider
The network provider is registered when BLE is supported.

Bug: 372936361
Test: L2capNetworkProviderTest
Change-Id: I8163339015f4a3bb0ff8911f6f52a38ec1730f39

Patrick Rohr   commited 2025-01-10 14:46:54 -08:00
47425dcb52
Implement matching semantics for L2capNetworkSpecifier
A server network is created by using ConnectivityManger#reserveNetwork,
in which the app passes a specifier that sets:

reservationRequest = {
    role = server
    headerCompression = 6lowpan
    remoteAddr = any (null)
    psm = any
}

This specifier must subsequently match the blanket reservation offer,
and the reserved offer that is generated as a response:

blanketOffer = {
    role = server
    headerCompression = any
    remoteAddr = any (null)
    psm = any
}

reservedOffer = {
    role = server
    headerCompression = 6lowpan
    remoteAddr = any (null)
    psm = 0x81
}

And not the client network offer or a client network:

clientOffer = {
    role = client
    headerCompression = any
    remoteAddr = any (null)
    psm = any
}

clientNetwork = {
    role = client
    headerCompression = 6lowpan
    remoteAddr = 01:02:03:04:05:06
    psm = 0x81
}

Similarly the client request must match both the clientOffer and
clientNetweork, but not the reservedOffer (and technically
blanketOffer):

clientRequest = {
    role = client
    headerCompression = 6lowpan
    remoteAddr = 01:02:03:04:05:06
    psm = 0x81
}

Note, a request for TRANSPORT_BLUETOOTH with no specifier matches *any*
specifier per specifier matching semantics in NetworkCapabilities.

Test: L2capNetworkSpecifierTest
Change-Id: Ia16926b463a54530ae6e88278466e92ed82bf852

Patrick Rohr   commited 2025-01-10 14:46:54 -08:00
74a8f475b2
Extend ApfIntegrationTest to cover VSR-16 requirements
Updated ApfIntegrationTest to validate APFv6 support and minimum APF RAM
size (4000 bytes) for device with VSR API level 202504, as mandated by
the VSR-16 specification.

Bug: 383959066
Test: TH
Change-Id: I8a54ab696d9633534586e0a2ee9902f3759ca420

Yuyang Huang   authored and   Maciej Żenczykowski   commited 2025-01-10 13:44:11 -08:00
9bab22dc42
Merge "APF optionality for TV devices meeting specific power requirements" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-10 13:40:56 -08:00
b23c37e7c1
Merge "Revert^2 "Use unicast instead of broadcast as ethernet destination in test_apf_drop_ethercat"" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-10 11:14:52 -08:00
d1d1e402f0
Do not allow L2CAP specifier with ROLE_SERVER and remote address set
This is an invalid combination that never seems useful. Note that this
still allows ROLE_ANY in combination with a remote address. This still
doesn't seem particularly useful, but there is no good reason to
disallow it.

Test: TH
Change-Id: Ib0b7284cb99ee92f14113f8184af978eeb2318e7

Patrick Rohr   commited 2025-01-10 08:57:03 -08:00
5e61925e51
Simplify failure logging code by removed failureLogged boolean flag
Instead of the boolean flag tracking that we are logging only once, use
an int to store the failureReason instead.

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 378626065
Test: atest NetworkSecurityUnitTests
Change-Id: Ifcdb599f39bb8e1ce9c8b4a8d27fb4500df23256

Bessie Jiang   commited 2025-01-10 16:24:16 +00:00
5d90324b09
Merge "[Nearby]Fix sometimes can't stop the previous advertising" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-10 05:24:03 -08:00
e9afca10d9
[Thread] allow disabling border router auto-join
Test: verified that when the config is set to `false`, thread won't start up after reboots:
```
➜  main-aosp-2 adb shell ot-ctl state
leader
Done
➜  main-aosp-2 adb reboot
➜  main-aosp-2 adb shell ot-ctl state
/system/bin/sh: ot-ctl: inaccessible or not found
➜  main-aosp-2 adb root
➜  main-aosp-2 adb shell ot-ctl state
disabled
Done
```

Bug: 378587036
Change-Id: I4d1c90ab3121f39219cbaf795879a7ba91db02a3

Kangping Dong   commited 2025-01-10 00:09:06 -08:00
d2fc66d4bb
Revert^2 "Use unicast instead of broadcast as ethernet destination in test_apf_drop_ethercat"
This reverts commit c3eccf9ef4.

Reason for revert: As we discussed, it might be valid for the chipset to drop BC (non-ARP, non-IPv4) packets in the hardware instead of the firmware. To ensure this test doesn't fail on those chipsets, using unicast packets for testing seems more suitable.

Change-Id: I89debf79965cf3ea62484c443e952bd137818efc

Yuyang Huang   authored and   Jimi Chen   commited 2025-01-10 07:12:27 +00:00
2bf81a8639
Merge "[Thread] allow disabling SRP server wait for border routing" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2025-01-09 21:54:49 -08:00
7b7ff96c29
Merge changes I756cb844,I79b63c68 into main
* changes:
  Rename TimerFileDescriptor to RealtimeScheduler
  Enhance TimerFileDescriptor to schedule multiple tasks

Treehugger Robot   authored and   Gerrit Code Review   commited 2025-01-09 18:29:29 -08:00
12d6da67a0
[automerger skipped] Merge "Remove tests not applicable to Android 15 CTS from android15-tests-dev" into android15-tests-dev am: fd46c429a4 -s ours
am skip reason: Merged-In Idbb31580d6489865c05e4a35760f1ea26f779f17 with SHA-1 8722953649 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3444360

Change-Id: I6d0239f0b2f5b6e41b61b91ec0fa359a08ee1b72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2025-01-09 15:36:47 -08:00
70f79d59a6
[automerger skipped] Remove tests not applicable to Android 15 CTS from android15-tests-dev am: 84ee2ff0a4 -s ours
am skip reason: Merged-In Idbb31580d6489865c05e4a35760f1ea26f779f17 with SHA-1 8722953649 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3444360

Change-Id: Ie5187a1e399eb182386e9ec72447d2c8803ced24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Yuyang Huang   authored and   Automerger Merge Worker   commited 2025-01-09 15:36:45 -08:00
a3973d2847
Merge "Minor style fixes" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-09 15:33:47 -08:00
0f47b7fc8d
Merge "Remove tests not applicable to Android 15 CTS from android15-tests-dev" into android15-tests-dev
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-01-09 15:15:16 -08:00
fd46c429a4
Modify apex_available to Bluetooth apex
Bluetooth apex name has changed from com.android.btservices to
com.android.bt. We now need to update the reference in the code.

Bug: 383863941
Flag: Exempt build infra
Test: m .
Change-Id: I92167eb785858565d28b1e72b3b98150378975a6

William Escande   commited 2025-01-09 12:25:16 -08:00
b82afa32e0
Move DownloadManager.COLUMN_REASON conversion to failure reason into
CTLogger

This CL adds a new API that will convert the
DownloadManager.COLUMN_REASON into the relevant proto failure reason
enum value. The reason why it is a new API rather than reusing an
existing one is because the parameter type is the same (int), so a
separate API will keep it clearer when the DownloadManager value vs. proto enum value is directly used.

Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 378626065
Test: atest NetworkSecurityUnitTests
Change-Id: I9028ba8f2cb95ccc6d21b19c58e0d15a9405c3f7

Bessie Jiang   commited 2025-01-09 15:49:17 +00:00
b6347cb862
[Thread] allow disabling SRP server wait for border routing
It's default enabled that it waits for border routing establishment
before starting the SRP server. But there are also use cases where
the user may want to know what are the devices in the Thread network
before actually reach to the devices, or it doesn't depend on border
routing to reach to a Thread device.

Given that, this commit adds the support of starting SRP server
without waiting for border routing by adding a new
Runtime Resource Overlay configuration parameter:
config_thread_srp_server_wait_for_border_routing_enabled

Test: it's difficult to assert on the SRP server starts up timing. But manually verified that the SRP server starts without waiting for the routing manager when the RRO config is flipped:

```
01-09 20:18:35.835  7555  7555 I ot-daemon: [I] RoutingManager: RsSender: Sent RS 1/3
01-09 20:18:35.835  7555  7555 I ot-daemon: [I] RoutingManager: Received RS from fe80:0:0:0:98af:44ff:fe2e:fa80 on infra netif 17
01-09 20:18:35.835  7555  7555 I ot-daemon: [I] RoutingManager: Will evaluate routing policy in 00:00.150 (150 msec)
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] NetDataPublshr: DNS/SRP service - State: Adding -> Added
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] SrpServer-----: Start listening on port 53536
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] NetworkData---: Sent ServerData
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] NetworkData---: Received ServerData
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] NetworkData---: Allocated Service ID = 1
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] NetworkData---: Sent ServerData ack
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] Notifier------: StateChanged (0x00000200) [NetData]
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] Mle-----------: Send Data Response (ff02:0:0:0:0:0:0:1)
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] BbrLeader-----: PBBR state: Unchanged
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] BbrLeader-----: Rloc16:0x8800, seqno:69, delay:5, timeout:3600
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] RoutingManager: Will evaluate routing policy in 00:03.558 (3558 msec)
01-09 20:18:35.926  7555  7555 I ot-daemon: [I] NetDataPublshr: DNS/SRP service (state:Added) in netdata - total:1, preferred:0, desired:2
```

Bug: 378587036
Change-Id: Ib768014f3c44dca89390cec823a1c2acac38ab0d

Kangping Dong   commited 2025-01-09 04:23:17 -08:00
fad62be2d2
Merge "Remove CertificateTransparencyInstaller" into main
Sandro Montanari   authored and   Gerrit Code Review   commited 2025-01-09 04:09:29 -08:00
d075120e4a
Remove CertificateTransparencyInstaller
The task of installing a new log list is now performed by the
CompatibilityVersion class.

Also, each CompatibilityVersion provides the URLs hosting the signature
and log list files. We do not store that information in the DataStore.

Change-Id: I36b585dc6984278de1ab3e6f3dc872e22f06ebea
Flag: com.android.net.ct.flags.certificate_transparency_service
Bug: 377276991
Test: atest NetworkSecurityUnitTests

Sandro Montanari   commited 2025-01-09 10:42:17 +00:00
a5b88db27d