Commit Graph

7 Commits

Author SHA1 Message Date
Yu Shan
ca2f39be70 Remove remoteaccess V1 impl.
We have migrated all the ref to V2.

Test: Presubmit
Bug: 295393732
Change-Id: I358d6380664dac13412b2706652de9726441adae
2023-09-22 19:26:27 -07:00
Yu Shan
06ddbc6d52 Define IRemoteAccess V2 reference impl.
Rename remote access HAL to V2 and implement V2 interface.

Test: Presubmit
Bug: 297271235
Change-Id: I4b21fce3c18f7697f62229107b210b7675749b68
2023-09-20 18:30:34 -07:00
Yu Shan
3a129d7a3b Implement a host side TestWakeupClientService.
Implement a host program that could be used to test the remote
access feature. The program will provides grpc service that the
remote access HAL running on device can talk to to get tasks. The
program will also use adb/aemu command to control the power of the
Android instance.

This CL also changes the GRPC service address for the default
remoteaccess HAL to 10.0.2.2 which points to the host's 127.0.0.1
from the emulator.

Test: m -j TestWakeupClientServerHost, run manually.
TestWakeupClientServerHost
>>> inject task [clientID] taskdata
verify emualtor boot up
verify emulator shutdown after task finish
>>> power on
verify emualtor boot up
>>> inject task [clientID] taskdata
verify emulator does not shutdown after task finish
>>> power off
>>> inject task [clientID] taskdata
verify emulator boot up
>>> set vehicleInUse
verify emulator does not shutdown after task finish
>>> power off
>>> genFakeTask start [clientID]
verify emulator starts up to execute remote tasks.
verify emulator shuts down after 300s.
verify emulator restarts after shutdown.
>>> genFakeTask stop
verify emulator shuts down after finishing last task.
Bug: 285205122

Change-Id: I22b660448d8b495cf3ced3378c1c1dc10051d87a
2023-08-28 17:45:08 -07:00
Yu Shan
2a096c4983 Change BindToDeviceSocketMutator to lib.
Test: Presubmit
Bug: 268750179
Change-Id: I7d338eef4f622631d0ead0af0a91e3b68bfa69eb
2023-03-06 12:56:04 -08:00
Yu Shan
39b19857d4 Specify a eth interface for grpc connection.
When enabling wifi on seahawk, the main network interface changes
so we need to explicitly specify the eth interface we want to
use for our grpc connection.

Note that using setsockopt requires NET_RAW permission which is
only granted to limited apps. As a result, selinux permissive
mode is required for this CL to work.

Test: Manual test on seahawk, verify grpc is connected okay.
Bug: 261108682
Change-Id: I95c9f796bf40226b612edf284188ffc6d095086f
2023-03-06 12:56:02 -08:00
Yu Shan
1532afd33c Define a new remoteaccess HAL for test.
Bug: 261108682
Test: Locally build and run

Change-Id: I40f97f4b10714096a32c5b14c8716b6c8e413419
2022-12-07 15:17:48 -08:00
Yu Shan
7a5283fda1 Add remote access HAL interface and ref impl.
Add remote access HAL interface and reference implementation. This
CL is a merge of multiple CLs commited in internal master.

Test: Presubmit
Bug: 241170646
Change-Id: I55ba98015055d779a362cac05a9f68650b5b92ab
Merged-In: I332221b303274463dfa5b46d78cf0d81f6045e4b
2022-10-26 17:16:05 -07:00