aboutsummaryrefslogtreecommitdiff
path: root/host
AgeCommit message (Collapse)Author
4 daysMerge "Implement V4L2 camera emulation in Cuttlefish." into mainSalvatore Ferro
4 daysMerge "Stop only the CVD instance that has a problem with critical process" ↵JaeMan Park
into main
4 daysUnset default sandbox2 timeout in process_sandboxerA. Cody Schuffelen
By default sandbox2 will time out a sandboxed process after 2 minutes of wall time or 1024 seconds of cpu time. Lift these requirements since Cuttlefish includes long-running service host processes. https://cs.android.com/android/platform/superproject/main/+/main:external/sandboxed-api/sandboxed_api/sandbox2/limits.h;l=116;drc=d451478e26c0352ecd6912461e867a1ae64b17f5 Bug: b/349193629 Test: `cvd start --enable_host_sandbox=true`, wait 2 minutes Change-Id: If7927fdfecddabbdd17c572acbbec2413a5ae915
4 daysMerge "Add vhal_proxy_server_cmd." into mainYu Shan
7 daysMerge "Do not return "." and ".." special entries in `DirectoryContents`." ↵emu-35-1-devTreehugger Robot
into main
7 daysAdd vhal_proxy_server_cmd.Yu Shan
This is a host-side CLI binary for sending debug commands to VHAL proxy running on the host. This is useful for debugging VHAL properties, e.g., getting/setting value. Flag: EXEMPT host-side component Test: local manual test. Verify hvac temp can be set. Bug: 328316981 Change-Id: I7bc04c413ec81cf8e5dfb3285e3ea5d8d245801e
7 daysDo not return "." and ".." special entries in `DirectoryContents`.Sergio Andres Rodriguez Orama
Follow up of comment: https://android-review.git.corp.google.com/c/device/google/cuttlefish/+/3141577/comment/28b6d202_89c55529/ Test: n/a Bug: n/a Change-Id: I4487300ff6aafa70b5acda4cdf933d97a2ab419d
7 daysMerge "Consolidate common policy parts into a "baseline" policy builder" ↵Treehugger Robot
into main
7 daysMerge "Add `cc_host_test process_sandboxer_test`" into mainTreehugger Robot
7 daysMerge "Restore openwrt instance when CF is restoring" into mainElie Kheirallah
8 daysMerge "Collect netsimd logs with `cvd host_bugreport`." into mainSergio Rodriguez
8 daysMerge "Include all the log files in host bugreport zip." into mainSergio Rodriguez
8 daysConsolidate common policy parts into a "baseline" policy builderA. Cody Schuffelen
Bug: b/347824283 Change-Id: Ifa5c8fe14b37052850449ed811a19e06b6d9756e Test: launch_cvd --resume=false --enable_host_sandbox Test: atest --host process_sandboxer_test
8 daysAdd `cc_host_test process_sandboxer_test`A. Cody Schuffelen
This is a lighterweight way to test features in `process_sandboxer` without involving the entire `cvd start` code path. While this test probably won't work on CI, it does run locally. Bug: b/347824283 Test: `atest --host process_sandboxer_test` Change-Id: I34555020c137e73b2256127423516e6e3b0c84cd
8 daysRestore openwrt instance when CF is restoringElie Kheirallah
Enable restoring openwrt instance. Send command to restart network service of the openwrt instance. On restore, it is currently broken and needs a restart. Delete SetToRestoreFromSnapshot, as it is no longer used. Bug: 340956897 Test: boot CF, snapshot, restore Change-Id: I5d6361ed3130a048401ce0b8b07e2c74bd9c1545
8 daysStop only the CVD instance that has a problem with critical processJaeMan Park
Current implementation of process_monitor calls stop_cvd when has a problem with a critical process. It would kill all other CVDs that does not have a problem. Only stop CVD that has a problem. Bug: 346373363 Test: Launching multiple instances and if one process has problem with crosvm, the only CVD instance that has problem is stopped, not all CVDs. Change-Id: I356161d61f742b8b05f7251ba86111a2a14205b0
8 daysCollect netsimd logs with `cvd host_bugreport`.Sergio Andres Rodriguez Orama
Bug: 341905936 Test: cvd host_bugreport Change-Id: I23bf96bc46d79b78adbe7e87483d8ba5dbcbd8d5
8 daysInclude all the log files in host bugreport zip.Sergio Andres Rodriguez Orama
Bug: 341905936 Test: cvd host_bugreport Change-Id: Ia97336b88135313705ab0e82d9b15a71f1ef65a4
10 daysImplement V4L2 camera emulation in Cuttlefish.sal
Test: Run guest via `cvd start -camera_server_port=7600` - Within Cuttlefish UI, click camera button in guest VM window - adb root && adb shell - within adb shell run cuttlefish_v4l2_streamer cmd - within another adb shell run v4l2 camera render application - Camera should be visible onscreen. Change-Id: I87be2c47964e267d479c49b6b085101b716f3179
10 daysAvoid running graphics detector N times for --num_instances=NJason Macnak
... by moving the running of graphics detector outside of the num instances loop. Bug: b/347971933 Test: cvd start --num_instances=N Change-Id: Ifad8a7f04a56f663124a989374b6f5c0e95ba374
11 daysMerge "Add a prototype setting to separate out the block device with ↵Treehugger Robot
vhost-user" into main
2024-06-14Add a prototype setting to separate out the block device with vhost-userA. Cody Schuffelen
Only currently works for the sdcard device in crosvm Heavily based on the crosvm vhost-user gpu code in crosvm_manager.cpp by natsu@. On fully enabling it with crosvm, u-boot no longer seems able to inspect the partition table and the partition entries are gone. ``` Driver uid uclass Devices ---------------------------------------------------------- blk_partition 083 partition <none> ``` versus a successful run: ``` Driver uid uclass Devices ---------------------------------------------------------- blk_partition 083 partition virtio-blk#22:1 virtio-blk#22:2 ... ``` On fully enabling with QEMU there's some conflict with using it on any devices. ``` 2024-06-12T22:35:11.479077Z qemu-system-x86_64: Failed to read msg header. Read -1 instead of 12. Original request 1. 2024-06-12T22:35:11.479123Z qemu-system-x86_64: Failed to write msg. Wrote -1 instead of 20. 2024-06-12T22:35:11.479136Z qemu-system-x86_64: vhost VQ 0 ring restore failed: -22: Invalid argument (22) 2024-06-12T22:35:11.479151Z qemu-system-x86_64: Failed to set msg fds. 2024-06-12T22:35:11.479162Z qemu-system-x86_64: vhost_set_vring_call failed 22 2024-06-12T22:35:11.479195Z qemu-system-x86_64: Failed to set msg fds. 2024-06-12T22:35:11.479208Z qemu-system-x86_64: vhost_set_vring_call failed 22 2024-06-12T22:35:11.479305Z qemu-system-x86_64: vhost-user-blk: vhost start failed: Error starting vhost: Protocol error [2024-06-12T22:35:11.479867813+00:00 ERROR crosvm::crosvm::sys::linux] error while running device block-0: invalid message [2024-06-12T22:35:11.482253282+00:00 INFO crosvm::crosvm::sys::linux] process for device block-0 (PID 42777) exited with code 1 [2024-06-12T22:35:11.482381564+00:00 INFO crosvm::crosvm::sys::linux] all device processes have exited [2024-06-12T22:35:11.482432972+00:00 INFO crosvm] exiting with success ``` The only working mode I see now is enabling it for the sdcard disk, which has minimal interaction with the bootloader. ``` $ cvd start --resume=false --vhost_user_block --daemon $ adb shell $ su $ mkdir /data/local/mnt $ mount /dev/vdc1 /data/local/mnt $ echo "b" > /data/local/mnt/b $ cat /data/local/mnt/b ``` Bug: b/346855591 Change-Id: I2d4b83d515d091bae5e8bae1bf50976de8798778 Test: cvd start --resume=false --vhost_user_block
2024-06-14Merge "move snapshot adb commands into a script" into mainTreehugger Robot
2024-06-13move snapshot adb commands into a scriptFrederick Mayle
This makes the cuttlefish host code a bit nicer and also reduces the coupling between the host and guest, e.g. we'll eventually want to change this sequence of commands and then we'll have issues if there is any version skew between the cuttlefish host and guest. Test: (stop_cvd; launch_cvd --noresume --enable-sandbox=false --daemon -cpus=4 --memory_mb=8192 && snapshot_util_cvd --subcmd=snapshot_take --auto_suspend --force --snapshot_path=$HOME/cf-snapshot) && stop_cvd && launch_cvd --snapshot_path=$HOME/cf-snapshot Change-Id: If64df163b65ee17e711b6ae77e567e5f43d8655b
2024-06-12libc++fs is part of libc++ now.Elliott Hughes
Change-Id: Id1cb04e69f2dc19bed979535f53363bbb0ed3255
2024-06-11Use a multiport console in qemu_manager.cppA. Cody Schuffelen
Change-Id: I431bf89f455d99d4457d9a33f30663c7ac2c7be8 Test: Run with u-boot change for multiport aosp/3102524
2024-06-11Merge changes If1e187b3,Ide69fd6b,Ifda07c10 into mainJason Macnak
* changes: Move graphics property_contexts into shared/graphics Add new sysprop for display framebuffer format Add property to cuttlefish config about BGRA framebuffers
2024-06-11Merge "snapshot_util_cvd supports --helpxml" into mainTreehugger Robot
2024-06-11Add new sysprop for display framebuffer formatJason Macnak
... so that the host tools can coordinate with our guest hwcomposer implementation. This is currently a no-op as the guest hwcomposer is still being updated to handle other formats. Bug: b/341647448 Test: cvd start --gpu_mode=guest_swiftshader Change-Id: Ide69fd6be1d836cd0c07ce8283238d64383e465b
2024-06-11Add property to cuttlefish config about BGRA framebuffersJason Macnak
... as we will want a way to save and communicate this information to the webrtc server from the launcher. Bug: b/341647448 Test: cvd start --gpu_mode=guest_swiftshader Change-Id: Ifda07c1097f7003d818ba28d60df27feda4463ad
2024-06-11Merge changes from topic ↵Yu Shan
"revert-3114063-revert-3095794-MVLHUSILRP-JQRYZNREPB" into main * changes: Revert^2 "Add vhal_proxy_server component." Revert^2 "Create new CF VHAL binary." Revert^2 "Add a VHAL host-side proxy server."
2024-06-10snapshot_util_cvd supports --helpxmlJorge E. Moreira
Bug: 346422499 Test: snapshot_util_cvd --helpxml Change-Id: Iaeba3c19bde41753b335e05699c0bea6e1fa7487
2024-06-07Merge "Mitigations for "adb not ready yet" suspend issues" into mainTreehugger Robot
2024-06-07Mitigations for "adb not ready yet" suspend issuesA. Cody Schuffelen
Suspending a device includes issuing some device commands to suspend servies where the host side is not snapshot-aware. These commands are issued through running `adb shell`. If the `adb` background server is not yet running, that gets started by the first device. This raises two issues: 1. After the adb server comes up, there may be a delay before `adb_connection_maintainer` informs `adb` background server that the device exists. If the server doesn't know, there might be an error like `adb: device '0.0.0.0:6520' not found` 2. The `adb` background server runs in the working directory of the first `adb` invocation. Because `run_cvd` has its working directory in the host runtime directory of the device, this looks like a still-running device process when trying to clear the runtime directory to create a new device instance: ``` Instance directory files in use. Try `cvd reset`? Observed PIDs: 3396063 ``` (1) is fixed by using `adb wait-for-device` and (2) is fixed by running `adb` commands with a working directory of `/`. Design for solutions by by fmayle@ and khei@. Repro: ``` $ adb kill-server $ cvd start --snapshot_compatible --daemon --enable_virtiofs=false --gpu_mode=guest_swiftshader $ cvd suspend $ cvd snapshot_take --snapshot_path=$HOME/cf-snapshot $ cvd resume $ cvd stop $ cvd start ``` Bug: 345542598 Test: Repro instructions Change-Id: If46c93ef2a5bebac3efa6fe510f9a34bbbbc8eaa
2024-06-07Merge "Rebuild `vbmeta.img` when `super.img` rebuilding" into mainTreehugger Robot
2024-06-07Rebuild `vbmeta.img` when `super.img` rebuildingChad Reynolds
Bug: 322887496 Test: see the bug comment 37 for steps to test this stack of changes Change-Id: Ie1061cd2a21d74b349a4c88efb041f9a1684c811
2024-06-05Revert^2 "Add vhal_proxy_server component."Yu Shan
606a9272d07d1e6dc52a2b9e03b905a010e74b32 Test: Local run Bug: 328316981 Change-Id: Ic79873754673235f8a30da7e409c4e71787b2e10
2024-06-05Revert^2 "Create new CF VHAL binary."Yu Shan
5fe42576957bd9321e0a67731945a5b43d34dc22 Reland the previous commit which was reverted due to breaking cf_wear builds. Compared to the previous commit, this CL removes the dependency on device/google/trout. Test: Local run Bug: 328316981 Change-Id: I22b0b58948384897120bcc2863b74254a550e027
2024-06-05Revert^2 "Add a VHAL host-side proxy server."Yu Shan
9f53f3bcac60035533b302a9996f5ae1dbf80a14 Reland the previous commit which was reverted due to breaking cf_wear builds. Compared to the previous commit, this CL removes the dependency on device/google/trout. Test: Local run Bug: 328316981 Change-Id: I5f79d3ae5d8069f93325d4f18b472dcc82958c4d
2024-06-05Merge "Use the global default cpp_std." into mainElliott Hughes
2024-06-05Merge "libc++fs is part of libc++ now." into mainElliott Hughes
2024-06-05Merge "Restore `-bios` qemu behavior for arm devices" into mainTreehugger Robot
2024-06-05Use the global default cpp_std.Elliott Hughes
Bug: http://b/344590580 Change-Id: I8a35855928d40dbeb5c694e5edd002e767bd064e
2024-06-05libc++fs is part of libc++ now.Elliott Hughes
Change-Id: I1727707ee7b68197a6b3442eaad5582b865f6dd7
2024-06-04Restore `-bios` qemu behavior for arm devicesA. Cody Schuffelen
This was giving the error: ``` 2024-06-04T22:51:57.987955Z qemu-system-aarch64: device requires 67108864 bytes, block backend provides 531456 bytes Detected unexpected exit of monitored subprocess /usr/bin/qemu-system-aarch64 ``` Test: Run aosp_cf_arm64_only-trunk_staging-userdebug phone on x86_64 machine Bug: 344691679 Change-Id: Ia3697a421234067fe087871dda6bd834a707b94d
2024-06-04Merge changes from topic "revert-3095794-MVLHUSILRP" into mainTreehugger Robot
* changes: Revert "Add a VHAL host-side proxy server." Revert "Create new CF VHAL binary." Revert "Add vhal_proxy_server component."
2024-06-04Revert "Add a VHAL host-side proxy server."Yu Shan
Revert submission 3095794 Reason for revert: b/344460489 Reverted changes: /q/submissionid:3095794 Change-Id: I8f4ff01f453cd9322171402929a26afb60c00af9
2024-06-04Revert "Add vhal_proxy_server component."Yu Shan
Revert submission 3095794 Reason for revert: b/344460489 Reverted changes: /q/submissionid:3095794 Change-Id: I22e7c4aa073cc87b35e22935367d3b8f59b18c57
2024-06-04Merge "Add a pflash device to crosvm and qemu." into mainTreehugger Robot
2024-06-04Merge "Extend misc_info.txt merging logic" into mainTreehugger Robot