Android-cuttlefish cvd tool
|
Namespaces | |
namespace | anonymous_namespace{host_server.cc} |
namespace | anonymous_namespace{protocol.cpp} |
namespace | anonymous_namespace{secure_input.cc} |
namespace | anonymous_namespace{sign.cc} |
namespace | packet |
namespace | support |
namespace | thread |
Classes | |
class | Cbor |
class | ConfUiAckMessage |
class | ConfUiCliResponseMessage |
class | ConfUiGenericMessage |
class | ConfUiMessage |
class | ConfUiRenderer |
class | ConfUiRendererImpl |
class | ConfUiSecureUserSelectionMessage |
class | ConfUiSecureUserTouchMessage |
class | ConfUiStartMessage |
class | ConfUiUserSelectionMessage |
class | ConfUiUserTouchMessage |
class | HMacImplementation |
struct | HostError |
class | HostServer |
class | HostVirtualInput |
class | HostVirtualInputEventSink |
struct | PipeConnectionPair |
class | Session |
struct | SignRawMessage |
class | TeeUiFrameWrapper |
struct | UserResponse |
Typedefs | |
using | ConfUiAbortMessage = ConfUiGenericMessage< ConfUiCmd::kAbort > |
using | ConfUiStopMessage = ConfUiGenericMessage< ConfUiCmd::kStop > |
using | TeeUiFrame = std::vector< std::uint32_t > |
Enumerations | |
enum class | ConfUiCmd : std::uint32_t { kUnknown = 100 , kStart = 111 , kStop = 112 , kCliAck = 113 , kCliRespond = 114 , kAbort = 115 , kUserInputEvent = 200 , kUserTouchEvent = 201 } |
enum class | SignMessageError : std::uint8_t { kOk = 0 , kUnknownError = 1 } |
enum class | ConfUiKeys : std::uint32_t { Confirm = 7 , Cancel = 8 } |
enum class | MainLoopState : std::uint32_t { kInit = 1 , kInSession = 2 , kWaitStop = 3 , kAwaitCleanup = 5 , kTerminated = 8 , kInvalid = 9 } |
enum class | FsmInput : std::uint32_t { kUserEvent = 1 , kHalStart , kHalStop , kHalAbort , kHalUnknown } |
enum class | TestKeyBits : uint8_t { BYTE = 165 } |
Functions | |
std::string | ToString (const ConfUiMessage &msg) |
std::unique_ptr< ConfUiMessage > | RecvConfUiMsg (SharedFD fd) |
std::unique_ptr< ConfUiMessage > | RecvConfUiMsg (const std::string &session_id, SharedFD fd) |
bool | SendAbortCmd (SharedFD fd, const std::string &session_id) |
bool | SendStopCmd (SharedFD fd, const std::string &session_id) |
bool | SendAck (SharedFD fd, const std::string &session_id, const bool is_success, const std::string &status_message) |
bool | SendResponse (SharedFD fd, const std::string &session_id, const UserResponse::type &plain_selection, const std::vector< std::uint8_t > &signed_response, const std::vector< std::uint8_t > &message) |
bool | SendStartCmd (SharedFD fd, const std::string &session_id, const std::string &prompt_text, const std::vector< std::uint8_t > &extra_data, const std::string &locale, const std::vector< teeui::UIOption > &ui_opts) |
bool | SendUserSelection (SharedFD fd, const std::string &session_id, const UserResponse::type &confirm_cancel) |
std::string | ToDebugString (const ConfUiCmd &cmd, const bool is_verbose) |
std::string | ToString (const ConfUiCmd &cmd) |
ConfUiCmd | ToCmd (std::uint32_t i) |
ConfUiCmd | ToCmd (const std::string &cmd_str) |
std::string | ToString (const teeui::UIOption ui_opt) |
std::optional< teeui::UIOption > | ToUiOption (const std::string &src) |
template<typename T > | |
static std::string | ByteVecToString (const std::vector< T > &v) |
template<typename Delim , typename... Args> | |
std::string | ArgsToStringWithDelim (Delim &&delim, Args &&... args) |
template<typename... Args> | |
std::string | ArgsToString (Args &&... args) |
bool | IsOnlyDigits (const std::string &src) |
static teeui::Color | alfaCombineChannel (std::uint32_t shift, double alfa, teeui::Color a, teeui::Color b) |
static int | GetDpi (int display_num=0) |
static std::unique_ptr< ConfUiMessage > | WrapWithSecureFlag (std::unique_ptr< ConfUiMessage > &&base_msg, const bool secure) |
static bool | IsUserAbort (ConfUiMessage &msg) |
std::unique_ptr< ConfUiSecureUserSelectionMessage > | ToSecureSelectionMessage (std::unique_ptr< ConfUiUserSelectionMessage > &&msg, const bool secure) |
std::unique_ptr< ConfUiSecureUserTouchMessage > | ToSecureTouchMessage (std::unique_ptr< ConfUiUserTouchMessage > &&msg, const bool secure) |
FsmInput | ToFsmInput (const ConfUiMessage &msg) |
std::string | ToString (FsmInput input) |
std::string | ToString (const MainLoopState &state) |
std::unique_ptr< ConfUiMessage > | CreateFromUserSelection (const std::string &session_id, const UserResponse::type user_selection) |
static std::chrono::milliseconds | GetGracePeriod () |
std::optional< std::vector< std::uint8_t > > | TestSign (const std::vector< std::uint8_t > &message) |
std::optional< std::vector< std::uint8_t > > | Sign (const std::vector< std::uint8_t > &message) |
Variables | |
constexpr auto | SESSION_ANY = "" |
constexpr const ssize_t | kMaxMessageLength = packet::kMaxPayloadLength |
using cuttlefish::confui::ConfUiAbortMessage = typedef ConfUiGenericMessage<ConfUiCmd::kAbort> |
using cuttlefish::confui::ConfUiStopMessage = typedef ConfUiGenericMessage<ConfUiCmd::kStop> |
using cuttlefish::confui::TeeUiFrame = typedef std::vector<std::uint32_t> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
The test key is 32byte word with all bytes set to TestKeyBits::BYTE.
Enumerator | |
---|---|
BYTE |
|
static |
std::string cuttlefish::confui::ArgsToString | ( | Args &&... | args | ) |
std::string cuttlefish::confui::ArgsToStringWithDelim | ( | Delim && | delim, |
Args &&... | args | ||
) |
|
static |
std::unique_ptr< ConfUiMessage > cuttlefish::confui::CreateFromUserSelection | ( | const std::string & | session_id, |
const UserResponse::type | user_selection | ||
) |
|
static |
|
static |
return grace period + alpha
grace period is the gap between user seeing the dialog and the UI starts to take the user inputs Grace period should be at least 1s. Session requests the Renderer to render the dialog, but it might not be immediate. So, add alpha to 1s
|
inline |
|
static |
std::unique_ptr< ConfUiMessage > cuttlefish::confui::RecvConfUiMsg | ( | const std::string & | session_id, |
SharedFD | fd | ||
) |
std::unique_ptr< ConfUiMessage > cuttlefish::confui::RecvConfUiMsg | ( | SharedFD | fd | ) |
bool cuttlefish::confui::SendAbortCmd | ( | SharedFD | fd, |
const std::string & | session_id | ||
) |
bool cuttlefish::confui::SendAck | ( | SharedFD | fd, |
const std::string & | session_id, | ||
const bool | is_success, | ||
const std::string & | status_message | ||
) |
bool cuttlefish::confui::SendResponse | ( | SharedFD | fd, |
const std::string & | session_id, | ||
const UserResponse::type & | plain_selection, | ||
const std::vector< std::uint8_t > & | signed_response, | ||
const std::vector< std::uint8_t > & | message | ||
) |
bool cuttlefish::confui::SendStartCmd | ( | SharedFD | fd, |
const std::string & | session_id, | ||
const std::string & | prompt_text, | ||
const std::vector< std::uint8_t > & | extra_data, | ||
const std::string & | locale, | ||
const std::vector< teeui::UIOption > & | ui_opts | ||
) |
bool cuttlefish::confui::SendStopCmd | ( | SharedFD | fd, |
const std::string & | session_id | ||
) |
bool cuttlefish::confui::SendUserSelection | ( | SharedFD | fd, |
const std::string & | session_id, | ||
const UserResponse::type & | confirm_cancel | ||
) |
std::optional< std::vector< std::uint8_t > > cuttlefish::confui::Sign | ( | const std::vector< std::uint8_t > & | message | ) |
std::optional< std::vector< std::uint8_t > > cuttlefish::confui::TestSign | ( | const std::vector< std::uint8_t > & | message | ) |
ConfUiCmd cuttlefish::confui::ToCmd | ( | const std::string & | cmd_str | ) |
ConfUiCmd cuttlefish::confui::ToCmd | ( | std::uint32_t | i | ) |
std::string cuttlefish::confui::ToDebugString | ( | const ConfUiCmd & | cmd, |
const bool | is_verbose | ||
) |
FsmInput cuttlefish::confui::ToFsmInput | ( | const ConfUiMessage & | msg | ) |
std::unique_ptr< ConfUiSecureUserSelectionMessage > cuttlefish::confui::ToSecureSelectionMessage | ( | std::unique_ptr< ConfUiUserSelectionMessage > && | msg, |
const bool | secure | ||
) |
std::unique_ptr< ConfUiSecureUserTouchMessage > cuttlefish::confui::ToSecureTouchMessage | ( | std::unique_ptr< ConfUiUserTouchMessage > && | msg, |
const bool | secure | ||
) |
std::string cuttlefish::confui::ToString | ( | const ConfUiCmd & | cmd | ) |
std::string cuttlefish::confui::ToString | ( | const ConfUiMessage & | msg | ) |
std::string cuttlefish::confui::ToString | ( | const MainLoopState & | state | ) |
std::string cuttlefish::confui::ToString | ( | const teeui::UIOption | ui_opt | ) |
std::string cuttlefish::confui::ToString | ( | FsmInput | input | ) |
std::optional< teeui::UIOption > cuttlefish::confui::ToUiOption | ( | const std::string & | src | ) |
|
static |
null if not user/touch, or wrap it and ConfUiSecure{Selection,Touch}Message
ConfUiMessage must NOT ConfUiSecure{Selection,Touch}Message types
|
constexpr |
|
constexpr |