Skip to content

Internal change #3508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@ message DeviceConfig {
// The customized configuration of a device in case any configuration could
// not be covered in BasicDeviceConfig, e.g. testbed config.
google.protobuf.Any customized_config = 3;

// Hardware description of the device for configs which may apply to a broad
// range of devices.
HardwareFingerprint hardware_fingerprint = 4;
}
69 changes: 69 additions & 0 deletions src/devtools/mobileharness/api/deviceconfig/proto/project.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

syntax = "proto3";

package mobileharness.api.deviceconfig;

import "google/protobuf/any.proto";

option java_package = "com.google.devtools.mobileharness.api.deviceconfig.proto";
option java_outer_classname = "ProjectConfigServiceProto";

// Identifier for devices running Android OS
message AndroidRealDeviceFingerprint {
// Result of `getprop ro.product.device`
string ro_product_device = 1;
// Result of `getprop ro.build.version.sdk`, usually an integer, but may have
// additional parts for beta or extension releases.
string ro_build_version_sdk = 2;
// Result of `getprop ro.build.type`, usually one of "user" or "userdebug"
string ro_build_type = 3;
// `getprop ro.build.id`
// Build of the system version of Android running on the device.
string ro_build_id = 4;
}

// Identification for devices running iOS
message IosRealDeviceFingerprint {
// ProductType as given by ideviceinfo
string product_type = 1;
// ProductVersion as given by ideviceinfo
string product_version = 2;
}

// Descriptor of devices for hardware-specific configuration.
message HardwareFingerprint {
// OS type or platform; "ANDROID" or "IOS"
string platform = 1;
oneof fingerprint {
AndroidRealDeviceFingerprint android_device_fingerprint = 2;
IosRealDeviceFingerprint ios_device_fingerprint = 3;
}
}

// A description of a device so that the Lifecycle can reset the config.
// Generally ignored if a lifecycle is unable to read the lifecycle_fingerprint.
// More than one lifecycle config can be returned for a device.
message LifecycleConfig {
// DeviceConfig is currently omitted for YAGNI, as the DeviceConfigService
// can still apply for this device.
// Identifier for a device which is readable by the lifecycle on the host.
HardwareFingerprint hardware_fingerprint = 1;
// A platform-dependent config describing options or data used for resetting
// a device. Different lifecycle methods may require different fields.
google.protobuf.Any preparation_config = 2;
}