This reverts commit a5faa56a62.
Reason for revert: <Potential culprit for b/379818258 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>
Change-Id: Ib41a4bf760fd98e9fbc469a20af5bc3ed97e0cee
Some build targets of the cuttlefish project don't have the
ethernet interface. This CL checks whether the network interface
exists before setting it as Thread simulation local interface.
Bug: b/378777255
Test: acloudw create --branch git_main --build-id P85047583 --build-target cf_x86_64_auto-trunk_staging-userdebug
Change-Id: Ifb1e316f59fac7babf34a7c290d5234853de8653
We might run VTS when the thread_network service is not available. This
patch prevents shell commands from being executed if the service is
absent.
Bug: 374009923
Bug: 355317617
Test: atest VtsHalThreadNetworkTargetTest
Change-Id: I94dd7e2e7585e061f53291c47e46841e5e670b6c
Thread hal exit the process when receiving socket disconnection. This
patch is to change the behavior to handle this connection gracefully.
Bug: 368867685
Test: atest VtsHalThreadNetworkTargetTest
Test: manual
Change-Id: I04a9b00784c4c4beb4dad97d080532a3052be05a
Due to security concerns, ThreadNetwork HAL service's debug log should
not be visible on user builds.
The "debuggable" field defines the flags that will be applied to
userdebug/eng variant builds.
Bug: 359338609
Test: No debug log from android.hardware.threadnetwork-service in logcat
Change-Id: I13993191efd3841fc8db1888be7c59c86f6608d3
This commit adds a new apex override for the Thread HAL which uses a
simulation RCP. This will be used by goldfish emulators.
Note that this can't be defined in /device/generic/goldfish because of
below error:
```
[100% 1/1] analyzing Android.bp files and generating ninja file at out/soong/build.sdk_phone64_x86_64.ninja
FAILED: out/soong/build.sdk_phone64_x86_64.ninja
cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.sdk_phone64_x86_64.variables -o o
ut/soong/build.sdk_phone64_x86_64.ninja --globListDir sdk_phone64_x86_64 --globFile out/soong/globs-sdk_phone64_x86_64.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.sdk_phone64_x86_64.bui
ld Android.bp
Warning: Module 'androidx.wear_wear' depends on non-existing optional_uses_libs 'wear-sdk'
Warning: Module 'androidx.wear.compose_compose-foundation' depends on non-existing optional_uses_libs 'wear-sdk'
error: hardware/interfaces/threadnetwork/aidl/default/Android.bp:103:1: "com.android.hardware.threadnetwork" depends on undefined module "goldfish-threadnetwork-service.rc".
Module "com.android.hardware.threadnetwork" is defined in namespace "." which can read these 1 namespaces: ["."]
Module "goldfish-threadnetwork-service.rc" can be found in these namespaces: ["device/generic/goldfish"]
```
Bug: 356079409
Test: verified that "adb shell cmd thread_network join" works
Change-Id: I5356df53486fe9555ab34a0c8402e7be1b31309f
To implement hardware reset sent from radio spinel.
Bug: 347138417
Test: atest VtsHalThreadNetworkTargetTest
Test: manual hardware reset
Change-Id: I937d73b7964448becc5b49499683b3e65332fb0b
This commit simulates Thread radio over Ethernet on cuttlefish.
This enables two cuttlefish instances to communicate over Thread.
Test: presubmit
Bug: 329188649
Change-Id: I48b20a9eb0bbc535e67266ca9cf7e4bbc5a676d4
We need to make sure there is no duplicate binder call to HAL layer.
This patch fix this.
Test: atest VtsHalThreadNetworkTargetTest
Bug: 338556737
Change-Id: Ic414ec1099049ba5e7a0c17baffcd467aa910034
This commit enables support of dynamic radio URLs, so that the radio
URL can be runtime generated.
Bug: 329188649
Test: presubmit
Change-Id: I11a0d3de47609d59ba50c8b5317c8238f09e18dd
inotify event size is dynamic, we need to make sure read would not
return error when having inotify event.
Bug: 333829392
Test: manual check `Invalid argument` error won't happen
Change-Id: I3cac8d1519659c6b1b53c1d41013818adab876c7
The latest OpenThread has updated the usage of the platform log APIs.
This CL updates the log APIs usages and implementations.
Bug: b/333301206
Test: Run ThreadNetwork HAL and check logs.
Change-Id: I0c0999edbed1c041e2752d195e753d02b2c734f4
The function `hardwareReset()` throws
`EX_UNSUPPORTED_OPERATION` if the Thread radio chip doesn't
support the hardware reset. Current VTS test assumes that the
Thread radio chip must support the hardware reset.
This CL updates the VTS test to verify the return value
`EX_UNSUPPORTED_OPERATION`.
bug: b/320393041
Test: run vts -m VtsHalThreadNetworkTargetTest
Change-Id: I7b0b2a4e850a1eda085a6d6c24cdd8aae6498aac
The ot-daemon has been moved from the com.android.threadnetwork to
com.android.tethering. No need to add the com.android.threadnetwork
to the apex_available list.
Bug: b/312573093
Test: Build
Change-Id: I2216e0d2a1d30738c405a174909d174cbc1f0bc7
OpenThread has changed the functions of SpinelInterface, which
causes the build errors of the Thread HAL service. This commit
updates the thread_radio based on the latest definition of
SpinelInterface.
Bug: b/304914440
Test: Build and run Thread stack on cuttlefish.
Change-Id: Ie92aedc925c771748424bdbae0ae1d340b154bb2
com.android.hardware.threadnetwork is a new VAPEX containing
threadnetwork HAL. It also includes ot-rcp.
Bug: 296966113
Test: vts-tf > run vts -m VtsHalTheadNetworkTargetTest
Change-Id: Id2028d755f9b0dcc06ccd817bddf3195efb5595b
The variable `mDeathRecipient` will automatically free the allocated
memory when it is destructed. This CL deletes the code for manually
releasing the variable `mDeathRecipient` to avoid the same variable
being freed twice.
Bug: 296617022
Test: Run fuzzer test.
Change-Id: I733f7f8d26e48a9434d41c5098f39ad91208abeb
This CL changes the API from 'reset' to 'hardwareReset' to make the
the definition of the API clearer. This CL also optimizes the Thread
Network HAL default implementation.
Bug: 289867661
Test: Run Thread stack on cuttlefish.
Change-Id: Id742453d9d7a0d369ac8f16905efdacfcfba1dbc
The current fuzz testing comunicates with the Thread radio chip
simulation program `ot-rcp`. The 'ot-rcp' is not installed by all
devices, which causes the fuzz testing program is unable to find
the program '/vendor/bin/ot-rcp'.
This commit enables the HAL to talk to the '/dev/null' to avoid
'/vendor/bin/ot-rcp' not being found.
Bug: 289627270
Test: Run the fuzz test on cuttlefish
Change-Id: If410d7d75abe05c7c2d2c82fa0450e925b9a48bb
This commit enables the Thread Network HAL to support the Spinel
SPI interface.
Bug: 277286756
Test: Build and run otbr-agent on the emulator.
Change-Id: I6726eead5686f0afb33e5e2035ebc9021eca5afa