Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45dbdd1e authored by Thurston Dang's avatar Thurston Dang
Browse files

[trusty][apploader] Handle APPLOADER_ERR_POLICY_VIOLATION

Add a specific error message to the Android CLI tool for the
case where the policy engine (http://go/aog/2051516) disallows
loading.

Test: Load a signed app that violates the policy
Bug: 208968719
Change-Id: I2aaa218ab3a7297ea62448de49baa0bfd6b1ee52
parent 848fe8ab
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -223,6 +223,9 @@ static ssize_t read_response(int tipc_fd) {
        case APPLOADER_ERR_INVALID_VERSION:
            LOG(ERROR) << "Error: invalid application version";
            break;
        case APPLOADER_ERR_POLICY_VIOLATION:
            LOG(ERROR) << "Error: loading denied by policy engine";
            break;
        default:
            LOG(ERROR) << "Unrecognized error: " << resp.error;
            break;
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ enum apploader_error : uint32_t {
    APPLOADER_ERR_ALREADY_EXISTS,
    APPLOADER_ERR_INTERNAL,
    APPLOADER_ERR_INVALID_VERSION,
    APPLOADER_ERR_POLICY_VIOLATION,
};

/**