Files
android/libwvdrmengine/factory_upload_tool/include/properties.h
Cong Lin 8c0e7f2ba3 Factory extraction tool: Use device info from OS property when TEE returns empty
Similar change is merged to widevine internal tool: ag/22824076

Some mandatory device info fields like manufacturer can be empty string
when returned from TEE on devices which have not been provisioned with
attestation IDs.

The extraction tool also needs to check for empty string in the
response, and if so, populates the field with Android property values.

Test: extracting device info from new Pixel EVT 1.1 and uploading
Bug: 276958001
Change-Id: I055ee0994d9dbbbf9c0c0875670a449a56a3e29e
2023-04-25 18:23:09 +00:00

36 lines
1004 B
C++

// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#ifndef WVCDM_CORE_PROPERTIES_H_
#define WVCDM_CORE_PROPERTIES_H_
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include "disallow_copy_and_assign.h"
namespace wvcdm {
// This class gives device information/meta data.
class Properties {
public:
static bool GetBrandName(std::string* brand_name);
static bool GetCompanyName(std::string* company_name);
static bool GetModelName(std::string* model_name);
static bool GetArchitectureName(std::string* arch_name);
static bool GetDeviceName(std::string* device_name);
static bool GetProductName(std::string* product_name);
static bool GetBuildInfo(std::string* build_info);
static bool GetOEMCryptoPath(std::string* library_name);
private:
CORE_DISALLOW_COPY_AND_ASSIGN(Properties);
};
} // namespace wvcdm
#endif // WVCDM_CORE_PROPERTIES_H_