diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-14 23:01:32 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-14 23:01:32 +0000 |
commit | 6f1d760b29b88e84a07890f3a701cd8e084bf832 (patch) | |
tree | aed19812446965eb73033a0d4a87ffd596d5102e | |
parent | 4ed0a9717d2d045d510e5b38d56a51ea55ad7161 (diff) | |
parent | 603dfa67780b8803ab344fe45af46c3ef9ceb836 (diff) | |
download | cuttlefish-sdk-release.tar.gz |
Snap for 11841552 from 603dfa67780b8803ab344fe45af46c3ef9ceb836 to sdk-releasesdk-release
Change-Id: Iba02f1539e00e8652734163695cd45a0663c0d1f
-rw-r--r-- | common/libs/utils/files.cpp | 21 | ||||
-rw-r--r-- | host/commands/assemble_cvd/flags.cc | 11 | ||||
-rw-r--r-- | host/commands/assemble_cvd/flags_defaults.h | 2 | ||||
-rw-r--r-- | host/frontend/webrtc/connection_observer.cpp | 68 | ||||
-rw-r--r-- | host/frontend/webrtc/libcommon/connection_controller.cpp | 20 | ||||
-rw-r--r-- | host/frontend/webrtc/libcommon/connection_controller.h | 2 | ||||
-rw-r--r-- | host/frontend/webrtc/libdevice/connection_observer.h | 31 | ||||
-rw-r--r-- | host/frontend/webrtc/libdevice/data_channels.cpp | 170 | ||||
-rw-r--r-- | shared/BoardConfig.mk | 2 | ||||
-rw-r--r-- | shared/config/init.vendor.rc | 2 | ||||
-rw-r--r-- | shared/device.mk | 14 | ||||
-rw-r--r-- | shared/sepolicy/system_ext/private/system_app.te | 1 | ||||
-rw-r--r-- | system_image/Android.bp | 695 |
13 files changed, 462 insertions, 577 deletions
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/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 34d69b38b..d787179b0 100644 --- a/host/commands/assemble_cvd/flags_defaults.h +++ b/host/commands/assemble_cvd/flags_defaults.h @@ -90,7 +90,7 @@ #define CF_DEFAULTS_USE_RANDOM_SERIAL false #define CF_DEFAULTS_SERIAL_NUMBER \ cuttlefish::ForCurrentInstance("CUTTLEFISHCVD") -#define CF_DEFAULTS_SECURE_HALS "keymint,gatekeeper,oemlock" +#define CF_DEFAULTS_SECURE_HALS CF_DEFAULTS_DYNAMIC_STRING #define CF_DEFAULTS_PROTECTED_VM false #define CF_DEFAULTS_MTE false 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/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/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/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/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/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/system_image/Android.bp b/system_image/Android.bp index c8347dd71..786535f35 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", @@ -333,13 +330,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 +342,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 +362,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 +371,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 +396,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 +719,7 @@ android_system_image { "tinyhostless", "tinymix", "tinypcminfo", - "tinyplay", + "tinyplay", // host "tracepath", "tracepath6", "traceroute6", |