aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-16 16:36:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-16 16:36:25 +0000
commit251b77c9fb1f5b19f717468265d0c0d9c121799f (patch)
treecc721bb781a09f5fc2502b7256c819b711f49a9a
parent037e277abab04530e964859152e1302b74a43562 (diff)
parentcef97d80d7d39cc1892c8f45574747a0737f733b (diff)
downloadcuttlefish-emu-35-1-release.tar.gz
Snap for 11848231 from cef97d80d7d39cc1892c8f45574747a0737f733b to emu-35-1-releaseemu-35-1-release
Change-Id: I08d47d1020c068c5e457525f4c38b6452647d5b1
-rw-r--r--Android.bp2
-rw-r--r--common/libs/confui/packet.h2
-rw-r--r--common/libs/fs/shared_fd.cpp4
-rw-r--r--common/libs/fs/shared_fd.h4
-rw-r--r--common/libs/net/netlink_request.h2
-rw-r--r--common/libs/security/confui_sign.cpp2
-rw-r--r--common/libs/utils/files.cpp21
-rw-r--r--common/libs/utils/flag_parser.cpp2
-rw-r--r--common/libs/utils/subprocess.cpp6
-rw-r--r--common/libs/utils/tcp_socket.cpp2
-rw-r--r--common/libs/utils/users.cpp4
-rw-r--r--guest/hals/identity/libeic/EicOps.h4
-rw-r--r--guest/hals/identity/libeic/EicOpsImpl.cc4
-rw-r--r--guest/hals/identity/libeic/EicPresentation.c8
-rw-r--r--guest/hals/identity/libeic/EicProvisioning.c2
-rw-r--r--guest/hals/ril/reference-libril/RilSapSocket.h2
-rw-r--r--guest/hals/ril/reference-libril/ril.cpp4
-rw-r--r--guest/hals/ril/reference-libril/ril.h54
-rw-r--r--guest/hals/ril/reference-libril/ril_service.cpp8
-rw-r--r--guest/hals/ril/reference-ril/reference-ril.c4
-rw-r--r--host/commands/assemble_cvd/disk/kernel_ramdisk_repacker.cpp2
-rw-r--r--host/commands/assemble_cvd/flags.cc11
-rw-r--r--host/commands/assemble_cvd/flags_defaults.h5
-rw-r--r--host/commands/cvd_send_sms/pdu_format_builder.cc12
-rw-r--r--host/commands/cvd_update_security_algorithm/main.cc2
-rw-r--r--host/commands/kernel_log_monitor/kernel_log_server.cc2
-rw-r--r--host/commands/metrics/proto/cf_log.proto4
-rw-r--r--host/commands/modem_simulator/channel_monitor.h2
-rw-r--r--host/commands/modem_simulator/main.cpp2
-rw-r--r--host/commands/modem_simulator/network_service.cpp6
-rw-r--r--host/commands/modem_simulator/network_service.h2
-rw-r--r--host/commands/modem_simulator/pdu_parser.h2
-rw-r--r--host/commands/modem_simulator/unittest/service_test.cpp2
-rw-r--r--host/commands/run_cvd/boot_state_machine.cc4
-rw-r--r--host/commands/run_cvd/launch/kernel_log_monitor.cpp2
-rw-r--r--host/commands/run_cvd/launch/open_wrt.cpp11
-rw-r--r--host/commands/run_cvd/server_loop_impl_snapshot.cpp6
-rw-r--r--host/commands/secure_env/primary_key_builder.cpp2
-rw-r--r--host/commands/secure_env/proxy_keymaster_context.h2
-rw-r--r--host/commands/secure_env/rust/kmr_ta.h2
-rw-r--r--host/commands/secure_env/rust/sdd.rs2
-rw-r--r--host/commands/secure_env/rust/tpm.rs2
-rw-r--r--host/commands/snapshot_util_cvd/main.cc4
-rw-r--r--host/commands/start/main.cc6
-rw-r--r--host/commands/tcp_connector/main.cpp2
-rw-r--r--host/cvd_test_configs/local_tests/README.md2
-rw-r--r--host/frontend/webrtc/audio_handler.cpp4
-rw-r--r--host/frontend/webrtc/connection_observer.cpp68
-rw-r--r--host/frontend/webrtc/html_client/js/app.js2
-rw-r--r--host/frontend/webrtc/libcommon/connection_controller.cpp20
-rw-r--r--host/frontend/webrtc/libcommon/connection_controller.h2
-rw-r--r--host/frontend/webrtc/libdevice/connection_observer.h31
-rw-r--r--host/frontend/webrtc/libdevice/data_channels.cpp170
-rw-r--r--host/frontend/webrtc_operator/Readme.md2
-rw-r--r--host/frontend/webrtc_operator/assets/js/server_connector.js2
-rw-r--r--host/frontend/webrtc_operator/client_handler.cpp2
-rw-r--r--host/libs/command_util/snapshot_utils.cc2
-rw-r--r--host/libs/config/config_utils.h2
-rw-r--r--host/libs/confui/host_renderer.cc4
-rw-r--r--host/libs/confui/layouts/fonts.h2
-rw-r--r--host/libs/screen_connector/screen_connector_queue.h2
-rw-r--r--host/libs/vm_manager/crosvm_builder.cpp16
-rw-r--r--host/libs/vm_manager/crosvm_manager.cpp18
-rw-r--r--host/libs/vm_manager/gem5_manager.cpp4
-rw-r--r--host/libs/vm_manager/qemu_manager.cpp2
-rw-r--r--shared/BoardConfig.mk2
-rw-r--r--shared/auto/audio_policy_configuration.xml2
-rw-r--r--shared/config/init.vendor.rc2
-rw-r--r--shared/config/input/Crosvm_Virtio_Rotary_0.idc2
-rw-r--r--shared/device.mk14
-rw-r--r--shared/graphics/sepolicy/hal_graphics_composer_default.te2
-rw-r--r--shared/minidroid/init.rc2
-rw-r--r--shared/pc/OWNERS6
-rw-r--r--shared/sepolicy/system_ext/private/system_app.te1
-rw-r--r--shared/sepolicy/vendor/bug_map2
-rw-r--r--shared/sepolicy/vendor/metrics_helper.te2
-rw-r--r--system_image/Android.bp704
-rw-r--r--tests/powerwash/src/com/android/cuttlefish/tests/PowerwashTest.java4
-rw-r--r--tests/snapshot/src/com/android/cuttlefish/tests/SnapshotTest.java2
-rw-r--r--tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java2
-rw-r--r--tools/codespell-ignore.txt11
-rwxr-xr-xtools/codespell.sh6
-rwxr-xr-xtools/copyright_bot/copyright_fixer.sh2
-rwxr-xr-xtools/create_base_image_gce.sh2
-rwxr-xr-xtools/tombstone_to_line.py4
85 files changed, 642 insertions, 729 deletions
diff --git a/Android.bp b/Android.bp
index d99b8c14d..5ff75aa63 100644
--- a/Android.bp
+++ b/Android.bp
@@ -151,7 +151,7 @@ cc_defaults {
// Defaults for cuttlefish modules that are available only in the host-side OS. Here "host" includes
// both (1) non-Android OS like gLinux or Ubuntu, and (2) Android OS that is capable of running
-// guest VM(s) in it. Note that, in the context of the Android build systm - Soong - (1) is called
+// guest VM(s) in it. Note that, in the context of the Android build system - Soong - (1) is called
// as "host" and (2) is called as "target". But here, the term "host" is in the context of VMs. If a
// module is for the host-side VM (either Android or non-Android), "cuttlefish_host" shall be used.
cc_defaults {
diff --git a/common/libs/confui/packet.h b/common/libs/confui/packet.h
index e109a6183..04d5dfa44 100644
--- a/common/libs/confui/packet.h
+++ b/common/libs/confui/packet.h
@@ -41,7 +41,7 @@
* 2. type_: the type of command/response. E.g. start, stop, ack, abort, etc
* 3. additional_info_: all the other additional information
*
- * The binary represenation of each packet is as follows:
+ * The binary representation of each packet is as follows:
* n:L[1]:L[2]:...:L[n]:data[1]data[2]data[3]...data[n]
*
* The additional_info_ is in general a variable number of items, each
diff --git a/common/libs/fs/shared_fd.cpp b/common/libs/fs/shared_fd.cpp
index c1d671ec7..2442787b2 100644
--- a/common/libs/fs/shared_fd.cpp
+++ b/common/libs/fs/shared_fd.cpp
@@ -397,7 +397,11 @@ SharedFD SharedFD::Dup(int unmanaged_fd) {
bool SharedFD::Pipe(SharedFD* fd0, SharedFD* fd1) {
int fds[2];
+#ifdef __linux__
+ int rval = pipe2(fds, O_CLOEXEC);
+#else
int rval = pipe(fds);
+#endif
if (rval != -1) {
(*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno));
(*fd1) = std::shared_ptr<FileInstance>(new FileInstance(fds[1], errno));
diff --git a/common/libs/fs/shared_fd.h b/common/libs/fs/shared_fd.h
index 356b0d212..b38462f1a 100644
--- a/common/libs/fs/shared_fd.h
+++ b/common/libs/fs/shared_fd.h
@@ -86,7 +86,7 @@ struct VsockCid;
* Counted reference to a FileInstance.
*
* This is also the place where most new FileInstances are created. The creation
- * mehtods correspond to the underlying POSIX calls.
+ * methods correspond to the underlying POSIX calls.
*
* SharedFDs can be compared and stored in STL containers. The semantics are
* slightly different from POSIX file descriptors:
@@ -97,7 +97,7 @@ struct VsockCid;
* SharedFD a, b;
* assert (a != b);
* a = b;
- * asssert(a == b);
+ * assert(a == b);
*
* o The identity of the FileInstance is not affected by closing the file:
* SharedFD a, b;
diff --git a/common/libs/net/netlink_request.h b/common/libs/net/netlink_request.h
index 9f0f9c082..77782d946 100644
--- a/common/libs/net/netlink_request.h
+++ b/common/libs/net/netlink_request.h
@@ -65,7 +65,7 @@ class NetlinkRequest {
void AddMacAddress(const std::array<unsigned char, 6>& address);
// Creates new list.
- // List mimmic recursive structures in a flat, continuous representation.
+ // List mimic recursive structures in a flat, continuous representation.
// Each call to PushList() should have a corresponding call to PopList
// indicating end of sub-attribute list.
void PushList(uint16_t type);
diff --git a/common/libs/security/confui_sign.cpp b/common/libs/security/confui_sign.cpp
index bae6b11f0..4c5cd6ed2 100644
--- a/common/libs/security/confui_sign.cpp
+++ b/common/libs/security/confui_sign.cpp
@@ -32,7 +32,7 @@ bool ConfUiSignerImpl::Send(SharedFD output,
sign_status_ |= kIoError; \
return false
- // this looks redudant but makes sure that the byte-length of
+ // this looks redundant but makes sure that the byte-length of
// the error is guaranteed to be the same when it is received
confui::SignRawMessage msg;
msg.error_ = error;
diff --git a/common/libs/utils/files.cpp b/common/libs/utils/files.cpp
index cf10e8a0a..23b36dd09 100644
--- a/common/libs/utils/files.cpp
+++ b/common/libs/utils/files.cpp
@@ -698,20 +698,17 @@ Result<void> WaitForUnixSocketListeningWithoutConnect(const std::string& path,
return CF_ERR("Failed to run `lsof`, stderr: " << lsof_err);
}
- LOG(DEBUG) << "lsof stdout:" << lsof_out;
+ LOG(DEBUG) << "lsof stdout:|" << lsof_out << "|";
+ LOG(DEBUG) << "lsof stderr:|" << lsof_err << "|";
std::smatch socket_state_match;
- if (!std::regex_search(lsof_out, socket_state_match, socket_state_regex)) {
- return CF_ERR("Failed to find state in `lsof` stdout: " << lsof_out);
- }
- if (socket_state_match.size() != 2) {
- return CF_ERR(
- "Unexpected number of matches in `lsof` stdout: " << lsof_out);
- }
-
- const std::string& socket_state = socket_state_match[1];
- if (socket_state == "LISTEN") {
- return {};
+ if (std::regex_search(lsof_out, socket_state_match, socket_state_regex)) {
+ if (socket_state_match.size() == 2) {
+ const std::string& socket_state = socket_state_match[1];
+ if (socket_state == "LISTEN") {
+ return {};
+ }
+ }
}
sched_yield();
diff --git a/common/libs/utils/flag_parser.cpp b/common/libs/utils/flag_parser.cpp
index 7ad1e558e..b02500026 100644
--- a/common/libs/utils/flag_parser.cpp
+++ b/common/libs/utils/flag_parser.cpp
@@ -72,7 +72,7 @@ void Flag::ValidateAlias(const FlagAlias& alias) {
CHECK(StartsWith(alias.name, "-")) << "Flags should start with \"-\"";
if (alias.mode == FlagAliasMode::kFlagPrefix) {
- CHECK(EndsWith(alias.name, "=")) << "Prefix flags shold end with \"=\"";
+ CHECK(EndsWith(alias.name, "=")) << "Prefix flags should end with \"=\"";
}
CHECK(!HasAlias(alias)) << "Duplicate flag alias: " << alias.name;
diff --git a/common/libs/utils/subprocess.cpp b/common/libs/utils/subprocess.cpp
index 2ef5957d3..c8ae8f91f 100644
--- a/common/libs/utils/subprocess.cpp
+++ b/common/libs/utils/subprocess.cpp
@@ -298,10 +298,10 @@ SubprocessStopper KillSubprocessFallback(std::function<StopperResult()> nice) {
}
SubprocessStopper KillSubprocessFallback(SubprocessStopper nice_stopper) {
- return [nice_stopper](Subprocess* proccess) {
- auto nice_result = nice_stopper(proccess);
+ return [nice_stopper](Subprocess* process) {
+ auto nice_result = nice_stopper(process);
if (nice_result == StopperResult::kStopFailure) {
- auto harsh_result = KillSubprocess(proccess);
+ auto harsh_result = KillSubprocess(process);
return harsh_result == StopperResult::kStopSuccess
? StopperResult::kStopCrash
: harsh_result;
diff --git a/common/libs/utils/tcp_socket.cpp b/common/libs/utils/tcp_socket.cpp
index 4e68d11e1..cb58aac1c 100644
--- a/common/libs/utils/tcp_socket.cpp
+++ b/common/libs/utils/tcp_socket.cpp
@@ -104,7 +104,7 @@ ServerSocket::ServerSocket(int port)
ClientSocket ServerSocket::Accept() {
SharedFD client = SharedFD::Accept(*fd_);
if (!client->IsOpen()) {
- LOG(FATAL) << "Error attemping to accept: " << strerror(errno);
+ LOG(FATAL) << "Error attempting to accept: " << strerror(errno);
}
return ClientSocket{client};
}
diff --git a/common/libs/utils/users.cpp b/common/libs/utils/users.cpp
index c6c82aa59..fb69bfc3b 100644
--- a/common/libs/utils/users.cpp
+++ b/common/libs/utils/users.cpp
@@ -40,14 +40,14 @@ namespace {
std::vector<gid_t> GetSuplementaryGroups() {
int num_groups = getgroups(0, nullptr);
if (num_groups < 0) {
- LOG(ERROR) << "Unable to get number of suplementary groups: "
+ LOG(ERROR) << "Unable to get number of supplementary groups: "
<< std::strerror(errno);
return {};
}
std::vector<gid_t> groups(num_groups + 1);
int retval = getgroups(groups.size(), groups.data());
if (retval < 0) {
- LOG(ERROR) << "Error obtaining list of suplementary groups (list size: "
+ LOG(ERROR) << "Error obtaining list of supplementary groups (list size: "
<< groups.size() << "): " << std::strerror(errno);
return {};
}
diff --git a/guest/hals/identity/libeic/EicOps.h b/guest/hals/identity/libeic/EicOps.h
index 849d6fc28..d00fe271f 100644
--- a/guest/hals/identity/libeic/EicOps.h
+++ b/guest/hals/identity/libeic/EicOps.h
@@ -205,7 +205,7 @@ bool eicOpsCreateCredentialKey(uint8_t privateKey[EIC_P256_PRIV_KEY_SIZE],
const uint8_t* applicationId,
size_t applicationIdSize, bool testCredential,
uint8_t* cert,
- size_t* certSize); // inout
+ size_t* certSize); // in out
// Generate an X.509 certificate for the key identified by |publicKey| which
// must be of the form returned by eicOpsCreateEcKey().
@@ -222,7 +222,7 @@ bool eicOpsSignEcKey(const uint8_t publicKey[EIC_P256_PUB_KEY_SIZE],
const char* subjectName, time_t validityNotBefore,
time_t validityNotAfter, const uint8_t* proofOfBinding,
size_t proofOfBindingSize, uint8_t* cert,
- size_t* certSize); // inout
+ size_t* certSize); // in out
// Uses |privateKey| to create an ECDSA signature of some data (the SHA-256 must
// be given by |digestOfData|). Returns the signature in |signature|.
diff --git a/guest/hals/identity/libeic/EicOpsImpl.cc b/guest/hals/identity/libeic/EicOpsImpl.cc
index 1bd54ce6b..a0ffd553c 100644
--- a/guest/hals/identity/libeic/EicOpsImpl.cc
+++ b/guest/hals/identity/libeic/EicOpsImpl.cc
@@ -306,7 +306,7 @@ bool eicOpsSignEcKey(const uint8_t publicKey[EIC_P256_PUB_KEY_SIZE],
const char* subjectName, time_t validityNotBefore,
time_t validityNotAfter, const uint8_t* proofOfBinding,
size_t proofOfBindingSize, uint8_t* cert,
- size_t* certSize) { // inout
+ size_t* certSize) { // in out
vector<uint8_t> signingKeyVec(EIC_P256_PRIV_KEY_SIZE);
memcpy(signingKeyVec.data(), signingKey, EIC_P256_PRIV_KEY_SIZE);
@@ -457,7 +457,7 @@ bool eicOpsEcDsaVerifyWithPublicKey(const uint8_t* digest, size_t digestSize,
vector<uint8_t> derSignature;
if (!android::hardware::identity::support::ecdsaSignatureCoseToDer(
signatureVec, derSignature)) {
- LOG(ERROR) << "Error convering signature to DER format";
+ LOG(ERROR) << "Error converting signature to DER format";
return false;
}
diff --git a/guest/hals/identity/libeic/EicPresentation.c b/guest/hals/identity/libeic/EicPresentation.c
index 520c2c2af..dfd859078 100644
--- a/guest/hals/identity/libeic/EicPresentation.c
+++ b/guest/hals/identity/libeic/EicPresentation.c
@@ -241,7 +241,7 @@ bool eicPresentationValidateRequestMessage(
eicCborAppendStringZ(&cbor, "Signature1");
// The COSE Encoded protected headers is just a single field with
- // COSE_LABEL_ALG (1) -> coseSignAlg (e.g. -7). For simplicitly we just
+ // COSE_LABEL_ALG (1) -> coseSignAlg (e.g. -7). For simplicity we just
// hard-code the CBOR encoding:
static const uint8_t coseEncodedProtectedHeaders[] = {0xa1, 0x01, 0x26};
eicCborAppendByteString(&cbor, coseEncodedProtectedHeaders,
@@ -567,7 +567,7 @@ bool eicPresentationCalcMacKey(
eicCborAppendStringZ(&ctx->cbor, "MAC0");
// The COSE Encoded protected headers is just a single field with
- // COSE_LABEL_ALG (1) -> COSE_ALG_HMAC_256_256 (5). For simplicitly we just
+ // COSE_LABEL_ALG (1) -> COSE_ALG_HMAC_256_256 (5). For simplicity we just
// hard-code the CBOR encoding:
static const uint8_t coseEncodedProtectedHeaders[] = {0xa1, 0x01, 0x05};
eicCborAppendByteString(&ctx->cbor, coseEncodedProtectedHeaders,
@@ -820,7 +820,7 @@ bool eicPresentationDeleteCredential(
eicCborAppendStringZ(&cbor, "Signature1");
// The COSE Encoded protected headers is just a single field with
- // COSE_LABEL_ALG (1) -> COSE_ALG_ECSDA_256 (-7). For simplicitly we just
+ // COSE_LABEL_ALG (1) -> COSE_ALG_ECSDA_256 (-7). For simplicity we just
// hard-code the CBOR encoding:
static const uint8_t coseEncodedProtectedHeaders[] = {0xa1, 0x01, 0x26};
eicCborAppendByteString(&cbor, coseEncodedProtectedHeaders,
@@ -880,7 +880,7 @@ bool eicPresentationProveOwnership(
eicCborAppendStringZ(&cbor, "Signature1");
// The COSE Encoded protected headers is just a single field with
- // COSE_LABEL_ALG (1) -> COSE_ALG_ECSDA_256 (-7). For simplicitly we just
+ // COSE_LABEL_ALG (1) -> COSE_ALG_ECSDA_256 (-7). For simplicity we just
// hard-code the CBOR encoding:
static const uint8_t coseEncodedProtectedHeaders[] = {0xa1, 0x01, 0x26};
eicCborAppendByteString(&cbor, coseEncodedProtectedHeaders,
diff --git a/guest/hals/identity/libeic/EicProvisioning.c b/guest/hals/identity/libeic/EicProvisioning.c
index 1f691cd7e..5e69633ed 100644
--- a/guest/hals/identity/libeic/EicProvisioning.c
+++ b/guest/hals/identity/libeic/EicProvisioning.c
@@ -164,7 +164,7 @@ bool eicProvisioningStartPersonalization(
eicCborAppendStringZ(&ctx->cbor, "Signature1");
// The COSE Encoded protected headers is just a single field with
- // COSE_LABEL_ALG (1) -> COSE_ALG_ECSDA_256 (-7). For simplicitly we just
+ // COSE_LABEL_ALG (1) -> COSE_ALG_ECSDA_256 (-7). For simplicity we just
// hard-code the CBOR encoding:
static const uint8_t coseEncodedProtectedHeaders[] = {0xa1, 0x01, 0x26};
eicCborAppendByteString(&ctx->cbor, coseEncodedProtectedHeaders,
diff --git a/guest/hals/ril/reference-libril/RilSapSocket.h b/guest/hals/ril/reference-libril/RilSapSocket.h
index 1a816c587..9574052ed 100644
--- a/guest/hals/ril/reference-libril/RilSapSocket.h
+++ b/guest/hals/ril/reference-libril/RilSapSocket.h
@@ -37,7 +37,7 @@
class RilSapSocket : public RilSocket {
/**
* Place holder for the radio functions returned by the initialization
- * function. Currenty only onRequest handler is being used.
+ * function. Currently only onRequest handler is being used.
*/
const RIL_RadioFunctions* uimFuncs;
diff --git a/guest/hals/ril/reference-libril/ril.cpp b/guest/hals/ril/reference-libril/ril.cpp
index f397bbb31..a40ec5062 100644
--- a/guest/hals/ril/reference-libril/ril.cpp
+++ b/guest/hals/ril/reference-libril/ril.cpp
@@ -796,7 +796,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
pURI = &(s_configUnsolResponses[unsolResponseIndex]);
}
- // Grab a wake lock if needed for this reponse,
+ // Grab a wake lock if needed for this response,
// as we exit we'll either release it immediately
// or set a timer to release it later.
switch (s_unsolResponses[unsolResponseIndex].wakeType) {
@@ -807,7 +807,7 @@ void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
case DONT_WAKE:
default:
- // No wake lock is grabed so don't set timeout
+ // No wake lock is grabbed so don't set timeout
shouldScheduleTimeout = false;
break;
}
diff --git a/guest/hals/ril/reference-libril/ril.h b/guest/hals/ril/reference-libril/ril.h
index 6f33ae754..905c8d3f0 100644
--- a/guest/hals/ril/reference-libril/ril.h
+++ b/guest/hals/ril/reference-libril/ril.h
@@ -225,8 +225,8 @@ typedef enum {
RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
- RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
- RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
+ RIL_E_NOT_PROVISIONED = 61, /* Device does not have this value provisioned */
+ RIL_E_NO_SUBSCRIPTION = 62, /* Device does not have subscription */
RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
is currently in use */
@@ -271,7 +271,7 @@ typedef enum {
} RIL_CallState;
typedef enum {
- RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
+ RADIO_STATE_OFF = 0, /* Radio explicitly powered off (eg CFUN=0) */
RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
RADIO_STATE_ON = 10 /* Radio is on */
} RIL_RadioState;
@@ -432,7 +432,7 @@ typedef enum {
RIL_UUS_DCS_USP = 0, /* User specified protocol */
RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
RIL_UUS_DCS_X244 = 2, /* X.244 */
- RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
+ RIL_UUS_DCS_RMCF = 3, /* Reserved for system management
convergence function */
RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
} RIL_UUS_DCS;
@@ -491,7 +491,7 @@ typedef struct {
int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
back-off timer value RIL wants to override the one
pre-configured in FW.
- The unit is miliseconds.
+ The unit is milliseconds.
The value < 0 means no value is suggested.
The value 0 means retry should be done ASAP.
The value of INT_MAX(0x7fffffff) means no retry. */
@@ -522,7 +522,7 @@ typedef struct {
int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
back-off timer value RIL wants to override the one
pre-configured in FW.
- The unit is miliseconds.
+ The unit is milliseconds.
The value < 0 means no value is suggested.
The value 0 means retry should be done ASAP.
The value of INT_MAX(0x7fffffff) means no retry. */
@@ -555,7 +555,7 @@ typedef struct {
int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
back-off timer value RIL wants to override the one
pre-configured in FW.
- The unit is miliseconds.
+ The unit is milliseconds.
The value < 0 means no value is suggested.
The value 0 means retry should be done ASAP.
The value of INT_MAX(0x7fffffff) means no retry. */
@@ -678,7 +678,7 @@ typedef struct {
typedef struct {
char * address;
int clir;
- /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
+ /* (same as 'n' parameter in TS 27.007 7.7 "+CLIR"
* clir == 0 on "use subscription default value"
* clir == 1 on "CLIR invocation" (restrict CLI presentation)
* clir == 2 on "CLIR suppression" (allow CLI presentation)
@@ -750,7 +750,7 @@ typedef struct {
* 0 = disable
* 1 = enable
* 2 = interrogate
- * 3 = registeration
+ * 3 = registration
* 4 = erasure
*/
@@ -1509,7 +1509,7 @@ typedef struct {
typedef struct {
int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
- int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
+ int rsrp; /* The current Reference Signal Receive Power in dBm multiplied by -1.
* Range: 44 to 140 dBm
* INT_MAX: 0x7FFFFFFF denotes invalid value.
* Reference: 3GPP TS 36.133 9.1.4 */
@@ -1529,7 +1529,7 @@ typedef struct {
typedef struct {
int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
- int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
+ int rsrp; /* The current Reference Signal Receive Power in dBm multiplied by -1.
* Range: 44 to 140 dBm
* INT_MAX: 0x7FFFFFFF denotes invalid value.
* Reference: 3GPP TS 36.133 9.1.4 */
@@ -1554,7 +1554,7 @@ typedef struct {
} RIL_LTE_SignalStrength_v8;
typedef struct {
- int rscp; /* The Received Signal Code Power in dBm multipled by -1.
+ int rscp; /* The Received Signal Code Power in dBm multiplied by -1.
* Range : 25 to 120
* INT_MAX: 0x7FFFFFFF denotes invalid value.
* Reference: 3GPP TS 25.123, section 9.1.1.1 */
@@ -2963,7 +2963,7 @@ typedef enum {
DATA_REQ_REASOPN_NORMAL = 0x01, // The reason of the data request is normal
DATA_REQ_REASOPN_SHUTDOWN = 0x02, // The reason of the data request is device shutdown
DATA_REQ_REASOPN_HANDOVER = 0x03, // The reason of the data request is IWLAN data handover
- // to another transport (e.g. from cellular to wifi or vise versa)
+ // to another transport (e.g. from cellular to wifi or vice versa)
} RIL_DataRequestReason;
/**
@@ -3790,7 +3790,7 @@ typedef enum {
* for values above 2 this is RIL_RadioTechnology + 2.
* ((const char **)data)[1] is a RIL_DataProfile (support is optional)
* ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
- * override the one in the profile. NULL indicates no APN overrride.
+ * override the one in the profile. NULL indicates no APN override.
* ((const char **)data)[3] is the username for APN, or NULL
* ((const char **)data)[4] is the password for APN, or NULL
* ((const char **)data)[5] is the PAP / CHAP auth type. Values:
@@ -4384,7 +4384,7 @@ typedef enum {
/**
* RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
*
- * Query current network selectin mode
+ * Query current network selection mode
*
* "data" is NULL
*
@@ -4829,7 +4829,7 @@ typedef enum {
* invokeOemRilRequestStrings()
*
* "response" is a const char **, representing an array of null-terminated UTF-8
- * stings that will be returned via the caller's response message here:
+ * strings that will be returned via the caller's response message here:
*
* (String[])(((AsyncResult)response.obj).result)
*
@@ -5205,7 +5205,7 @@ typedef enum {
* "data" is NULL
*
* "response" is int *
- * ((int *)reponse)[0] is == RIL_PreferredNetworkType
+ * ((int *)response)[0] is == RIL_PreferredNetworkType
*
* Valid errors:
* SUCCESS
@@ -6713,7 +6713,7 @@ typedef enum {
/**
* RIL_REQUEST_GET_RADIO_CAPABILITY
*
- * Used to get phone radio capablility.
+ * Used to get phone radio capability.
*
* "data" is the RIL_RadioCapability structure
*
@@ -6997,7 +6997,7 @@ typedef enum {
*
* Provide Carrier specific information to the modem that will be used to
* encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
- * switch and everytime we receive a new certificate.
+ * switch and every time we receive a new certificate.
*
* "data" is the RIL_CarrierInfoForImsiEncryption * structure.
*
@@ -7706,7 +7706,7 @@ typedef enum {
* "RING", "BUSY", "NO CARRIER", and also call state
* transitions (DIALING->ALERTING ALERTING->ACTIVE)
*
- * Redundent or extraneous invocations are tolerated
+ * Redundant or extraneous invocations are tolerated
*/
#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
@@ -7738,7 +7738,7 @@ typedef enum {
* as an ascii string of hex digits. The PDU starts with the SMSC address
* per TS 27.005 (+CMT:)
*
- * Callee will subsequently confirm the receipt of thei SMS with a
+ * Callee will subsequently confirm the receipt of the SMS with a
* RIL_REQUEST_SMS_ACKNOWLEDGE
*
* No new RIL_UNSOL_RESPONSE_NEW_SMS
@@ -7880,7 +7880,7 @@ typedef enum {
/**
* RIL_UNSOL_STK_EVENT_NOTIFY
*
- * Indicate when SIM notifies applcations some event happens.
+ * Indicate when SIM notifies applications some event happens.
* Generally, application does not need to have any feedback to
* SIM but shall be able to indicate appropriate messages to users.
*
@@ -8076,7 +8076,7 @@ typedef enum {
/**
* RIL_UNSOL_RINGBACK_TONE
*
- * Indicates that nework doesn't have in-band information, need to
+ * Indicates that network doesn't have in-band information, need to
* play out-band tone.
*
* "data" is an int *
@@ -8608,23 +8608,23 @@ struct RIL_Env {
*
* @param env is environment point defined as RIL_Env
* @param argc number of arguments
- * @param argv list fo arguments
+ * @param argv list of arguments
*
*/
const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
/**
* If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
- * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
+ * for initializing RIL_RadioFunctions used for BT SAP communications. It is called whenever RILD
* starts or modem restarts. Returns handlers for SAP related request that are made on SAP
- * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
+ * specific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
* and used on the general RIL socket.
* argc and argv will be command line arguments intended for the RIL implementation
* Return NULL on error.
*
* @param env is environment point defined as RIL_Env
* @param argc number of arguments
- * @param argv list fo arguments
+ * @param argv list of arguments
*
*/
const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
diff --git a/guest/hals/ril/reference-libril/ril_service.cpp b/guest/hals/ril/reference-libril/ril_service.cpp
index 6d5a51c10..01ddb7409 100644
--- a/guest/hals/ril/reference-libril/ril_service.cpp
+++ b/guest/hals/ril/reference-libril/ril_service.cpp
@@ -3715,7 +3715,7 @@ Return<void> RadioImpl_1_6::setAllowedCarriers_1_4(int32_t serial,
return Void();
}
- // Prepare legacy structure (defined in IRadio 1.0) to re-use existing code.
+ // Prepare legacy structure (defined in IRadio 1.0) to reuse existing code.
RIL_CarrierRestrictions cr = {};
if (prepareCarrierRestrictions(cr, false, carriers.allowedCarriers, carriers.excludedCarriers,
pRI) < 0) {
@@ -5901,7 +5901,7 @@ int convertResponseHexStringEntryToInt(char **response, int index, int numString
}
/* Fill Cell Identity info from Voice Registration State Response.
- * This fucntion is applicable only for RIL Version < 15.
+ * This function is applicable only for RIL Version < 15.
* Response is a "char **".
* First and Second entries are in hex string format
* and rest are integers represented in ascii format. */
@@ -6126,7 +6126,7 @@ void fillCellIdentityFromVoiceRegStateResponseString_1_2(V1_2::CellIdentity &cel
}
/* Fill Cell Identity info from Data Registration State Response.
- * This fucntion is applicable only for RIL Version < 15.
+ * This function is applicable only for RIL Version < 15.
* Response is a "char **".
* First and Second entries are in hex string format
* and rest are integers represented in ascii format. */
@@ -9738,7 +9738,7 @@ int radio_1_6::getAllowedCarriersResponse(int slotId,
RIL_CarrierRestrictionsWithPriority *pCrExt =
(RIL_CarrierRestrictionsWithPriority *)response;
- // Convert into the structure used in IRadio 1.0 to re-use existing code
+ // Convert into the structure used in IRadio 1.0 to reuse existing code
RIL_CarrierRestrictions cr = {};
cr.len_allowed_carriers = pCrExt->len_allowed_carriers;
cr.len_excluded_carriers = pCrExt->len_excluded_carriers;
diff --git a/guest/hals/ril/reference-ril/reference-ril.c b/guest/hals/ril/reference-ril/reference-ril.c
index c946db0f4..fa158b110 100644
--- a/guest/hals/ril/reference-ril/reference-ril.c
+++ b/guest/hals/ril/reference-ril/reference-ril.c
@@ -111,7 +111,7 @@ typedef struct {
// byte #: |3 |2 |1 |0
//
// Higher byte order give higher priority. Thus, a value of 0x0000000f represents
- // a preferred mode of GSM, WCDMA, CDMA, and EvDo in which all are equally preferrable, whereas
+ // a preferred mode of GSM, WCDMA, CDMA, and EvDo in which all are equally preferable, whereas
// 0x00000201 represents a mode with GSM and WCDMA, in which WCDMA is preferred over GSM
int32_t preferredNetworkMode;
int subscription_source;
@@ -6081,7 +6081,7 @@ static void onUnsolicited (const char *s, const char *sms_pdu)
sms_pdu, strlen(sms_pdu));
} else if (strStartsWith(s, "+CGEV:")) {
/* Really, we can ignore NW CLASS and ME CLASS events here,
- * but right now we don't since extranous
+ * but right now we don't since extraneous
* RIL_UNSOL_DATA_CALL_LIST_CHANGED calls are tolerated
*/
/* can't issue AT commands here -- call on main thread */
diff --git a/host/commands/assemble_cvd/disk/kernel_ramdisk_repacker.cpp b/host/commands/assemble_cvd/disk/kernel_ramdisk_repacker.cpp
index 6268d8604..ac5f85bc7 100644
--- a/host/commands/assemble_cvd/disk/kernel_ramdisk_repacker.cpp
+++ b/host/commands/assemble_cvd/disk/kernel_ramdisk_repacker.cpp
@@ -57,7 +57,7 @@ class KernelRamdiskRepackerImpl : public KernelRamdiskRepacker {
const std::string& output_image,
const std::string& vbmeta_image) {
// TODO(b/149866755) For now, we assume that vendor_dlkm is ext4. Add
- // logic to handle EROFS once the feature stablizes.
+ // logic to handle EROFS once the feature stabilizes.
const auto tmp_output_image = output_image + ".tmp";
if (!BuildDlkmImage(build_dir, false, partition_name, tmp_output_image)) {
LOG(ERROR) << "Failed to build `" << partition_name << "` image from "
diff --git a/host/commands/assemble_cvd/flags.cc b/host/commands/assemble_cvd/flags.cc
index 0bbc749f4..ca295fedb 100644
--- a/host/commands/assemble_cvd/flags.cc
+++ b/host/commands/assemble_cvd/flags.cc
@@ -981,6 +981,17 @@ Result<CuttlefishConfig> InitializeCuttlefishConfiguration(
tmp_config_obj.set_vm_manager(vmm_mode);
tmp_config_obj.set_ap_vm_manager(vm_manager_vec[0] + "_openwrt");
+ // TODO: schuffelen - fix behavior on riscv64
+ if (guest_configs[0].target_arch == Arch::RiscV64) {
+ static constexpr char kRiscv64Secure[] = "keymint,gatekeeper,oemlock";
+ SetCommandLineOptionWithMode("secure_hals", kRiscv64Secure,
+ google::FlagSettingMode::SET_FLAGS_DEFAULT);
+ } else {
+ static constexpr char kDefaultSecure[] =
+ "oemlock,guest_keymint_insecure,guest_gatekeeper_insecure";
+ SetCommandLineOptionWithMode("secure_hals", kDefaultSecure,
+ google::FlagSettingMode::SET_FLAGS_DEFAULT);
+ }
auto secure_hals_strs =
android::base::Tokenize(FLAGS_secure_hals, ",:;|/\\+");
tmp_config_obj.set_secure_hals(
diff --git a/host/commands/assemble_cvd/flags_defaults.h b/host/commands/assemble_cvd/flags_defaults.h
index f1072fbfa..93618a74a 100644
--- a/host/commands/assemble_cvd/flags_defaults.h
+++ b/host/commands/assemble_cvd/flags_defaults.h
@@ -90,8 +90,7 @@
#define CF_DEFAULTS_USE_RANDOM_SERIAL false
#define CF_DEFAULTS_SERIAL_NUMBER \
cuttlefish::ForCurrentInstance("CUTTLEFISHCVD")
-#define CF_DEFAULTS_SECURE_HALS \
- "oemlock,guest_keymint_insecure,guest_gatekeeper_insecure"
+#define CF_DEFAULTS_SECURE_HALS CF_DEFAULTS_DYNAMIC_STRING
#define CF_DEFAULTS_PROTECTED_VM false
#define CF_DEFAULTS_MTE false
@@ -221,7 +220,7 @@
#define CF_DEFAULTS_UDP_PORT_RANGE "15550:15599"
// Adb default parameters
-// TODO : Replaceconstants with these flags, they're currently defined throug
+// TODO : Replaceconstants with these flags, they're currently defined through
// GflagsCompatFlag
#define CF_DEFAULTS_RUN_ADB_CONNECTOR true
#define CF_DEFAULTS_ADB_MODE "vsock_half_tunnel"
diff --git a/host/commands/cvd_send_sms/pdu_format_builder.cc b/host/commands/cvd_send_sms/pdu_format_builder.cc
index d12cae698..397456ed3 100644
--- a/host/commands/cvd_send_sms/pdu_format_builder.cc
+++ b/host/commands/cvd_send_sms/pdu_format_builder.cc
@@ -55,8 +55,8 @@ static std::string Gsm7bitEncode(const std::string& input) {
icu::UCharCharacterIterator iter(unicode_str.getTerminatedBuffer(),
unicode_str.length());
size_t octects_size = unicode_str.length() - (unicode_str.length() / 8);
- std::byte octects[octects_size];
- std::byte* octects_index = octects;
+ std::byte octets[octects_size];
+ std::byte* octects_index = octets;
int bits_to_write_in_prev_octect = 0;
for (; iter.hasNext(); iter.next()) {
UChar uchar = iter.current();
@@ -80,25 +80,25 @@ static std::string Gsm7bitEncode(const std::string& input) {
(std::byte)std::distance(kGSM7BitDefaultAlphabet.begin(), found_it);
if (iter.hasPrevious()) {
std::byte prev_octect_value = *(octects_index - 1);
- // Writes the corresponding lowest part in the previous octect.
+ // Writes the corresponding lowest part in the previous octet.
*(octects_index - 1) =
code << (8 - bits_to_write_in_prev_octect) | prev_octect_value;
}
if (bits_to_write_in_prev_octect < 7) {
- // Writes the remaining highest part in the current octect.
+ // Writes the remaining highest part in the current octet.
*octects_index = code >> bits_to_write_in_prev_octect;
bits_to_write_in_prev_octect++;
octects_index++;
} else { // bits_to_write_in_prev_octect == 7
// The 7 bits of the current character were fully packed into the
- // previous octect.
+ // previous octet.
bits_to_write_in_prev_octect = 0;
}
}
std::stringstream result;
for (int i = 0; i < octects_size; i++) {
result << std::setfill('0') << std::setw(2) << std::hex
- << std::to_integer<int>(octects[i]);
+ << std::to_integer<int>(octets[i]);
}
return result.str();
}
diff --git a/host/commands/cvd_update_security_algorithm/main.cc b/host/commands/cvd_update_security_algorithm/main.cc
index 7fdb9a3f7..c661622ee 100644
--- a/host/commands/cvd_update_security_algorithm/main.cc
+++ b/host/commands/cvd_update_security_algorithm/main.cc
@@ -28,7 +28,7 @@ DEFINE_int32(instance_num, cuttlefish::GetInstance(),
"Which instance to read the configs from");
DEFINE_int32(modem_num, 0, "Which modem to send command to");
DEFINE_int32(connection_event, 0,
- "The tyoe if connection event. See "
+ "The type if connection event. See "
"android.hardware.radio.network.ConnectionEvent");
DEFINE_int32(encryption, 0,
"The encryption algorithm being used. See "
diff --git a/host/commands/kernel_log_monitor/kernel_log_server.cc b/host/commands/kernel_log_monitor/kernel_log_server.cc
index 5973207b1..75f200be3 100644
--- a/host/commands/kernel_log_monitor/kernel_log_server.cc
+++ b/host/commands/kernel_log_monitor/kernel_log_server.cc
@@ -81,7 +81,7 @@ void ProcessSubscriptions(
if (action == monitor::SubscriptionAction::ContinueSubscription) {
++idx;
} else {
- // Cancel the subscription by swaping it with the last active subscription
+ // Cancel the subscription by swapping it with the last active subscription
// and decreasing the active subscription count
--active_subscription_count;
std::swap((*subscribers)[idx], (*subscribers)[active_subscription_count]);
diff --git a/host/commands/metrics/proto/cf_log.proto b/host/commands/metrics/proto/cf_log.proto
index 285807bc7..12a252517 100644
--- a/host/commands/metrics/proto/cf_log.proto
+++ b/host/commands/metrics/proto/cf_log.proto
@@ -28,14 +28,14 @@ message CuttlefishLogEvent {
// Next index: 3
enum DeviceType {
// The log event was sourced from an unspecified device type.
- //TODO(moelsherif) : This event is not coverted yet in the code
+ //TODO(moelsherif) : This event is not converted yet in the code
CUTTLEFISH_DEVICE_TYPE_UNSPECIFIED = 0;
// A log event that was sourced from a Cuttlefish host device.
CUTTLEFISH_DEVICE_TYPE_HOST = 1;
// A log event that was sent by an Cuttlefish guest device.
- //TODO(moelsherif) : This event is not coverted yet in the code
+ //TODO(moelsherif) : This event is not converted yet in the code
CUTTLEFISH_DEVICE_TYPE_GUEST = 2;
}
diff --git a/host/commands/modem_simulator/channel_monitor.h b/host/commands/modem_simulator/channel_monitor.h
index cc86b46b7..dc8f33a2a 100644
--- a/host/commands/modem_simulator/channel_monitor.h
+++ b/host/commands/modem_simulator/channel_monitor.h
@@ -48,7 +48,7 @@ class ClientId {
* Client object managed by ChannelMonitor, contains two types, the RIL client
* and the remote client of other cuttlefish instance.
* Due to std::mutex does not implement its copy and operate= constructors, it
- * cann't be stored in standard contains (vector, map), so use the point instead.
+ * can't be stored in standard contains (vector, map), so use the point instead.
*/
class Client {
public:
diff --git a/host/commands/modem_simulator/main.cpp b/host/commands/modem_simulator/main.cpp
index c22d11d77..b0ebf6474 100644
--- a/host/commands/modem_simulator/main.cpp
+++ b/host/commands/modem_simulator/main.cpp
@@ -28,7 +28,7 @@
#include "host/libs/config/cuttlefish_config.h"
// we can start multiple modems simultaneously; each modem
-// will listent to one server fd for incoming sms/phone call
+// will listen to one server fd for incoming sms/phone call
// there should be at least 1 valid fd
DEFINE_string(server_fds, "", "A comma separated list of file descriptors");
DEFINE_int32(sim_type, 1, "Sim type: 1 for normal, 2 for CtsCarrierApiTestCases");
diff --git a/host/commands/modem_simulator/network_service.cpp b/host/commands/modem_simulator/network_service.cpp
index 03d0a59a9..3dc77b5b6 100644
--- a/host/commands/modem_simulator/network_service.cpp
+++ b/host/commands/modem_simulator/network_service.cpp
@@ -979,7 +979,7 @@ void NetworkService::HandleQuerySupportedTechs(const Client& client) {
* byte #: |3 |2 |1 |0
*
* Higher byte order give higher priority. Thus, a value of 0x0000000f represents
- * a preferred mode of GSM, WCDMA, CDMA, and EvDo in which all are equally preferrable, whereas
+ * a preferred mode of GSM, WCDMA, CDMA, and EvDo in which all are equally preferable, whereas
* 0x00000201 represents a mode with GSM and WCDMA, in which WCDMA is preferred over GSM
*/
int NetworkService::getModemTechFromPrefer(int preferred_mask) {
@@ -1294,8 +1294,8 @@ void NetworkService::KeepSignalStrengthChangingLoop::
network_service_.signal_strength_percent_ -= 5;
// With "close to 0" values, the signal strength bar on the Android UI will
// be shown empty, this also represents that theres's no connectivity which
- // is missleading as the connectivity continues, so a lower bound of 10 will
- // be used so the signal strenght bar is never emptied
+ // is misleading as the connectivity continues, so a lower bound of 10 will
+ // be used so the signal strength bar is never emptied
if (network_service_.signal_strength_percent_ <= 10) {
network_service_.signal_strength_percent_ = 100;
}
diff --git a/host/commands/modem_simulator/network_service.h b/host/commands/modem_simulator/network_service.h
index 7fc69dfb4..fd22fa729 100644
--- a/host/commands/modem_simulator/network_service.h
+++ b/host/commands/modem_simulator/network_service.h
@@ -225,7 +225,7 @@ class NetworkService : public ModemService, public std::enable_shared_from_this<
nr_csi_sinr(INT_MAX) {}
};
- // There's no such thing as a percentange for signal strength in the real
+ // There's no such thing as a percentage for signal strength in the real
// world, as for example for battery usage, this percent value is used to pick
// a value within the corresponding signal strength values range for emulation
// purposes only.
diff --git a/host/commands/modem_simulator/pdu_parser.h b/host/commands/modem_simulator/pdu_parser.h
index b6f48be12..1c4714b24 100644
--- a/host/commands/modem_simulator/pdu_parser.h
+++ b/host/commands/modem_simulator/pdu_parser.h
@@ -40,7 +40,7 @@ class PDUParser {
int HexCharToInt(char c);
std::string IntToHexString(int value);
- // special handling for time zone differance (to GMT)
+ // special handling for time zone difference (to GMT)
std::string IntToHexStringTimeZoneDiff(int value);
std::string GetCurrentTimeStamp();
diff --git a/host/commands/modem_simulator/unittest/service_test.cpp b/host/commands/modem_simulator/unittest/service_test.cpp
index e6645e704..635addb83 100644
--- a/host/commands/modem_simulator/unittest/service_test.cpp
+++ b/host/commands/modem_simulator/unittest/service_test.cpp
@@ -591,7 +591,7 @@ TEST_F(ModemServiceTest, SendSMS) {
//command += '\032';
SendCommand(command);
ReadCommandResponse(response);
- // TODO (bohu) for some reason the follwoing asserts fail, fix them
+ // TODO (bohu) for some reason the following asserts fail, fix them
// ASSERT_EQ(response.size(), 3);
// ASSERT_STREQ(response[response.size() - 1].c_str(),
// kFinalResponseSuccess[0].c_str());
diff --git a/host/commands/run_cvd/boot_state_machine.cc b/host/commands/run_cvd/boot_state_machine.cc
index 14c7252e6..fd858a40e 100644
--- a/host/commands/run_cvd/boot_state_machine.cc
+++ b/host/commands/run_cvd/boot_state_machine.cc
@@ -253,10 +253,6 @@ class CvdBootStateMachine : public SetupFeature, public KernelLogPipeConsumer {
SubprocessOptions(), WEXITED)
.ok());
CHECK(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(),
- "shell", "svc", "wifi", "enable"},
- SubprocessOptions(), WEXITED)
- .ok());
- CHECK(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(),
"shell", "cmd", "uwb", "enable-uwb"},
SubprocessOptions(), WEXITED)
.ok());
diff --git a/host/commands/run_cvd/launch/kernel_log_monitor.cpp b/host/commands/run_cvd/launch/kernel_log_monitor.cpp
index 37ba8612c..2f67daa4e 100644
--- a/host/commands/run_cvd/launch/kernel_log_monitor.cpp
+++ b/host/commands/run_cvd/launch/kernel_log_monitor.cpp
@@ -71,7 +71,7 @@ class KernelLogMonitor : public CommandSource,
// KernelLogPipeProvider
SharedFD KernelLogPipe() override {
- CHECK(!event_pipe_read_ends_.empty()) << "No more kernel pipes left. Make sure you inhereted "
+ CHECK(!event_pipe_read_ends_.empty()) << "No more kernel pipes left. Make sure you inherited "
"KernelLogPipeProvider and provided multibinding "
"from KernelLogPipeConsumer to your type.";
SharedFD ret = event_pipe_read_ends_.back();
diff --git a/host/commands/run_cvd/launch/open_wrt.cpp b/host/commands/run_cvd/launch/open_wrt.cpp
index 5b84a3b00..289d63f7a 100644
--- a/host/commands/run_cvd/launch/open_wrt.cpp
+++ b/host/commands/run_cvd/launch/open_wrt.cpp
@@ -86,11 +86,12 @@ class OpenWrt : public CommandSource {
wifi_tap = ap_cmd.AddTap(instance_.wifi_tap_name());
}
- if (IsRestoring(config_)) {
- const std::string snapshot_dir = config_.snapshot_path();
- CF_EXPECT(ap_cmd.SetToRestoreFromSnapshot(snapshot_dir, instance_.id(),
- "_openwrt"));
- }
+ // TODO(khei): Enable restore once open_wrt instance restoring is fixed
+ // if (IsRestoring(config_)) {
+ // const std::string snapshot_dir = config_.snapshot_path();
+ // CF_EXPECT(ap_cmd.SetToRestoreFromSnapshot(snapshot_dir, instance_.id(),
+ // "_openwrt"));
+ //}
/* TODO(kwstephenkim): delete this code when Minidroid completely disables
* the AP VM itself
diff --git a/host/commands/run_cvd/server_loop_impl_snapshot.cpp b/host/commands/run_cvd/server_loop_impl_snapshot.cpp
index 9ed21a354..c90c4aca6 100644
--- a/host/commands/run_cvd/server_loop_impl_snapshot.cpp
+++ b/host/commands/run_cvd/server_loop_impl_snapshot.cpp
@@ -155,9 +155,6 @@ Result<void> ServerLoopImpl::HandleSuspend(ProcessMonitor& process_monitor) {
"cmd", "bluetooth_manager", "wait-for-state:STATE_OFF"},
SubprocessOptions(), WEXITED));
CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
- "svc", "wifi", "disable"},
- SubprocessOptions(), WEXITED));
- CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
"cmd", "uwb", "disable-uwb"},
SubprocessOptions(), WEXITED));
// right order: guest -> host
@@ -182,9 +179,6 @@ Result<void> ServerLoopImpl::HandleResume(ProcessMonitor& process_monitor) {
"cmd", "bluetooth_manager", "enable"},
SubprocessOptions(), WEXITED));
CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
- "svc", "wifi", "enable"},
- SubprocessOptions(), WEXITED));
- CF_EXPECT(Execute({adb_bin_path, "-s", instance_.adb_ip_and_port(), "shell",
"cmd", "uwb", "enable-uwb"},
SubprocessOptions(), WEXITED));
LOG(DEBUG) << "The guest resumed.";
diff --git a/host/commands/secure_env/primary_key_builder.cpp b/host/commands/secure_env/primary_key_builder.cpp
index ff0d2d71b..4ceccbfce 100644
--- a/host/commands/secure_env/primary_key_builder.cpp
+++ b/host/commands/secure_env/primary_key_builder.cpp
@@ -58,7 +58,7 @@ void PrimaryKeyBuilder::UniqueData(const std::string& data) {
/* The unique field normally has a precise size to go with the type of the
* object. During primary key creation the unique field accepts any short byte
* string to let the user introduce variability into the primary key creation
- * process which is otherwise determinstic relative to secret TPM state. */
+ * process which is otherwise deterministic relative to secret TPM state. */
public_area_.unique.sym.size = data.size();
memcpy(&public_area_.unique.sym.buffer, data.data(), data.size());
}
diff --git a/host/commands/secure_env/proxy_keymaster_context.h b/host/commands/secure_env/proxy_keymaster_context.h
index d40b5b257..6adacc392 100644
--- a/host/commands/secure_env/proxy_keymaster_context.h
+++ b/host/commands/secure_env/proxy_keymaster_context.h
@@ -36,7 +36,7 @@ class TpmRemoteProvisioningContext;
* Implementation of KeymasterContext that proxies to another implementation.
*
* Because AndroidKeymaster wraps a KeymasterContext and puts it into a unique
- * pointer, it doesn't let the implementor manage the lifetime of the
+ * pointer, it doesn't let the implementer manage the lifetime of the
* KeymasterContext implementation. This proxy breaks that relationship, and
* allows the lifetimes to be distinct as long as the KeymasterContext instance
* outlives the AndroidKeymaster instance.
diff --git a/host/commands/secure_env/rust/kmr_ta.h b/host/commands/secure_env/rust/kmr_ta.h
index efa9f2da0..9447c6446 100644
--- a/host/commands/secure_env/rust/kmr_ta.h
+++ b/host/commands/secure_env/rust/kmr_ta.h
@@ -22,7 +22,7 @@ extern "C" {
// Main function for Rust implementation of KeyMint.
// - fd_in: file descriptor for incoming serialized request messages
// - fd_out: file descriptor for outgoing serialized response messages
-// - security_level: security level to advertize; should be one of the integer
+// - security_level: security level to advertise; should be one of the integer
// values from SecurityLevel.aidl.
// - trm: pointer to a valid `TpmResourceManager`, which must remain valid
// for the entire duration of the function execution.
diff --git a/host/commands/secure_env/rust/sdd.rs b/host/commands/secure_env/rust/sdd.rs
index fa314da89..73d2ab4a6 100644
--- a/host/commands/secure_env/rust/sdd.rs
+++ b/host/commands/secure_env/rust/sdd.rs
@@ -14,7 +14,7 @@
//! Secure deletion data manager for Cuttlefish.
//! This implementetation is "secure" in the sense that the underlying storage can not be accessed
-//! by Android. However, it is does not provide any protections agains the host, i.e. anyone with
+//! by Android. However, it is does not provide any protections against the host, i.e. anyone with
//! access to the host can read and alter the contents of deletion data.
use kmr_common::{crypto, keyblob, km_err, Error};
diff --git a/host/commands/secure_env/rust/tpm.rs b/host/commands/secure_env/rust/tpm.rs
index df907ec9f..5e1c2f987 100644
--- a/host/commands/secure_env/rust/tpm.rs
+++ b/host/commands/secure_env/rust/tpm.rs
@@ -156,7 +156,7 @@ impl kmr_common::crypto::Hkdf for KeyDerivation {
// HKDF normally performs an initial extract step to create a pseudo-random key (PRK) for
// use in the HKDF expand processing. This implementation uses a TPM HMAC key for HKDF
// expand processing instead, and so we cannot do a full HKDF call.
- Err(km_err!(UnknownError, "unexpected call to full hkdf opearation"))
+ Err(km_err!(UnknownError, "unexpected call to full hkdf operation"))
}
fn extract(
diff --git a/host/commands/snapshot_util_cvd/main.cc b/host/commands/snapshot_util_cvd/main.cc
index 0368d1954..c9ba106b8 100644
--- a/host/commands/snapshot_util_cvd/main.cc
+++ b/host/commands/snapshot_util_cvd/main.cc
@@ -95,10 +95,10 @@ Result<void> SnapshotCvdMain(std::vector<std::string> args) {
"Failed to delete preexisting snapshot dir");
}
CF_EXPECTF(!FileExists(parsed.snapshot_path, /* follow symlink */ false),
- "Delete the destination directiory \"{}\" first",
+ "Delete the destination directory \"{}\" first",
parsed.snapshot_path);
- // Automically suspend and resume if requested.
+ // Automatically suspend and resume if requested.
if (parsed.auto_suspend) {
run_cvd::ExtendedLauncherAction extended_action;
extended_action.mutable_suspend();
diff --git a/host/commands/start/main.cc b/host/commands/start/main.cc
index e0c035f9c..236f1a782 100644
--- a/host/commands/start/main.cc
+++ b/host/commands/start/main.cc
@@ -323,17 +323,17 @@ std::string FormatBoolString(const std::string& name_str, bool value) {
}
bool OverrideBoolArg(std::vector<std::string>& args) {
- bool overrided = false;
+ bool overridden = false;
for (int index = 0; index < args.size(); index++) {
const std::string curr_arg = args[index];
BooleanFlag value = IsBoolArg(curr_arg);
if (value.is_bool_flag) {
// Override the value
args[index] = FormatBoolString(value.name, value.bool_flag_value);
- overrided = true;
+ overridden = true;
}
}
- return overrided;
+ return overridden;
}
} // namespace
diff --git a/host/commands/tcp_connector/main.cpp b/host/commands/tcp_connector/main.cpp
index 19fbbcd07..05dbc68d1 100644
--- a/host/commands/tcp_connector/main.cpp
+++ b/host/commands/tcp_connector/main.cpp
@@ -30,7 +30,7 @@
DEFINE_int32(fifo_in, -1, "A pipe for incoming communication");
DEFINE_int32(fifo_out, -1, "A pipe for outgoing communication");
-DEFINE_int32(data_port, -1, "A port for datas");
+DEFINE_int32(data_port, -1, "A port for data");
DEFINE_int32(buffer_size, -1, "The buffer size");
DEFINE_int32(dump_packet_size, -1,
"Dump incoming/outgoing packets up to given size");
diff --git a/host/cvd_test_configs/local_tests/README.md b/host/cvd_test_configs/local_tests/README.md
index 003f7254a..cff1e40dc 100644
--- a/host/cvd_test_configs/local_tests/README.md
+++ b/host/cvd_test_configs/local_tests/README.md
@@ -7,7 +7,7 @@ instances with remotely fetched ones as well, but in all cases
at least one local image is needed. Hence some steps are needed
to create these artifacts locally.
-In particular - there needs to be the following artifacts lcoal:
+In particular - there needs to be the following artifacts local:
1. A folder containing Cuttlefish 'host tools' -
which contains the `cvd` binary (among others) that are
diff --git a/host/frontend/webrtc/audio_handler.cpp b/host/frontend/webrtc/audio_handler.cpp
index be15ed7c2..114f377e9 100644
--- a/host/frontend/webrtc/audio_handler.cpp
+++ b/host/frontend/webrtc/audio_handler.cpp
@@ -418,7 +418,7 @@ void AudioHandler::OnPlaybackBuffer(TxBuffer buffer) {
return;
}
// A buffer may be received for an inactive stream if we were slow to
- // process it and the other side stopped the stream. Quitely ignore it in
+ // process it and the other side stopped the stream. Quietly ignore it in
// that case
if (!stream_desc.active) {
buffer.SendStatus(AudioStatus::VIRTIO_SND_S_OK, 0, buffer.len());
@@ -478,7 +478,7 @@ void AudioHandler::OnCaptureBuffer(RxBuffer buffer) {
return;
}
// A buffer may be received for an inactive stream if we were slow to
- // process it and the other side stopped the stream. Quitely ignore it in
+ // process it and the other side stopped the stream. Quietly ignore it in
// that case
if (!stream_desc.active) {
buffer.SendStatus(AudioStatus::VIRTIO_SND_S_OK, 0, buffer.len());
diff --git a/host/frontend/webrtc/connection_observer.cpp b/host/frontend/webrtc/connection_observer.cpp
index 246a4e109..aaa903cff 100644
--- a/host/frontend/webrtc/connection_observer.cpp
+++ b/host/frontend/webrtc/connection_observer.cpp
@@ -78,33 +78,40 @@ class ConnectionObserverImpl : public webrtc_streaming::ConnectionObserver {
SendLastFrameAsync(/*all displays*/ std::nullopt);
}
- void OnTouchEvent(const std::string &device_label, int x, int y,
- bool down) override {
- input_events_sink_->SendTouchEvent(device_label, x, y, down);
+ Result<void> OnTouchEvent(const std::string &device_label, int x, int y,
+ bool down) override {
+ CF_EXPECT(input_events_sink_->SendTouchEvent(device_label, x, y, down));
+ return {};
}
- void OnMultiTouchEvent(const std::string &device_label, Json::Value id,
- Json::Value slot, Json::Value x, Json::Value y,
- bool down, int size) {
+ Result<void> OnMultiTouchEvent(const std::string &device_label,
+ Json::Value id, Json::Value slot,
+ Json::Value x, Json::Value y, bool down,
+ int size) {
std::vector<MultitouchSlot> slots(size);
for (int i = 0; i < size; i++) {
slots[i].id = id[i].asInt();
slots[i].x = x[i].asInt();
slots[i].y = y[i].asInt();
}
- input_events_sink_->SendMultiTouchEvent(device_label, slots, down);
+ CF_EXPECT(
+ input_events_sink_->SendMultiTouchEvent(device_label, slots, down));
+ return {};
}
- void OnKeyboardEvent(uint16_t code, bool down) override {
- input_events_sink_->SendKeyboardEvent(code, down);
+ Result<void> OnKeyboardEvent(uint16_t code, bool down) override {
+ CF_EXPECT(input_events_sink_->SendKeyboardEvent(code, down));
+ return {};
}
- void OnWheelEvent(int pixels) {
- input_events_sink_->SendRotaryEvent(pixels);
+ Result<void> OnWheelEvent(int pixels) {
+ CF_EXPECT(input_events_sink_->SendRotaryEvent(pixels));
+ return {};
}
- void OnSwitchEvent(uint16_t code, bool state) {
- input_events_sink_->SendSwitchesEvent(code, state);
+ Result<void> OnSwitchEvent(uint16_t code, bool state) {
+ CF_EXPECT(input_events_sink_->SendSwitchesEvent(code, state));
+ return {};
}
void OnAdbChannelOpen(std::function<bool(const uint8_t *, size_t)>
@@ -127,32 +134,39 @@ class ConnectionObserverImpl : public webrtc_streaming::ConnectionObserver {
kernel_log_events_handler_->AddSubscriber(control_message_sender);
}
- void OnLidStateChange(bool lid_open) override {
+ Result<void> OnLidStateChange(bool lid_open) override {
// InputManagerService treats a value of 0 as open and 1 as closed, so
// invert the lid_switch_open value that is sent to the input device.
- OnSwitchEvent(SW_LID, !lid_open);
+ CF_EXPECT(OnSwitchEvent(SW_LID, !lid_open));
+ return {};
}
void OnHingeAngleChange(int /*hinge_angle*/) override {
// TODO(b/181157794) Propagate hinge angle sensor data using a custom
// Sensor HAL.
}
- void OnPowerButton(bool button_down) override {
- OnKeyboardEvent(KEY_POWER, button_down);
+ Result<void> OnPowerButton(bool button_down) override {
+ CF_EXPECT(OnKeyboardEvent(KEY_POWER, button_down));
+ return {};
}
- void OnBackButton(bool button_down) override {
- OnKeyboardEvent(KEY_BACK, button_down);
+ Result<void> OnBackButton(bool button_down) override {
+ CF_EXPECT(OnKeyboardEvent(KEY_BACK, button_down));
+ return {};
}
- void OnHomeButton(bool button_down) override {
- OnKeyboardEvent(KEY_HOMEPAGE, button_down);
+ Result<void> OnHomeButton(bool button_down) override {
+ CF_EXPECT(OnKeyboardEvent(KEY_HOMEPAGE, button_down));
+ return {};
}
- void OnMenuButton(bool button_down) override {
- OnKeyboardEvent(KEY_MENU, button_down);
+ Result<void> OnMenuButton(bool button_down) override {
+ CF_EXPECT(OnKeyboardEvent(KEY_MENU, button_down));
+ return {};
}
- void OnVolumeDownButton(bool button_down) override {
- OnKeyboardEvent(KEY_VOLUMEDOWN, button_down);
+ Result<void> OnVolumeDownButton(bool button_down) override {
+ CF_EXPECT(OnKeyboardEvent(KEY_VOLUMEDOWN, button_down));
+ return {};
}
- void OnVolumeUpButton(bool button_down) override {
- OnKeyboardEvent(KEY_VOLUMEUP, button_down);
+ Result<void> OnVolumeUpButton(bool button_down) override {
+ CF_EXPECT(OnKeyboardEvent(KEY_VOLUMEUP, button_down));
+ return {};
}
void OnCustomActionButton(const std::string &command,
const std::string &button_state) override {
diff --git a/host/frontend/webrtc/html_client/js/app.js b/host/frontend/webrtc/html_client/js/app.js
index eef299dfc..5cdb2f093 100644
--- a/host/frontend/webrtc/html_client/js/app.js
+++ b/host/frontend/webrtc/html_client/js/app.js
@@ -120,7 +120,7 @@ class DeviceDetailsUpdater {
// These classes provide the same interface as those from the server_connector,
// but can't inherit from them because older versions of server_connector.js
// don't provide them.
-// These classes are only meant to avoid having to check for null everytime.
+// These classes are only meant to avoid having to check for null every time.
class EmptyDeviceDisplaysMessage {
addDisplay(display_id, width, height) {}
send() {}
diff --git a/host/frontend/webrtc/libcommon/connection_controller.cpp b/host/frontend/webrtc/libcommon/connection_controller.cpp
index cc22e862a..fff37ff5b 100644
--- a/host/frontend/webrtc/libcommon/connection_controller.cpp
+++ b/host/frontend/webrtc/libcommon/connection_controller.cpp
@@ -41,7 +41,10 @@ class CreateSessionDescriptionObserverIntermediate
: controller_(controller) {}
void OnSuccess(webrtc::SessionDescriptionInterface* desc) override {
- controller_.OnCreateSDPSuccess(desc);
+ auto res = controller_.OnCreateSDPSuccess(desc);
+ if (!res.ok()) {
+ LOG(ERROR) << res.error().FormatForEnv();
+ }
}
void OnFailure(webrtc::RTCError error) override {
controller_.OnCreateSDPFailure(error);
@@ -114,7 +117,10 @@ void ConnectionController::FailConnection(const std::string& message) {
Json::Value reply;
reply["type"] = "error";
reply["error"] = message;
- sig_handler_.SendMessage(reply);
+ auto res = sig_handler_.SendMessage(reply);
+ if (!res.ok()) {
+ LOG(ERROR) << res.error().FormatForEnv();
+ }
observer_.OnConnectionStateChange(CF_ERR(message));
}
@@ -181,7 +187,7 @@ Result<void> ConnectionController::OnErrorMsg(const std::string& msg) {
return {};
}
-void ConnectionController::OnCreateSDPSuccess(
+Result<void> ConnectionController::OnCreateSDPSuccess(
webrtc::SessionDescriptionInterface* desc) {
std::string offer_str;
desc->ToString(&offer_str);
@@ -195,7 +201,8 @@ void ConnectionController::OnCreateSDPSuccess(
reply["type"] = sdp_type;
reply["sdp"] = offer_str;
- sig_handler_.SendMessage(reply);
+ CF_EXPECT(sig_handler_.SendMessage(reply));
+ return {};
}
void ConnectionController::OnCreateSDPFailure(const webrtc::RTCError& error) {
@@ -395,7 +402,10 @@ void ConnectionController::OnIceCandidate(
reply["mLineIndex"] = static_cast<Json::UInt64>(line_index);
reply["candidate"] = candidate_sdp;
- sig_handler_.SendMessage(reply);
+ auto res = sig_handler_.SendMessage(reply);
+ if (!res.ok()) {
+ LOG(ERROR) << res.error().FormatForEnv();
+ }
}
// Gathering of an ICE candidate failed.
diff --git a/host/frontend/webrtc/libcommon/connection_controller.h b/host/frontend/webrtc/libcommon/connection_controller.h
index b03476480..d1700e619 100644
--- a/host/frontend/webrtc/libcommon/connection_controller.h
+++ b/host/frontend/webrtc/libcommon/connection_controller.h
@@ -155,7 +155,7 @@ class ConnectionController : public webrtc::PeerConnectionObserver {
rtc::scoped_refptr<webrtc::SetRemoteDescriptionObserverInterface>
ThisAsSetRemoteSDPObserver();
- void OnCreateSDPSuccess(webrtc::SessionDescriptionInterface* desc);
+ Result<void> OnCreateSDPSuccess(webrtc::SessionDescriptionInterface* desc);
void OnCreateSDPFailure(const webrtc::RTCError& error);
void OnSetLocalDescriptionSuccess();
void OnSetLocalDescriptionFailure(const webrtc::RTCError& error);
diff --git a/host/frontend/webrtc/libdevice/connection_observer.h b/host/frontend/webrtc/libdevice/connection_observer.h
index a55f4b3ec..7dfe072bb 100644
--- a/host/frontend/webrtc/libdevice/connection_observer.h
+++ b/host/frontend/webrtc/libdevice/connection_observer.h
@@ -20,6 +20,8 @@
#include <json/json.h>
+#include "common/libs/utils/result.h"
+
namespace cuttlefish {
namespace webrtc_streaming {
@@ -42,15 +44,16 @@ class ConnectionObserver {
virtual void OnConnected() = 0;
- virtual void OnTouchEvent(const std::string& device_label, int x, int y,
- bool down) = 0;
- virtual void OnMultiTouchEvent(const std::string& label, Json::Value id,
- Json::Value slot, Json::Value x, Json::Value y,
- bool down, int size) = 0;
+ virtual Result<void> OnTouchEvent(const std::string& device_label, int x,
+ int y, bool down) = 0;
+ virtual Result<void> OnMultiTouchEvent(const std::string& label,
+ Json::Value id, Json::Value slot,
+ Json::Value x, Json::Value y,
+ bool down, int size) = 0;
- virtual void OnKeyboardEvent(uint16_t keycode, bool down) = 0;
+ virtual Result<void> OnKeyboardEvent(uint16_t keycode, bool down) = 0;
- virtual void OnWheelEvent(int pixels) = 0;
+ virtual Result<void> OnWheelEvent(int pixels) = 0;
virtual void OnAdbChannelOpen(
std::function<bool(const uint8_t*, size_t)> adb_message_sender) = 0;
@@ -58,14 +61,14 @@ class ConnectionObserver {
virtual void OnControlChannelOpen(
std::function<bool(const Json::Value)> control_message_sender) = 0;
- virtual void OnLidStateChange(bool lid_open) = 0;
+ virtual Result<void> OnLidStateChange(bool lid_open) = 0;
virtual void OnHingeAngleChange(int hinge_angle) = 0;
- virtual void OnPowerButton(bool button_down) = 0;
- virtual void OnBackButton(bool button_down) = 0;
- virtual void OnHomeButton(bool button_down) = 0;
- virtual void OnMenuButton(bool button_down) = 0;
- virtual void OnVolumeDownButton(bool button_down) = 0;
- virtual void OnVolumeUpButton(bool button_down) = 0;
+ virtual Result<void> OnPowerButton(bool button_down) = 0;
+ virtual Result<void> OnBackButton(bool button_down) = 0;
+ virtual Result<void> OnHomeButton(bool button_down) = 0;
+ virtual Result<void> OnMenuButton(bool button_down) = 0;
+ virtual Result<void> OnVolumeDownButton(bool button_down) = 0;
+ virtual Result<void> OnVolumeUpButton(bool button_down) = 0;
virtual void OnCustomActionButton(const std::string& command,
const std::string& button_state) = 0;
diff --git a/host/frontend/webrtc/libdevice/data_channels.cpp b/host/frontend/webrtc/libdevice/data_channels.cpp
index 113013c39..9c459a542 100644
--- a/host/frontend/webrtc/libdevice/data_channels.cpp
+++ b/host/frontend/webrtc/libdevice/data_channels.cpp
@@ -41,7 +41,7 @@ class DataChannelHandler : public webrtc::DataChannelObserver {
virtual std::shared_ptr<ConnectionObserver> observer() = 0;
// Subclasses must override this to process messages.
- virtual void OnMessageInner(const webrtc::DataBuffer &msg) = 0;
+ virtual Result<void> OnMessageInner(const webrtc::DataBuffer &msg) = 0;
// Some subclasses may override this to defer some work until the channel is
// actually used.
virtual void OnFirstMessage() {}
@@ -77,60 +77,47 @@ static constexpr auto kCameraDataEof = "EOF";
class InputChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
- if (msg.binary) {
- // TODO (jemoreira) consider binary protocol to avoid JSON parsing
- // overhead
- LOG(ERROR) << "Received invalid (binary) data on input channel";
- return;
- }
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
+ // TODO: jemoreira - consider binary protocol to avoid JSON parsing
+ // overhead
+ CF_EXPECT(!msg.binary, "Received invalid (binary) data on input channel");
auto size = msg.size();
Json::Value evt;
Json::CharReaderBuilder builder;
std::unique_ptr<Json::CharReader> json_reader(builder.newCharReader());
- std::string errorMessage;
+ std::string error_message;
auto str = msg.data.cdata<char>();
- if (!json_reader->parse(str, str + size, &evt, &errorMessage)) {
- LOG(ERROR) << "Received invalid JSON object over input channel: "
- << errorMessage;
- return;
- }
- if (!evt.isMember("type") || !evt["type"].isString()) {
- LOG(ERROR) << "Input event doesn't have a valid 'type' field: "
- << evt.toStyledString();
- return;
- }
+ CF_EXPECTF(json_reader->parse(str, str + size, &evt, &error_message),
+ "Received invalid JSON object over control channel: '{}'",
+ error_message);
+
+ CF_EXPECTF(evt.isMember("type") && evt["type"].isString(),
+ "Input event doesn't have a valid 'type' field: ",
+ evt.toStyledString());
auto event_type = evt["type"].asString();
+
if (event_type == "mouse") {
- auto result =
- ValidateJsonObject(evt, "mouse",
- {{"down", Json::ValueType::intValue},
- {"x", Json::ValueType::intValue},
- {"y", Json::ValueType::intValue},
- {"display_label", Json::ValueType::stringValue}});
- if (!result.ok()) {
- LOG(ERROR) << result.error().FormatForEnv();
- return;
- }
+ CF_EXPECT(ValidateJsonObject(
+ evt, "mouse",
+ {{"down", Json::ValueType::intValue},
+ {"x", Json::ValueType::intValue},
+ {"y", Json::ValueType::intValue},
+ {"display_label", Json::ValueType::stringValue}}));
auto label = evt["device_label"].asString();
int32_t down = evt["down"].asInt();
int32_t x = evt["x"].asInt();
int32_t y = evt["y"].asInt();
- observer()->OnTouchEvent(label, x, y, down);
+ CF_EXPECT(observer()->OnTouchEvent(label, x, y, down));
} else if (event_type == "multi-touch") {
- auto result =
+ CF_EXPECT(
ValidateJsonObject(evt, "multi-touch",
{{"id", Json::ValueType::arrayValue},
{"down", Json::ValueType::intValue},
{"x", Json::ValueType::arrayValue},
{"y", Json::ValueType::arrayValue},
- {"device_label", Json::ValueType::stringValue}});
- if (!result.ok()) {
- LOG(ERROR) << result.error().FormatForEnv();
- return;
- }
+ {"device_label", Json::ValueType::stringValue}}));
auto label = evt["device_label"].asString();
auto idArr = evt["id"];
@@ -140,34 +127,25 @@ class InputChannelHandler : public DataChannelHandler {
auto slotArr = evt["slot"];
int size = evt["id"].size();
- observer()->OnMultiTouchEvent(label, idArr, slotArr, xArr, yArr, down,
- size);
+ CF_EXPECT(observer()->OnMultiTouchEvent(label, idArr, slotArr, xArr, yArr,
+ down, size));
} else if (event_type == "keyboard") {
- auto result =
+ CF_EXPECT(
ValidateJsonObject(evt, "keyboard",
{{"event_type", Json::ValueType::stringValue},
- {"keycode", Json::ValueType::stringValue}});
- if (!result.ok()) {
- LOG(ERROR) << result.error().FormatForEnv();
- return;
- }
+ {"keycode", Json::ValueType::stringValue}}));
auto down = evt["event_type"].asString() == std::string("keydown");
auto code = DomKeyCodeToLinux(evt["keycode"].asString());
- observer()->OnKeyboardEvent(code, down);
+ CF_EXPECT(observer()->OnKeyboardEvent(code, down));
} else if (event_type == "wheel") {
- auto result =
- ValidateJsonObject(evt, "wheel",
- {{"pixels", Json::ValueType::intValue}});
- if (!result.ok()) {
- LOG(ERROR) << result.error().FormatForEnv();
- return;
- }
- auto pixels = evt["pixels"].asInt();
- observer()->OnWheelEvent(pixels);
+ CF_EXPECT(ValidateJsonObject(evt, "wheel",
+ {{"pixels", Json::ValueType::intValue}}));
+ auto pixels = evt["pixels"].asInt();
+ CF_EXPECT(observer()->OnWheelEvent(pixels));
} else {
- LOG(ERROR) << "Unrecognized event type: " << event_type;
- return;
+ return CF_ERRF("Unrecognized event type: '{}'", event_type);
}
+ return {};
}
};
@@ -179,20 +157,19 @@ class ControlChannelHandler : public DataChannelHandler {
observer()->OnControlChannelOpen(GetJSONSender());
}
}
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
auto msg_str = msg.data.cdata<char>();
auto size = msg.size();
Json::Value evt;
Json::CharReaderBuilder builder;
std::unique_ptr<Json::CharReader> json_reader(builder.newCharReader());
- std::string errorMessage;
- if (!json_reader->parse(msg_str, msg_str + size, &evt, &errorMessage)) {
- LOG(ERROR) << "Received invalid JSON object over control channel: "
- << errorMessage;
- return;
- }
+ std::string error_message;
+ CF_EXPECTF(
+ json_reader->parse(msg_str, msg_str + size, &evt, &error_message),
+ "Received invalid JSON object over control channel: '{}'",
+ error_message);
- auto result = ValidateJsonObject(
+ CF_EXPECT(ValidateJsonObject(
evt, "command",
/*required_fields=*/{{"command", Json::ValueType::stringValue}},
/*optional_fields=*/
@@ -200,54 +177,53 @@ class ControlChannelHandler : public DataChannelHandler {
{"button_state", Json::ValueType::stringValue},
{"lid_switch_open", Json::ValueType::booleanValue},
{"hinge_angle_value", Json::ValueType::intValue},
- });
- if (!result.ok()) {
- LOG(ERROR) << result.error().FormatForEnv();
- return;
- }
+ }));
auto command = evt["command"].asString();
if (command == "device_state") {
if (evt.isMember("lid_switch_open")) {
- observer()->OnLidStateChange(evt["lid_switch_open"].asBool());
+ CF_EXPECT(
+ observer()->OnLidStateChange(evt["lid_switch_open"].asBool()));
}
if (evt.isMember("hinge_angle_value")) {
observer()->OnHingeAngleChange(evt["hinge_angle_value"].asInt());
}
- return;
+ return {};
} else if (command.rfind("camera_", 0) == 0) {
observer()->OnCameraControlMsg(evt);
- return;
+ return {};
} else if (command == "display") {
observer()->OnDisplayControlMsg(evt);
- return;
+ return {};
}
auto button_state = evt["button_state"].asString();
LOG(VERBOSE) << "Control command: " << command << " (" << button_state
<< ")";
if (command == "power") {
- observer()->OnPowerButton(button_state == "down");
+ CF_EXPECT(observer()->OnPowerButton(button_state == "down"));
} else if (command == "back") {
- observer()->OnBackButton(button_state == "down");
+ CF_EXPECT(observer()->OnBackButton(button_state == "down"));
} else if (command == "home") {
- observer()->OnHomeButton(button_state == "down");
+ CF_EXPECT(observer()->OnHomeButton(button_state == "down"));
} else if (command == "menu") {
- observer()->OnMenuButton(button_state == "down");
+ CF_EXPECT(observer()->OnMenuButton(button_state == "down"));
} else if (command == "volumedown") {
- observer()->OnVolumeDownButton(button_state == "down");
+ CF_EXPECT(observer()->OnVolumeDownButton(button_state == "down"));
} else if (command == "volumeup") {
- observer()->OnVolumeUpButton(button_state == "down");
+ CF_EXPECT(observer()->OnVolumeUpButton(button_state == "down"));
} else {
observer()->OnCustomActionButton(command, button_state);
}
+ return {};
}
};
class AdbChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
observer()->OnAdbMessage(msg.data.cdata(), msg.size());
+ return {};
}
void OnFirstMessage() override {
// Report the adb channel as open on the first message received instead of
@@ -259,8 +235,9 @@ class AdbChannelHandler : public DataChannelHandler {
class BluetoothChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
observer()->OnBluetoothMessage(msg.data.cdata(), msg.size());
+ return {};
}
void OnFirstMessage() override {
// Notify bluetooth channel opening when actually using the channel,
@@ -272,18 +249,19 @@ class BluetoothChannelHandler : public DataChannelHandler {
class CameraChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
auto msg_data = msg.data.cdata<char>();
if (msg.size() == strlen(kCameraDataEof) &&
!strncmp(msg_data, kCameraDataEof, msg.size())) {
// Send complete buffer to observer on EOF marker
observer()->OnCameraData(receive_buffer_);
receive_buffer_.clear();
- return;
+ return {};
}
// Otherwise buffer up data
receive_buffer_.insert(receive_buffer_.end(), msg_data,
msg_data + msg.size());
+ return {};
}
private:
@@ -294,12 +272,13 @@ class CameraChannelHandler : public DataChannelHandler {
class SensorsChannelHandler : public DataChannelHandler {
public:
void OnFirstMessage() override { observer()->OnSensorsChannelOpen(GetBinarySender()); }
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
if (!first_msg_received_) {
first_msg_received_ = true;
- return;
+ return {};
}
observer()->OnSensorsMessage(msg.data.cdata(), msg.size());
+ return {};
}
void OnStateChangeInner(webrtc::DataChannelInterface::DataState state) override {
@@ -315,7 +294,9 @@ class SensorsChannelHandler : public DataChannelHandler {
class LightsChannelHandler : public DataChannelHandler {
public:
// We do not expect any messages from the frontend.
- void OnMessageInner(const webrtc::DataBuffer &msg) override {}
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
+ return {};
+ }
void OnStateChangeInner(
webrtc::DataChannelInterface::DataState state) override {
@@ -329,8 +310,9 @@ class LightsChannelHandler : public DataChannelHandler {
class LocationChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
observer()->OnLocationMessage(msg.data.cdata(), msg.size());
+ return {};
}
void OnFirstMessage() override {
// Notify location channel opening when actually using the channel,
@@ -342,8 +324,9 @@ class LocationChannelHandler : public DataChannelHandler {
class KmlLocationChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
observer()->OnKmlLocationsMessage(msg.data.cdata(), msg.size());
+ return {};
}
void OnFirstMessage() override {
// Notify location channel opening when actually using the channel,
@@ -355,8 +338,9 @@ class KmlLocationChannelHandler : public DataChannelHandler {
class GpxLocationChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &msg) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &msg) override {
observer()->OnGpxLocationsMessage(msg.data.cdata(), msg.size());
+ return {};
}
void OnFirstMessage() override {
// Notify location channel opening when actually using the channel,
@@ -368,9 +352,10 @@ class GpxLocationChannelHandler : public DataChannelHandler {
class UnknownChannelHandler : public DataChannelHandler {
public:
- void OnMessageInner(const webrtc::DataBuffer &) override {
+ Result<void> OnMessageInner(const webrtc::DataBuffer &) override {
LOG(WARNING) << "Message received on unknown channel: "
<< channel()->label();
+ return {};
}
};
@@ -427,7 +412,10 @@ void DataChannelHandler::OnMessage(const webrtc::DataBuffer &msg) {
first_msg_received_ = true;
OnFirstMessage();
}
- OnMessageInner(msg);
+ auto res = OnMessageInner(msg);
+ if (!res.ok()) {
+ LOG(ERROR) << res.error().FormatForEnv();
+ }
}
DataChannelHandlers::DataChannelHandlers(
diff --git a/host/frontend/webrtc_operator/Readme.md b/host/frontend/webrtc_operator/Readme.md
index df8b03773..9dd22781b 100644
--- a/host/frontend/webrtc_operator/Readme.md
+++ b/host/frontend/webrtc_operator/Readme.md
@@ -15,7 +15,7 @@ The signaling server MUST expose two (different) websocket endpoints:
Additional endpoints are allowed and are up to the specific applications.
Extending the messages below with additional fields should be done with extreme
-care, prefixing the field names with an applciation specific word is strongly
+care, prefixing the field names with an application specific word is strongly
recommended. The same holds true for creating new message types.
Devices connect to the *register_device* endpoint and send these types of
diff --git a/host/frontend/webrtc_operator/assets/js/server_connector.js b/host/frontend/webrtc_operator/assets/js/server_connector.js
index 98b298741..29281ba7c 100644
--- a/host/frontend/webrtc_operator/assets/js/server_connector.js
+++ b/host/frontend/webrtc_operator/assets/js/server_connector.js
@@ -49,7 +49,7 @@ export async function createConnector() {
// A connector object provides high level functions for communicating with the
// signaling server, while hiding away implementation details.
-// This class is an interface and shouldn't be instantiated direclty.
+// This class is an interface and shouldn't be instantiated directly.
// Only the public methods present in this class form part of the Server
// Connector Interface, any implementations of the interface are considered
// internal and not accessible to client code.
diff --git a/host/frontend/webrtc_operator/client_handler.cpp b/host/frontend/webrtc_operator/client_handler.cpp
index a69241c3a..5cfd28ae0 100644
--- a/host/frontend/webrtc_operator/client_handler.cpp
+++ b/host/frontend/webrtc_operator/client_handler.cpp
@@ -110,7 +110,7 @@ void ClientWSHandler::handleConnectionRequest(const Json::Value& message) {
void ClientWSHandler::handleForward(const Json::Value& message) {
if (client_id_ == 0) {
- LogAndReplyError("Forward failed: No device asociated to client");
+ LogAndReplyError("Forward failed: No device associated to client");
Close();
return;
}
diff --git a/host/libs/command_util/snapshot_utils.cc b/host/libs/command_util/snapshot_utils.cc
index d22b7a9da..4161ee8a4 100644
--- a/host/libs/command_util/snapshot_utils.cc
+++ b/host/libs/command_util/snapshot_utils.cc
@@ -170,7 +170,7 @@ Result<void> CopyDirectoryRecursively(
src_dir_path);
if (verify_dest_dir_empty) {
CF_EXPECTF(!FileExists(dest_dir_path, /* follow symlink */ false),
- "Delete the destination directiory \"{}\" first", dest_dir_path);
+ "Delete the destination directory \"{}\" first", dest_dir_path);
}
std::string dest_final_target = RealpathOrSelf(dest_dir_path);
diff --git a/host/libs/config/config_utils.h b/host/libs/config/config_utils.h
index b5058bb18..aeb30f937 100644
--- a/host/libs/config/config_utils.h
+++ b/host/libs/config/config_utils.h
@@ -44,7 +44,7 @@ int ForCurrentInstance(int base);
int InstanceFromString(std::string instance_str);
-// Returns a random serial number appeneded to a given prefix.
+// Returns a random serial number appended to a given prefix.
std::string RandomSerialNumber(const std::string& prefix);
std::string DefaultHostArtifactsPath(const std::string& file);
diff --git a/host/libs/confui/host_renderer.cc b/host/libs/confui/host_renderer.cc
index c12ce27be..80441a532 100644
--- a/host/libs/confui/host_renderer.cc
+++ b/host/libs/confui/host_renderer.cc
@@ -86,7 +86,7 @@ class ConfUiRendererImpl {
auto box = e.bounds_;
Boundary b;
// (x,y) is left top. so floor() makes sense
- // w, h are witdh and height in float. perhaps ceiling makes more
+ // w, h are width and height in float. perhaps ceiling makes more
// sense
b.x = static_cast<std::uint32_t>(box.x().floor().count());
b.y = static_cast<std::uint32_t>(box.y().floor().count());
@@ -338,7 +338,7 @@ void ConfUiRendererImpl::UpdateColorScheme(const bool is_inverted) {
}
std::unique_ptr<TeeUiFrameWrapper>& ConfUiRendererImpl::RenderRawFrame() {
- /* we repaint only if one or more of the followng meet:
+ /* we repaint only if one or more of the following meet:
*
* 1. raw_frame_ is empty
* 2. the current_width_ and current_height_ is out of date
diff --git a/host/libs/confui/layouts/fonts.h b/host/libs/confui/layouts/fonts.h
index 1abfd259b..cdba8d0c4 100644
--- a/host/libs/confui/layouts/fonts.h
+++ b/host/libs/confui/layouts/fonts.h
@@ -23,7 +23,7 @@
* extern unsigned char <name>[];
* extern unsigned int <name>_length;
* The first one pointing to a raw ttf font file in the .rodata section, and the
- * second beeing the size of the buffer.
+ * second being the size of the buffer.
*/
TEEUI_INCFONT(RobotoMedium);
TEEUI_INCFONT(RobotoRegular);
diff --git a/host/libs/screen_connector/screen_connector_queue.h b/host/libs/screen_connector/screen_connector_queue.h
index 66fd7f7b2..af161eeeb 100644
--- a/host/libs/screen_connector/screen_connector_queue.h
+++ b/host/libs/screen_connector/screen_connector_queue.h
@@ -70,7 +70,7 @@ class ScreenConnectorQueue {
* much faster than the consumer, WebRTC consumes.
* Therefore, when the small buffer is full -- which means
* WebRTC would not call OnNextFrame --, the producer
- * should stop adding itmes to the queue.
+ * should stop adding items to the queue.
*
*/
void Push(T&& item) {
diff --git a/host/libs/vm_manager/crosvm_builder.cpp b/host/libs/vm_manager/crosvm_builder.cpp
index 4f51e331c..5e44a1673 100644
--- a/host/libs/vm_manager/crosvm_builder.cpp
+++ b/host/libs/vm_manager/crosvm_builder.cpp
@@ -70,19 +70,21 @@ void CrosvmBuilder::AddControlSocket(const std::string& control_socket,
command_.AddParameter("--socket=", control_socket);
}
+// TODO: b/243198718 - switch to virtio-console
void CrosvmBuilder::AddHvcSink() {
- command_.AddParameter("--serial=hardware=virtio-console,num=", ++hvc_num_,
- ",type=sink");
+ command_.AddParameter(
+ "--serial=hardware=legacy-virtio-console,num=", ++hvc_num_, ",type=sink");
}
void CrosvmBuilder::AddHvcReadOnly(const std::string& output, bool console) {
- command_.AddParameter("--serial=hardware=virtio-console,num=", ++hvc_num_,
- ",type=file,path=", output,
- console ? ",console=true" : "");
+ command_.AddParameter(
+ "--serial=hardware=legacy-virtio-console,num=", ++hvc_num_,
+ ",type=file,path=", output, console ? ",console=true" : "");
}
void CrosvmBuilder::AddHvcReadWrite(const std::string& output,
const std::string& input) {
- command_.AddParameter("--serial=hardware=virtio-console,num=", ++hvc_num_,
- ",type=file,path=", output, ",input=", input);
+ command_.AddParameter(
+ "--serial=hardware=legacy-virtio-console,num=", ++hvc_num_,
+ ",type=file,path=", output, ",input=", input);
}
void CrosvmBuilder::AddReadOnlyDisk(const std::string& path) {
diff --git a/host/libs/vm_manager/crosvm_manager.cpp b/host/libs/vm_manager/crosvm_manager.cpp
index 529a660cc..3eb51180e 100644
--- a/host/libs/vm_manager/crosvm_manager.cpp
+++ b/host/libs/vm_manager/crosvm_manager.cpp
@@ -62,7 +62,7 @@ CrosvmManager::ConfigureGraphics(
const CuttlefishConfig::InstanceSpecific& instance) {
// Override the default HAL search paths in all cases. We do this because
// the HAL search path allows for fallbacks, and fallbacks in conjunction
- // with properities lead to non-deterministic behavior while loading the
+ // with properties lead to non-deterministic behavior while loading the
// HALs.
std::unordered_map<std::string, std::string> bootconfig_args;
@@ -819,9 +819,18 @@ Result<std::vector<MonitorCommand>> CrosvmManager::StartCommands(
// This needs to be the last parameter
crosvm_cmd.Cmd().AddParameter("--bios=", instance.bootloader());
+ std::vector<MonitorCommand> commands;
+
+ if (vhost_user_gpu) {
+ // The vhost user gpu crosvm command should be added before the main
+ // crosvm command so that the main crosvm command can use a prerequisite
+ // to wait for the communication socket to be ready.
+ commands.emplace_back(std::move(vhost_user_gpu->device_cmd));
+ commands.emplace_back(std::move(vhost_user_gpu->device_logs_cmd));
+ }
+
// log_tee must be added before crosvm_cmd to ensure all of crosvm's logs are
// captured during shutdown. Processes are stopped in reverse order.
- std::vector<MonitorCommand> commands;
commands.emplace_back(std::move(crosvm_log_tee_cmd));
if (gpu_capture_enabled) {
@@ -878,11 +887,6 @@ Result<std::vector<MonitorCommand>> CrosvmManager::StartCommands(
commands.emplace_back(std::move(crosvm_cmd.Cmd()), true);
}
- if (vhost_user_gpu) {
- commands.emplace_back(std::move(vhost_user_gpu->device_cmd));
- commands.emplace_back(std::move(vhost_user_gpu->device_logs_cmd));
- }
-
return commands;
}
diff --git a/host/libs/vm_manager/gem5_manager.cpp b/host/libs/vm_manager/gem5_manager.cpp
index 79a5e4ba7..fb7f033e3 100644
--- a/host/libs/vm_manager/gem5_manager.cpp
+++ b/host/libs/vm_manager/gem5_manager.cpp
@@ -141,7 +141,7 @@ if __name__ == "__m5_main__":
void GenerateGem5File(const CuttlefishConfig& config,
const CuttlefishConfig::InstanceSpecific& instance) {
- // Gem5 specific config, currently users have to change these config locally (without throug launch_cvd input flag) to meet their design
+ // Gem5 specific config, currently users have to change these config locally (without through launch_cvd input flag) to meet their design
// TODO: Add these config into launch_cvd input flag or parse from one json file
std::string cpu_class = "AtomicSimpleCPU";
std::string l1_icache_class = "None";
@@ -216,7 +216,7 @@ Gem5Manager::ConfigureGraphics(
// Override the default HAL search paths in all cases. We do this because
// the HAL search path allows for fallbacks, and fallbacks in conjunction
- // with properities lead to non-deterministic behavior while loading the
+ // with properties lead to non-deterministic behavior while loading the
// HALs.
std::unordered_map<std::string, std::string> bootconfig_args;
diff --git a/host/libs/vm_manager/qemu_manager.cpp b/host/libs/vm_manager/qemu_manager.cpp
index 332023d77..ffd431d5e 100644
--- a/host/libs/vm_manager/qemu_manager.cpp
+++ b/host/libs/vm_manager/qemu_manager.cpp
@@ -119,7 +119,7 @@ QemuManager::ConfigureGraphics(
const CuttlefishConfig::InstanceSpecific& instance) {
// Override the default HAL search paths in all cases. We do this because
// the HAL search path allows for fallbacks, and fallbacks in conjunction
- // with properities lead to non-deterministic behavior while loading the
+ // with properties lead to non-deterministic behavior while loading the
// HALs.
std::unordered_map<std::string, std::string> bootconfig_args;
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index 01941bb4c..a6f46bfff 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -64,7 +64,7 @@ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
$(wildcard $(KERNEL_MODULES_PATH)/vsock.ko)
-# TODO(b/176860479) once virt_wifi is deprecated we can stop loading mac80211 in
+# TODO(b/294888357) once virt_wifi is deprecated we can stop loading mac80211 in
# first stage init. To minimize scope of modules options to first stage init,
# mac80211_hwsim.radios=0 has to be specified in the modules options file (which we
# only read in first stage) and mac80211_hwsim has to be loaded in first stage consequently..
diff --git a/shared/auto/audio_policy_configuration.xml b/shared/auto/audio_policy_configuration.xml
index 02a860a3f..73582c6aa 100644
--- a/shared/auto/audio_policy_configuration.xml
+++ b/shared/auto/audio_policy_configuration.xml
@@ -22,7 +22,7 @@
See also packages/services/Car/service/res/values/config.xml
-->
<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
- <!-- Global configuration Decalaration -->
+ <!-- Global configuration Declaration -->
<globalConfiguration speaker_drc_enabled="true"/>
<modules>
<module name="primary" halVersion="2.0">
diff --git a/shared/config/init.vendor.rc b/shared/config/init.vendor.rc
index 43a769d47..4925c5d39 100644
--- a/shared/config/init.vendor.rc
+++ b/shared/config/init.vendor.rc
@@ -63,7 +63,7 @@ on late-fs
write /dev/kmsg "GUEST_BUILD_FINGERPRINT: ${ro.build.fingerprint}"
-on post-fs-data && property:ro.vendor.wifi_impl=mac8011_hwsim_virtio
+on post-fs-data && property:ro.vendor.wifi_impl=mac80211_hwsim_virtio
mkdir /data/vendor/wifi 0770 wifi wifi
mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
mkdir /data/vendor/wifi/hostapd/sockets 0770 wifi wifi
diff --git a/shared/config/input/Crosvm_Virtio_Rotary_0.idc b/shared/config/input/Crosvm_Virtio_Rotary_0.idc
index a8434bc7d..bab037576 100644
--- a/shared/config/input/Crosvm_Virtio_Rotary_0.idc
+++ b/shared/config/input/Crosvm_Virtio_Rotary_0.idc
@@ -2,7 +2,7 @@
device.type = rotaryEncoder
# Should be (number of ticks in full rotation) / (2 PI).
-# Here, chosen arbirarily to be 360 / (2 PI)
+# Here, chosen arbitrarily to be 360 / (2 PI)
device.res = 57.295
device.scalingFactor = 0.0138
diff --git a/shared/device.mk b/shared/device.mk
index fdb2a0cb1..985334f07 100644
--- a/shared/device.mk
+++ b/shared/device.mk
@@ -40,7 +40,7 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish # for audio, wifi and sensor
PRODUCT_USE_DYNAMIC_PARTITIONS := true
DISABLE_RILD_OEM_HOOK := true
-# TODO(b/205788876) remove this condition when openwrt has an image for arm.
+# TODO(b/294888357) Remove this condition when OpenWRT is supported for RISC-V.
ifndef PRODUCT_ENFORCE_MAC80211_HWSIM
PRODUCT_ENFORCE_MAC80211_HWSIM := true
endif
@@ -82,6 +82,16 @@ ifeq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_PRODUCT_PROPERTIES += \
ro.adb.secure=0 \
ro.debuggable=1
+
+PRODUCT_PACKAGES += \
+ logpersist.start
+
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
+ $(TARGET_COPY_OUT_SYSTEM)/bin/logcatd \
+ $(TARGET_COPY_OUT_SYSTEM)/bin/logpersist.cat \
+ $(TARGET_COPY_OUT_SYSTEM)/bin/logpersist.start \
+ $(TARGET_COPY_OUT_SYSTEM)/bin/logpersist.stop \
+ $(TARGET_COPY_OUT_SYSTEM)/etc/init/logcatd.rc
endif
# Use AIDL for media.c2 HAL
@@ -534,7 +544,7 @@ PRODUCT_PACKAGES += \
CuttlefishWifiOverlay
ifeq ($(PRODUCT_ENFORCE_MAC80211_HWSIM),true)
-PRODUCT_VENDOR_PROPERTIES += ro.vendor.wifi_impl=mac8011_hwsim_virtio
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.wifi_impl=mac80211_hwsim_virtio
$(call soong_config_append,cvdhost,enforce_mac80211_hwsim,true)
else
PRODUCT_VENDOR_PROPERTIES += ro.vendor.wifi_impl=virt_wifi
diff --git a/shared/graphics/sepolicy/hal_graphics_composer_default.te b/shared/graphics/sepolicy/hal_graphics_composer_default.te
index 3f6292e22..643c2d9a4 100644
--- a/shared/graphics/sepolicy/hal_graphics_composer_default.te
+++ b/shared/graphics/sepolicy/hal_graphics_composer_default.te
@@ -7,6 +7,6 @@ allow hal_graphics_composer_default kmsg_device:chr_file w_file_perms;
allow hal_graphics_composer_default hal_graphics_mapper_service:service_manager find;
-# Supress warnings for drm_hwcomposer trying to read some vendor.hwc.*
+# Suppress warnings for drm_hwcomposer trying to read some vendor.hwc.*
# properties as Cuttlefish never configures these properties.
dontaudit hal_graphics_composer_default default_prop:file read; \ No newline at end of file
diff --git a/shared/minidroid/init.rc b/shared/minidroid/init.rc
index b7185a065..6e28c8911 100644
--- a/shared/minidroid/init.rc
+++ b/shared/minidroid/init.rc
@@ -40,7 +40,7 @@ on init
chmod 0666 /dev/binderfs/binder
chmod 0666 /dev/binderfs/vndbinder
- # create an empty ld.config.txt before running any non-static exectuables
+ # create an empty ld.config.txt before running any non-static executables
# (apexd and linkerconfig) to suppress "ld.config.txt not found" warnings.
write /linkerconfig/ld.config.txt \#
chmod 644 /linkerconfig/ld.config.txt
diff --git a/shared/pc/OWNERS b/shared/pc/OWNERS
index 62a733083..020394fe9 100644
--- a/shared/pc/OWNERS
+++ b/shared/pc/OWNERS
@@ -1,5 +1,5 @@
-# ARC++ next owners
+# ARC++ owners
hirono@google.com
+linben@google.com
liyingtan@google.com
-mdehaini@google.com
-xutan@google.com \ No newline at end of file
+shaochuan@google.com \ No newline at end of file
diff --git a/shared/sepolicy/system_ext/private/system_app.te b/shared/sepolicy/system_ext/private/system_app.te
index 326d9fd43..3a45a332f 100644
--- a/shared/sepolicy/system_ext/private/system_app.te
+++ b/shared/sepolicy/system_ext/private/system_app.te
@@ -1 +1,2 @@
get_prop(system_app, vendor_aware_available_prop)
+set_prop(system_app, logpersistd_logging_prop)
diff --git a/shared/sepolicy/vendor/bug_map b/shared/sepolicy/vendor/bug_map
index 8a616df25..33a4601aa 100644
--- a/shared/sepolicy/vendor/bug_map
+++ b/shared/sepolicy/vendor/bug_map
@@ -5,3 +5,5 @@ rs privapp_data_file file b/291029681
rs priv_app unix_stream_socket b/291029681
rs priv_app udp_socket b/291029681
mediashell_app rootfs dir b/293075059
+init debugfs_bootreceiver_tracing dir b/340399580
+init debugfs_wifi_tracing dir b/340399580
diff --git a/shared/sepolicy/vendor/metrics_helper.te b/shared/sepolicy/vendor/metrics_helper.te
index eb608ed29..a2c06caab 100644
--- a/shared/sepolicy/vendor/metrics_helper.te
+++ b/shared/sepolicy/vendor/metrics_helper.te
@@ -5,7 +5,7 @@ init_daemon_domain(metrics_helper)
# set sys.powerctl
# TODO(b/241398817) powerctl_prop is probably not the best domain for this
-# purpose. Keep it as a workaroung and check later if it's worth creating a new
+# purpose. Keep it as a workaround and check later if it's worth creating a new
# one.
set_prop(metrics_helper, powerctl_prop)
diff --git a/system_image/Android.bp b/system_image/Android.bp
index c8347dd71..8252664a9 100644
--- a/system_image/Android.bp
+++ b/system_image/Android.bp
@@ -56,10 +56,6 @@ android_symlinks = [
target: "/system_dlkm/lib/modules",
name: "system/lib/modules",
},
- {
- target: "/apex/com.android.tethering/bin/ethtool",
- name: "system/bin/ethtool",
- },
]
phony {
@@ -298,6 +294,7 @@ android_system_image {
libs: [":framework-res{.export-package.apk}"],
},
build_logtags: true,
+ gen_aconfig_flags_pb: true,
use_avb: true,
avb_private_key: ":microdroid_sign_key",
@@ -305,6 +302,15 @@ android_system_image {
avb_hash_algorithm: "sha256",
deps: [
+ "android.hardware.biometrics.fingerprint@2.1", // generic_system
+ "android.hardware.radio@1.0", // generic_system
+ "android.hardware.radio@1.1", // generic_system
+ "android.hardware.radio@1.2", // generic_system
+ "android.hardware.radio@1.3", // generic_system
+ "android.hardware.radio@1.4", // generic_system
+ "android.hardware.radio.config@1.0", // generic_system
+ "android.hardware.radio.deprecated@1.0", // generic_system
+ "android.hardware.secure_element@1.0", // generic_system
"abx",
"aconfigd",
"aflags",
@@ -333,13 +339,11 @@ android_system_image {
"cgroups.json",
"cmd",
"content",
- "cppreopts.sh",
+ "cppreopts.sh", // generic_system
"credstore",
"debuggerd",
"device_config",
"dirty-image-objects",
- "dlkm_loader",
- "dmabuf_dump",
"dmctl",
"dmesgd",
"dnsmasq",
@@ -347,21 +351,17 @@ android_system_image {
"dump.erofs",
"dumpstate",
"dumpsys",
- "e2freefrag",
"e2fsck",
- "e2fsdroid",
"etc_hosts",
- "extra_free_kbytes",
- "fastbootd",
"flags_health_check",
- "framework-audio_effects.xml",
+ "framework-audio_effects.xml", // for handheld // handheld_system
"framework-sysconfig.xml",
"fsck_msdos",
"fsck.erofs",
- "fsck.f2fs",
- "fstab.postinstall",
- "fsverity_init",
+ "fsck.f2fs", // for media_system
"fsverity-release-cert-der",
+ "fs_config_files_system",
+ "fs_config_dirs_system",
"gatekeeperd",
"gpu_counter_producer",
"gpuservice",
@@ -371,9 +371,7 @@ android_system_image {
"heapprofd_client",
"heapprofd",
"hid",
- "hiddenapi-package-whitelist.xml",
- "hidl_lazy_cb_test_server",
- "hidl_lazy_test_server",
+ "hiddenapi-package-whitelist.xml", // from runtime_libart
"idc_data",
"idmap2",
"idmap2d",
@@ -382,25 +380,21 @@ android_system_image {
"incident-helper-cmd",
"incident",
"incidentd",
- "init_first_stage",
- "init.boringssl.zygote64_32.rc",
- "init.boringssl.zygote64.rc",
- "init.rc",
+ "init_first_stage", // for boot partition
+ // "init.environ.rc", // TODO: move to soong
"init.usb.configfs.rc",
"init.usb.rc",
"init.zygote32.rc",
"init.zygote64_32.rc",
"init.zygote64.rc",
- "initial-package-stopped-states-aosp.xml",
"initial-package-stopped-states.xml",
"input",
"installd",
- "ip",
+ "ip", // base_system
"iptables",
"kcmdlinectrl",
"keychars_data",
"keylayout_data",
- "keystore_cli_v2",
"keystore2",
"ld.mc",
"libaaudio",
@@ -411,418 +405,284 @@ android_system_image {
"libandroid",
"libandroidfw",
"libartpalette-system",
- "libasyncio",
- "libaudio-resampler",
+ "libaudio-resampler", // generic-system
"libaudioeffect_jni",
- "libaudiohal_deathhandler",
- "libaudiohal",
- "libaudiopolicyengineconfigurable",
- "libaudiopreprocessing",
- "libaudioutils",
+ "libaudiohal", // generic-system
+ "libaudiopolicyengineconfigurable", // generic-system
"libbinder_ndk",
"libbinder_rpc_unstable",
"libbinder",
- "libblas",
- "libbootloader_message",
- "libbundlewrapper",
"libcamera2ndk",
"libclang_rt.asan",
- "libclcore_debug_g.bc",
- "libclcore_debug.bc",
- "libclcore_g.bc",
- "libclcore.bc",
- "libclearkeycasplugin",
"libcompiler_rt",
- "libcrypto_utils",
- "libcups",
- "libcutils",
- "libdmabufheap",
- "libdownmix",
- "libdrm",
- "libdrmclearkeyplugin",
- "libdrmframework_jni",
- "libdrmframework",
- "libdynproc",
- "libeffectproxy",
- "libeffects",
- "libeffectsconfig",
- "libEGL_angle",
- "libEGL",
- "libepoxy",
- "libETC1",
- "libext4_utils",
- "libfdtrack",
- "libfec",
- "libFFTEm",
- "libfilterfw",
- "libfilterpack_imageproc",
- "libfmq",
- "libfs_mgr",
- "libfwdlockengine",
- "libgatekeeper",
- "libgbm",
- "libGLESv1_CM_angle",
- "libGLESv1_CM",
- "libGLESv2_angle",
- "libGLESv2",
- "libGLESv3",
- "libgralloctypes",
- "libgsi",
- "libgui",
- "libhapticgenerator",
- "libhardware_legacy",
- "libhardware",
- "libhidcommand_jni",
- "libhidlmemory",
- "libhidltransport",
- "libhwbinder",
- "libincident",
- "libinput",
- "libinputflinger",
- "libiprouteutil",
- "libjni_deviceAsWebcam",
- "libjnigraphics",
- "libjpeg",
- "libldnhncr",
- "liblockagent",
- "liblog",
- "liblogwrap",
- "liblp",
- "liblz4",
- "libmedia_helper",
- "libmedia_jni",
- "libmedia",
- "libmediandk",
- "libmediaplayerservice",
- "libmediautils_delayed",
- "libminui",
- "libmtp",
- "libnativewindow",
- "libnetd_client",
- "libnetlink",
- "libnetutils",
- "libneuralnetworks_packageinfo",
- "libnl",
- "libOpenMAXAL",
- "libOpenSLES",
- "libpdfium",
- "libperfetto_android_internal",
- "libpolicy-subsystem",
- "libpower",
- "libpowermanager",
- "libprocessgroup_setup",
- "libprotobuf-cpp-full",
- "libradio_metadata",
- "librank",
- "libresourcemanagerservice",
- "libreverbwrapper",
- "libRS_internal",
- "librs_jni",
- "libRSCacheDir",
- "libRSCpuRef",
- "libRSDriver",
- "librtp_jni",
- "libsensorservice",
- "libsfplugin_ccodec",
- "libskia",
- "libsonic",
- "libsonivox",
- "libsoundpool",
- "libspeexresampler",
- "libsqlite",
- "libsquashfs_utils",
- "libssl",
- "libstagefright_foundation",
- "libstagefright_httplive",
- "libstagefright_omx",
- "libstagefright",
- "libstdc++",
- "libsync",
- "libsysutils",
- "libtinyxml2",
- "libtombstoned_client",
- "libtracingproxy",
- "libui",
- "libuinputcommand_jni",
- "libukey2_jni_shared",
- "libusbhost",
- "libutils",
- "libvendorsupport",
- "libvintf_jni",
- "libvirglrenderer",
- "libvisualizer",
- "libvulkan",
- "libwebviewchromium_loader",
- "libwebviewchromium_plat_support",
- "libwfds",
- "libwilhelm",
- "libxml2",
- "libxml2",
- "linker",
- "llkd",
- "lmkd",
- "local_time.default",
- "lockagent_crasher",
- "locksettings",
- "logcat",
- "logcatd",
- "logd",
- "lpdump",
- "lpdumpd",
- "lshal",
- "make_f2fs",
- "mdnsd",
- "media_profiles_V1_0.dtd",
- "mediacodec.policy",
- "mediaextractor",
- "mediametrics",
- "migrate_legacy_obb_data",
- "misctrl",
- "mke2fs",
- "mkfs.erofs",
- "mm_events",
- "monkey",
- "mtectrl",
- "ndc",
- "netd",
- "netutils-wrapper-1.0",
- "odsign",
- "otapreopt_chroot",
- "otapreopt_script",
- "otapreopt_slot",
- "otapreopt",
- "passwd_system",
- "perfetto",
- "ping",
- "ping6",
- "pintool",
- "platform.xml",
- "pm",
- "power.default",
- "preinstalled-packages-asl-files.xml",
- "preinstalled-packages-platform-generic-system.xml",
- "preinstalled-packages-platform-handheld-system.xml",
- "preinstalled-packages-platform.xml",
- "preinstalled-packages-strict-signature.xml",
- "preloaded-classes",
- "preloads_copy.sh",
- "preloads_copy.sh",
- "preopt2cachename",
- "preopt2cachename",
- "printflags",
- "privapp-permissions-platform.xml",
- "prng_seeder",
- "recovery-persist",
- "recovery-refresh",
- "requestsync",
- "resize2fs",
- "rss_hwm_reset",
- "run-as",
- "sample_camera_extensions.xml",
- "schedtest",
- "screencap",
- "screenrecord",
- "sdcard",
- "secdiscard",
- "sensorservice",
- "server_configurable_flags",
- "service",
- "servicemanager",
- "settings",
- "sfdo",
- "sgdisk",
- "sload_f2fs",
- "sm",
- "snapshotctl",
- "snapuserd_ramdisk",
- "snapuserd",
- "socket_vsock_proxy",
- "storaged",
- "surfaceflinger",
- "suspend_blocker",
- "svc",
- "task_profiles.json",
- "tc",
- "telecom",
- "tombstone_producer",
- "tombstone_transmit",
- "tombstoned",
- "toolbox",
- "traced_perf",
- "traced_probes",
- "traced",
- "trigger_perfetto",
- "tune2fs",
- "ueventd.rc",
- "uiautomator",
- "uinput",
- "uncrypt",
- "update_engine_sideload",
- "update_engine",
- "update_verifier",
- "usbd",
- "vdc",
- "vibrator.default",
- "virtual_camera",
- "vold_prepare_subdirs",
- "vold",
- "vr",
- "watchdogd",
- "wifi.rc",
- "wificond",
- "wm",
- "xtables.lock",
+ "libcutils", // used by many libs
+ "libdmabufheap", // used by many libs
+ "libdrm", // used by many libs // generic_system
+ "libdrmframework_jni", // base_system
+ "libdrmframework", // base_system
+ "libEGL_angle", // base_system
+ "libEGL", // base_system
+ "libETC1", // base_system
+ "libfdtrack", // base_system
+ "libFFTEm", // base_system
+ "libfilterfw", // base_system
+ "libfilterpack_imageproc", // media_system
+ "libfwdlockengine", // generic_system
+ "libgatekeeper", // base_system
+ "libGLESv1_CM_angle", // base_system
+ "libGLESv1_CM", // base_system
+ "libGLESv2_angle", // base_system
+ "libGLESv2", // base_system
+ "libGLESv3", // base_system
+ "libgui", // base_system
+ "libhardware_legacy", // base_system
+ "libhardware", // base_system
+ "libhidltransport", // generic_system
+ "libhwbinder", // generic_system
+ "libinput", // base_system
+ "libinputflinger", // base_system
+ "libiprouteutil", // base_system
+ "libjnigraphics", // base_system
+ "libjpeg", // base_system
+ "liblog", // base_system
+ "liblogwrap", // generic_system
+ "liblz4", // generic_system
+ "libmedia_jni", // base_system
+ "libmedia", // base_system
+ "libmediandk", // base_system
+ "libminui", // generic_system
+ "libmtp", // base_system
+ "libnetd_client", // base_system
+ "libnetlink", // base_system
+ "libnetutils", // base_system
+ "libneuralnetworks_packageinfo", // base_system
+ "libnl", // generic_system
+ "libOpenMAXAL", // base_system
+ "libOpenSLES", // base_system
+ "libpdfium", // base_system
+ "libpolicy-subsystem", // generic_system
+ "libpower", // base_system
+ "libpowermanager", // base_system
+ "libprotobuf-cpp-full", // generic_system
+ "libradio_metadata", // base_system
+ "librs_jni", // handheld_system
+ "librtp_jni", // base_system
+ "libsensorservice", // base_system
+ "libsfplugin_ccodec", // base_system
+ "libskia", // base_system
+ "libsonic", // base_system
+ "libsonivox", // base_system
+ "libsoundpool", // base_system
+ "libspeexresampler", // base_system
+ "libsqlite", // base_system
+ "libstagefright_foundation", // base_system
+ "libstagefright_omx", // base_system
+ "libstagefright", // base_system
+ "libstdc++", // base_system
+ "libsysutils", // base_system
+ "libui", // base_system
+ "libusbhost", // base_system
+ "libutils", // base_system
+ "libvintf_jni", // base_system
+ "libvulkan", // base_system
+ "libwebviewchromium_loader", // media_system
+ "libwebviewchromium_plat_support", // media_system
+ "libwilhelm", // base_system
+ "linker", // ok
+ "llkd", // base_system
+ "lmkd", // base_system
+ "local_time.default", // handheld_vendo
+ "locksettings", // base_system
+ "logcat", // base_system
+ "logd", // base_system
+ "lpdump", // base_system
+ "lshal", // base_system
+ "make_f2fs", // media_system
+ "mdnsd", // base_system
+ "media_profiles_V1_0.dtd", // base_system
+ "mediacodec.policy", // base_system
+ "mediaextractor", // base_system
+ "mediametrics", // base_system
+ "misctrl", // from base_system
+ "mke2fs", // base_system
+ "mkfs.erofs", // base_system
+ "monkey", // base_system
+ "mtectrl", // base_system
+ "ndc", // base_system
+ "netd", // base_system
+ "netutils-wrapper-1.0", // full_base
+ "odsign", // base_system
+ "otapreopt_script", // generic_system
+ "passwd_system", // base_system
+ "perfetto", // base_system
+ "ping", // base_system
+ "ping6", // base_system
+ "pintool", // base_system
+ "platform.xml", // base_system
+ "pm", // base_system
+ "preinstalled-packages-asl-files.xml", // base_system
+ "preinstalled-packages-platform-generic-system.xml", // generic_system
+ "preinstalled-packages-platform-handheld-system.xml", // handheld_system
+ "preinstalled-packages-platform.xml", // base_system
+ "preinstalled-packages-strict-signature.xml", // base_system
+ "preloaded-classes", // ok
+ "printflags", // base_system
+ "privapp-permissions-platform.xml", // base_system
+ "prng_seeder", // base_system
+ "recovery-persist", // base_system
+ "recovery-refresh", // generic_system
+ "requestsync", // media_system
+ "resize2fs", // base_system
+ "rss_hwm_reset", // base_system
+ "run-as", // base_system
+ "schedtest", // base_system
+ "screencap", // base_system
+ "screenrecord", // handheld_system
+ "sdcard", // base_system
+ "secdiscard", // base_system
+ "sensorservice", // base_system
+ "service", // base_system
+ "servicemanager", // base_system
+ "settings", // base_system
+ "sfdo", // base_system
+ "sgdisk", // base_system
+ "sm", // base_system
+ "snapshotctl", // base_system
+ "snapuserd_ramdisk", // ramdisk
+ "snapuserd", // base_system
+ "storaged", // base_system
+ "surfaceflinger", // base_system
+ "svc", // base_system
+ "task_profiles.json", // base_system
+ "tc", // base_system
+ "telecom", // base_system
+ "tombstoned", // base_system
+ "traced_probes", // base_system
+ "traced", // base_system
+ "tune2fs", // base_system
+ "uiautomator", // base_system
+ "uinput", // base_system
+ "uncrypt", // base_system
+ "update_engine_sideload", // recovery
+ "update_engine", // generic_system
+ "update_verifier", // generic_system
+ "usbd", // base_system
+ "vdc", // base_system
+ "virtual_camera", // handheld_system // release_package_virtual_camera
+ "vold", // base_system
+ "vr", // handheld_system
+ "watchdogd", // base_system
+ "wifi.rc", // base_system
+ "wificond", // base_system
+ "wm", // base_system
],
multilib: {
common: {
deps: [
- "AccessibilityMenu",
- "adbd_system_api",
- "android.hardware.drm@latest-service.clearkey",
- "android.hidl.base-V1.0-java",
- "android.hidl.manager-V1.0-java",
- "android.test.base",
- "android.test.mock",
- "android.test.runner",
- "androidx.camera.extensions.impl",
- "androidx.window.extensions",
- "androidx.window.sidecar",
- "aosp_mainline_modules",
- "BackupRestoreConfirmation",
- "BasicDreams",
- "BlockedNumberProvider",
- "BluetoothMidiService",
- "BookmarkProvider",
- "bpfMemEvents.o",
- "bpfMemEventsTest.o",
- "bpfRingbufProg.o",
- "Browser2",
- "BuiltInPrintService",
- "Calendar",
- "CalendarProvider",
- "CallLogBackup",
- "Camera2",
- "CameraExtensionsProxy",
- "CaptivePortalLogin",
- "CarrierConfig",
- "CarrierDefaultApp",
- "CellBroadcastLegacyApp",
- "CertInstaller",
- "CFSatelliteService",
- "charger_res_images",
- "com.android.apex.cts.shim.v1_prebuilt",
- "com.android.cellbroadcast",
- "com.android.compos",
- "com.android.future.usb.accessory",
- "com.android.location.provider",
- "com.android.media.remotedisplay.xml",
- "com.android.media.remotedisplay",
- "com.android.mediadrm.signer",
- "com.android.nfc_extras",
- "com.android.runtime",
- "CompanionDeviceManager",
- "Contacts",
- "ContactsProvider",
- "CredentialManager",
- "CuttlefishService",
- "CuttlefishTetheringOverlay",
- "CuttlefishWifiOverlay",
- "DeskClock",
- "DeviceAsWebcam",
- "DocumentsUI",
- "DownloadProvider",
- "DownloadProviderUi",
- "DynamicSystemInstallationService",
- "EasterEgg",
- "EmergencyInfo",
- "ext",
- "ExternalStorageProvider",
- "ExtShared",
- "fonts",
- "framework-graphics",
- "framework-location",
- "framework-minus-apex-install-dependencies",
- "framework-nfc",
- "framework-res",
- "FusedLocation",
- "fuseMedia.o",
- "Gallery2",
- "gpuMem.o",
- "gpuWork.o",
- "HTMLViewer",
- "hwservicemanager_compat_symlink_module",
- "ims-common",
- "ImsServiceEntitlement",
- "init_system",
- "InputDevices",
- "IntentResolver",
- "javax.obex",
- "KeyChain",
- "LatinIME",
- "Launcher3QuickStep",
- "LiveWallpapersPicker",
- "llndk.libraries.txt",
- "LocalTransport",
- "lockagent",
- "ManagedProvisioning",
- "MediaProviderLegacy",
- "messaging",
- "MmsService",
- "ModuleMetadata",
- "MtpService",
- "Music",
- "MusicFX",
- "NetworkStack",
- "NfcNci",
- "ONS",
- "org.apache.http.legacy",
- "PackageInstaller",
- "PacProcessor",
- "PartnerBookmarksProvider",
- "PhotoTable",
- "platform-bootclasspath",
- "platform-systemserverclasspath",
- "PrintRecommendationService",
- "PrintSpooler",
- "Provision",
- "ProxyHandler",
- "QualifiedNetworksService",
- "QuickSearchBox",
- "SecureElement",
- "selinux_policy_system_soong",
- "services",
- "Settings",
- "SettingsIntelligence",
- "SettingsProvider",
- "SharedStorageBackup",
- "shell_and_utilities_system",
- "Shell",
- "SimAppDialog",
- "SoundPicker",
- "StatementService",
- "Stk",
- "StorageManager",
- "SystemUI",
- "Tag",
- "Telecom",
- "telephony-common",
- "TelephonyProvider",
- "TeleService",
- "timeInState.o",
- "Traceur",
- "UserDictionaryProvider",
- "voip-common",
- "VpnDialogs",
- "WallpaperBackup",
- "WallpaperCropper",
- "webview",
+ "adbd_system_api", // base_system
+ "android.hidl.base-V1.0-java", // base_system
+ "android.hidl.manager-V1.0-java", // base_system
+ "android.test.base", // from runtime_libart
+ "android.test.mock", // base_system
+ "android.test.runner", // base_system
+ "aosp_mainline_modules", // ok
+ "BackupRestoreConfirmation", // base_system
+ "BasicDreams", // handheld_system
+ "BlockedNumberProvider", // handheld_system
+ "BluetoothMidiService", // handheld_system
+ "BookmarkProvider", // handheld_system
+ "BuiltInPrintService", // handheld_system
+ "CalendarProvider", // handheld_system
+ "CallLogBackup", // telephony_system
+ "CameraExtensionsProxy", // handheld_system
+ "CaptivePortalLogin", // handheld_system
+ "CarrierDefaultApp", // telephony_system
+ "CellBroadcastLegacyApp", // telephony_system
+ "CertInstaller", // handheld_system
+ "charger_res_images", // generic_system
+ "com.android.apex.cts.shim.v1_prebuilt", // ok
+ "com.android.cellbroadcast", // telephony_system
+ "com.android.future.usb.accessory", // media_system
+ "com.android.location.provider", // base_system
+ "com.android.media.remotedisplay.xml", // media_system
+ "com.android.media.remotedisplay", // media_system
+ "com.android.mediadrm.signer", // media_system
+ "com.android.nfc_extras", // ok
+ "com.android.runtime", // ok
+ "CompanionDeviceManager", // media_system
+ "ContactsProvider", // base_system
+ "CredentialManager", // handheld_system
+ "DeviceAsWebcam", // handheld_system
+ "DocumentsUI", // handheld_system
+ "DownloadProvider", // base_system
+ "DownloadProviderUi", // handheld_system
+ "DynamicSystemInstallationService", // base_system
+ "EasterEgg", // handheld_system
+ "ext", // from runtime_libart
+ "ExternalStorageProvider", // handheld_system
+ "ExtShared", // base_system
+ "fonts", // ok
+ "framework-graphics", // base_system
+ "framework-location", // base_system
+ "framework-minus-apex-install-dependencies", // base_system
+ "framework-nfc", // base_system
+ "FusedLocation", // handheld_system
+ "HTMLViewer", // media_system
+ "hwservicemanager_compat_symlink_module", // base_system
+ "ims-common", // base_system
+ "init_system", // base_system
+ "InputDevices", // handheld_system
+ "IntentResolver", // base_system
+ "javax.obex", // base_system
+ "KeyChain", // handheld_system
+ "LiveWallpapersPicker", // generic_system, full_base
+ "llndk.libraries.txt", //ok
+ "LocalTransport", // base_system
+ "ManagedProvisioning", // handheld_system
+ "MediaProviderLegacy", // base_system
+ "MmsService", // handheld_system
+ "MtpService", // handheld_system
+ "MusicFX", // handheld_system
+ "NetworkStack", // base_system
+ "NfcNci", // base_system
+ "ONS", // telephony_system
+ "org.apache.http.legacy", // base_system
+ "perfetto-extras", // system
+ "PackageInstaller", // base_system
+ "PacProcessor", // handheld_system
+ "PartnerBookmarksProvider", // generic_system
+ "PhotoTable", // full_base
+ "PrintRecommendationService", // handheld_system
+ "PrintSpooler", // handheld_system
+ "ProxyHandler", // handheld_system
+ "SecureElement", // handheld_system
+ "selinux_policy_system_soong", // ok
+ "services", // base_system
+ "SettingsProvider", // base_system
+ "SharedStorageBackup", // handheld_system
+ "shell_and_utilities_system", // ok
+ "Shell", // base_system
+ "SimAppDialog", // handheld_system
+ "SoundPicker", // not installed by anyone
+ "StatementService", // media_system
+ "Stk", // generic_system
+ "Tag", // generic_system
+ "Telecom", // handheld_system
+ "telephony-common", // libs from TeleService
+ "TelephonyProvider", // handheld_system
+ "TeleService", // handheld_system
+ "Traceur", // handheld_system
+ "UserDictionaryProvider", // handheld_system
+ "voip-common", // base_system
+ "VpnDialogs", // handheld_system
+ "WallpaperBackup", // base_system
],
},
lib32: {
deps: [
"android.hardware.audio.service",
- "drmserver",
- "mediaserver",
+ "drmserver", // media_system
+ "mediaserver", // base_system
],
},
lib64: {
@@ -868,7 +728,7 @@ android_system_image {
"tinyhostless",
"tinymix",
"tinypcminfo",
- "tinyplay",
+ "tinyplay", // host
"tracepath",
"tracepath6",
"traceroute6",
diff --git a/tests/powerwash/src/com/android/cuttlefish/tests/PowerwashTest.java b/tests/powerwash/src/com/android/cuttlefish/tests/PowerwashTest.java
index b91aa8a24..87b7e48a5 100644
--- a/tests/powerwash/src/com/android/cuttlefish/tests/PowerwashTest.java
+++ b/tests/powerwash/src/com/android/cuttlefish/tests/PowerwashTest.java
@@ -67,7 +67,7 @@ public class PowerwashTest extends BaseHostJUnit4Test {
final String tmpFile = "/data/local/tmp/powerwash_tmp";
getDevice().executeShellCommand("touch " + tmpFile);
- // Reboot the device to make sure the file persits.
+ // Reboot the device to make sure the file persists.
getDevice().reboot();
File file = getDevice().pullFile(tmpFile);
if (file == null) {
@@ -87,7 +87,7 @@ public class PowerwashTest extends BaseHostJUnit4Test {
} catch (DeviceNotAvailableException e) {
CLog.e(e);
}
- assertTrue(String.format("Powerwash reset failed during attemt #%d", i), success);
+ assertTrue(String.format("Powerwash reset failed during attempt #%d", i), success);
long duration = System.currentTimeMillis() - start;
CLog.d("Powerwash took %dms to finish", duration);
}
diff --git a/tests/snapshot/src/com/android/cuttlefish/tests/SnapshotTest.java b/tests/snapshot/src/com/android/cuttlefish/tests/SnapshotTest.java
index d1e071c4f..ef8c06963 100644
--- a/tests/snapshot/src/com/android/cuttlefish/tests/SnapshotTest.java
+++ b/tests/snapshot/src/com/android/cuttlefish/tests/SnapshotTest.java
@@ -62,7 +62,7 @@ public class SnapshotTest extends BaseHostJUnit4Test {
final String tmpFile = "/data/local/tmp/snapshot_tmp";
getDevice().executeShellCommand("touch " + tmpFile);
- // Reboot the device to make sure the file persits.
+ // Reboot the device to make sure the file persists.
getDevice().reboot();
File file = getDevice().pullFile(tmpFile);
if (file == null) {
diff --git a/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java b/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java
index 6be6cf417..a541e0874 100644
--- a/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java
+++ b/tests/src/com/android/tests/tombstoneTransmit/TombstoneTransmitTest.java
@@ -52,7 +52,7 @@ public class TombstoneTransmitTest extends BaseHostJUnit4Test {
private static final int NUM_TOMBSTONES_IN_TEST = 1000;
/**
- * Creates 15 tombstones on the virtual device of varying lenghts.
+ * Creates 15 tombstones on the virtual device of varying lengths.
* Each tombstone is expected to be sync'd to the host and checked for integrity.
*/
@Test
diff --git a/tools/codespell-ignore.txt b/tools/codespell-ignore.txt
new file mode 100644
index 000000000..f0f93e25a
--- /dev/null
+++ b/tools/codespell-ignore.txt
@@ -0,0 +1,11 @@
+crate
+ser
+te
+als
+kno
+adn
+bu
+cros
+helpfull
+ue
+ons
diff --git a/tools/codespell.sh b/tools/codespell.sh
new file mode 100755
index 000000000..79ae45242
--- /dev/null
+++ b/tools/codespell.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+cd "$(dirname "$0")"
+cd ..
+
+codespell --skip=tools/codespell-ignore.txt -I tools/codespell-ignore.txt -w -i 3
diff --git a/tools/copyright_bot/copyright_fixer.sh b/tools/copyright_bot/copyright_fixer.sh
index ae420b985..91e041d9a 100755
--- a/tools/copyright_bot/copyright_fixer.sh
+++ b/tools/copyright_bot/copyright_fixer.sh
@@ -28,7 +28,7 @@ for file_name in $all_file_names
do
#extract file creation date
creation_date=`git log --follow --format=%as --date default $file_name | tail -1`
- # extract file creation year fron the date
+ # extract file creation year from the date
year=`echo $creation_date | awk -F\- '{print $1}'`
echo $file_name $year
diff --git a/tools/create_base_image_gce.sh b/tools/create_base_image_gce.sh
index b7a43d0d1..ba189cd46 100755
--- a/tools/create_base_image_gce.sh
+++ b/tools/create_base_image_gce.sh
@@ -115,7 +115,7 @@ sudo rm /mnt/image/install_nvidia.sh
# Vulkan loader
sudo chroot /mnt/image /usr/bin/apt install -y libvulkan1 -t bullseye-backports
-# Wayland-server needed to have Nvidia driver fail gracefully when attemping to
+# Wayland-server needed to have Nvidia driver fail gracefully when attempting to
# use the EGL API on GCE instances without a GPU.
sudo chroot /mnt/image /usr/bin/apt install -y libwayland-server0 -t bullseye-backports
diff --git a/tools/tombstone_to_line.py b/tools/tombstone_to_line.py
index 7320bd56c..eb2243a78 100755
--- a/tools/tombstone_to_line.py
+++ b/tools/tombstone_to_line.py
@@ -45,9 +45,9 @@ def lookup_addr(args, object_path, address):
try:
if object_path[0] == os.path.sep:
object_path = object_path[1:]
- parms = [args.addr2line, '-e',
+ params = [args.addr2line, '-e',
os.path.join(args.symbols, object_path), address]
- details = subprocess.check_output(parms).strip().split(':')
+ details = subprocess.check_output(params).strip().split(':')
return LookupInfo(
line_number=details[-1],
details=details,