Repo Created

This commit is contained in:
Fr4nz D13trich 2025-11-15 17:44:12 +01:00
parent eb305e2886
commit a8c22c65db
4784 changed files with 329907 additions and 2 deletions

View file

@ -0,0 +1,35 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.squareup.wire'
apply plugin: 'kotlin'
dependencies {
implementation "com.squareup.wire:wire-runtime:$wireVersion"
api "com.squareup.wire:wire-grpc-client:$wireVersion"
}
wire {
kotlin {
javaInterop = true
}
}
sourceSets {
main.java.srcDirs += "$buildDir/generated/source/wire"
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
compileKotlin {
kotlinOptions.jvmTarget = 1.8
}
compileTestKotlin {
kotlinOptions.jvmTarget = 1.8
}

View file

@ -0,0 +1,31 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package google.internal.maps.mapsmobilesdks.v1;
option java_outer_classname = "ApiTokenProto";
option java_package = "com.google.android.gms.maps.auth";
option java_multiple_files = true;
service MapsMobileSDKsService {
rpc CreateAndroidApiToken (ApiTokenRequestWrapper) returns (CreateAndroidApiTokenResponse);
}
message ApiTokenRequest {
optional string apiKey = 1;
optional string fingerprint = 2;
optional string packageName = 3;
optional int64 expiryTimeMillis = 4;
}
message ApiTokenRequestWrapper {
optional ApiTokenRequest request = 1;
}
message CreateAndroidApiTokenResponse {
optional string apiToken = 1;
optional int64 expiryTime = 2;
optional int64 durationTime = 3;
}

View file

@ -0,0 +1,33 @@
option java_package = "org.microg.gms.auth.appcert";
option java_outer_classname = "AppCertProto";
message DeviceKeyRequest {
optional string droidGuardResult = 1;
optional uint64 androidId = 2;
optional uint64 sessionId = 3;
message VersionInfo {
optional fixed32 sdkVersion = 1;
optional fixed32 gmsVersion = 2;
}
optional VersionInfo versionInfo = 4;
optional string token = 6;
}
message DeviceKey {
optional uint64 keyId = 1;
optional uint64 deviceId = 3;
optional bytes macSecret = 4;
optional bytes keyCert = 5;
}
message SpatulaHeaderProto {
message PackageInfo {
optional string packageName = 1;
optional string packageCertificateHash = 3;
}
optional PackageInfo packageInfo = 1;
optional bytes hmac = 2;
optional uint64 deviceId = 3;
optional uint64 keyId = 4;
optional bytes keyCert = 5;
}

View file

@ -0,0 +1,99 @@
option java_package = "org.microg.gms.auth";
option java_outer_classname = "AuthProto";
message ConsentData {
message AppDetails {
optional string title = 1;
optional string email = 3;
}
optional AppDetails app = 1;
message ScopeDetails {
optional string title = 1;
optional string description = 2;
optional string id = 6;
}
repeated ScopeDetails scopes = 2;
}
message RequestOptions {
// optional bool field_1 = 1;
// optional string field_2 = 2;
// optional string field_3 = 3;
// optional int32 field_4 = 4;
// optional int32 field_5 = 5;
optional int32 remote = 7;
optional NonceWrapper nonceWrapper = 8;
optional int32 version = 10;
optional string sessionId = 11;
// optional bool field_12 = 12;
}
message NonceWrapper {
optional string nonce = 1;
}
message ConsentUrlResponse {
optional int32 resultCode = 2;
optional string consentUrl = 3;
optional Cookie cookie = 4;
}
message ConsentCookiesResponse {
optional ConsentCookies consentCookies = 1;
}
message ConsentCookies {
optional int32 resultCode = 1;
repeated Cookie cookies = 2;
}
message Cookie {
optional string cookieName = 1;
optional string cookieValue = 2;
optional string domain = 3;
optional string path = 4;
optional int64 sameSite = 5;
optional int64 secure = 6;
optional int64 httpOnly = 7;
optional int64 maxAge = 8;
optional int64 version = 9;
optional string discard = 10;
optional string comment = 12;
}
message ItAuthData {
optional bytes auth = 1;
repeated bytes tokens = 2;
optional bytes signature = 3;
}
message ItMetadataData {
message ScopeEntry {
repeated string name = 1;
optional int32 id = 2;
}
repeated ScopeEntry entries = 1;
optional TokenField field = 3;
optional int32 liveTime = 4;
}
message TokenField {
enum FieldType {
UNKNOWN = 0;
SCOPE = 1;
EXPIRATION = 2;
}
repeated FieldType types = 1 [packed = true];
}
message OAuthAuthorization {
repeated int32 scopeIds = 1 [packed = true];
optional int32 effectiveDurationSeconds = 2;
}
message OAuthTokenData {
optional int32 fieldType = 1;
optional bytes authorization = 2;
optional int32 durationMillis = 3;
}

View file

@ -0,0 +1,205 @@
option java_package = "org.microg.gms.checkin";
option java_outer_classname = "CheckinProto";
import "deviceconfig.proto";
// Sample data, if provided, is fished from a Nexus 7 (2013) / flo running Android 5.0
message CheckinRequest {
// unused
optional string imei = 1;
// Gservices["android_id"] or 0 on first-checkin
optional int64 androidId = 2;
// Gservices["digest"] or ""
optional string digest = 3;
required Checkin checkin = 4;
message Checkin {
// empty Build on pre-checkin
required Build build = 1;
message Build {
// Build.FINGERPRINT
// eg. google/razor/flo:5.0.1/LRX22C/1602158:user/release-keys
optional string fingerprint = 1;
// Build.HARDWARE
// eg. flo
optional string hardware = 2;
// Build.BRAND
// eg. google
optional string brand = 3;
// Build.getRadioVersion()
optional string radio = 4;
// Build.BOOTLOADER
// eg. FLO-04.04
optional string bootloader = 5;
// GoogleSettingsContract.Partner["client_id"]
// eg. android-google
optional string clientId = 6;
// Build.TIME / 1000L
// eg. 1416533192
optional int64 time = 7;
// PackageInfo.versionCode
// eg. 6188736
optional int32 packageVersionCode = 8;
// Build.DEVICE
// eg. flo
optional string device = 9;
// Build.VERSION.SDK_INT
// eg. 21
optional int32 sdkVersion = 10;
// Build.MODEL
// eg. Nexus 7
optional string model = 11;
// Build.MANUFACTURER
// eg. asus
optional string manufacturer = 12;
// Build.PRODUCT
// eg. razor
optional string product = 13;
// fileExists("/system/recovery-from-boot.p")
// eg. false
optional bool otaInstalled = 14;
}
// last checkin ms or 0 if first checkin
// eg. 0
optional int64 lastCheckinMs = 2;
// eg. ("event_log_start",~,1424612602652) on first checkin
repeated Event event = 3;
message Event {
optional string tag = 1;
optional string value = 2;
optional int64 timeMs = 3;
}
// unknown, n/a on first checkin
repeated Statistic stat = 4;
message Statistic {
required string tag = 1;
optional int32 count = 2;
optional float sum = 3;
}
// unused
repeated string requestedGroup = 5;
// TelephonyManager.getNetworkOperator != null|empty
optional string cellOperator = 6;
// TelephonyManager.getSimOperator != null|empty
optional string simOperator = 7;
// "WIFI::" | ("mobile" | "notmobile" | "unknown") + "-" + ("roaming" | "notroaming" | "unknown")
optional string roaming = 8;
// UserHandle.myUserId
// eg. 0
optional int32 userNumber = 9;
}
// unused
optional string desiredBuild = 5;
// Locale.toString
optional string locale = 6;
// GoogleSettingsContract.Partner["logging_id2"] (choosen randomly on first checkin)
// eg. 12561488293572742346
optional int64 loggingId = 7;
// unused
optional string marketCheckin = 8;
// NetworkInfo.getExtraInfo, WifiInfo.getMacAddress (12 hex-digits)
// eg. d850e6abcdef
repeated string macAddress = 9;
// TelephonyManager.getDeviceId (14 hex-digits), not set on tablets
optional string meid = 10;
// "[<email>]" followed by "<authToken>", empty string on first checkin
repeated string accountCookie = 11;
// TimeZone.getId
// eg. GMT
optional string timeZone = 12;
// security token as given on first checkin, not set on first checkin
optional fixed64 securityToken = 13;
// use 3
optional int32 version = 14;
// SHA-1 of each in /system/etc/security/otacerts.zip or "--IOException--" or "--no-output--"
// eg. dKXTm1QH9QShGQwBM/4rg6/lCNQ=
repeated string otaCert = 15;
// Build.SERIAL != "unknown"
// eg. 07d90b18
optional string serial = 16;
// TelephonyManager.getDeviceId (8 hex-digits), not set on tablets
optional string esn = 17;
optional DeviceConfig deviceConfiguration = 18;
// "ethernet" or "wifi"
repeated string macAddressType = 19;
// unknown, use 0 on pre- and first-checkin, and 1 for later checkins
// also present on pre-checkin
required int32 fragment = 20;
// unknown
optional string userName = 21;
// UserManager.getUserSerialNumber
// eg. 0
optional int32 userSerialNumber = 22;
}
message CheckinResponse {
optional bool statsOk = 1;
repeated Intent intent = 2;
message Intent {
optional string action = 1;
optional string dataUri = 2;
optional string mimeType = 3;
optional string javaClass = 4;
repeated Extra extra = 5;
message Extra {
optional string name = 6;
optional string value = 7;
}
}
optional int64 timeMs = 3;
optional string digest = 4;
repeated GservicesSetting setting = 5;
message GservicesSetting {
optional bytes name = 1;
optional bytes value = 2;
}
optional bool marketOk = 6;
optional fixed64 androidId = 7;
optional fixed64 securityToken = 8;
optional bool settingsDiff = 9;
repeated string deleteSetting = 10;
optional string versionInfo = 11;
optional string deviceDataVersionInfo = 12;
}

View file

@ -0,0 +1,26 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
option java_outer_classname = "ControlsSettings";
option java_package = "org.microg.gms.udc";
option java_multiple_files = true;
message ActivityControlsSettings {
repeated ActivityControlItem items = 1;
optional GlobalSettings global = 2;
}
message ActivityControlItem {
optional int32 id = 1;
optional int32 enabled = 2;
optional int32 allowed = 3;
optional int32 forced = 4;
}
message GlobalSettings {
optional int32 enabled = 1;
optional int32 allowed = 2;
}

View file

@ -0,0 +1,27 @@
// Copyright 2015 The Chromium Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,69 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
//--------------------- ATTENTION ------------------------
// If you chamge this file please change
// j/c/g/android/gms/auth_proximity/proto/cryptauth_better_together_feature_metadata.proto
// as well.
// A seed used to feed an EID BLE advertisement for some time period.
// Next ID: 4
message BeaconSeed {
// The beacon seed bytes.
bytes data = 1;
// The time at which this key becomes active.
int64 start_time_millis = 2;
// The time at which this key becomes inactive.
int64 end_time_millis = 3;
}
// Data required to verify the remote device.
// Next ID: 3
message AttestationData {
enum Type {
UNKNOWN = 0;
// A Chrome OS "soft-bind" certificate chain.
// The |certificates| field holds a PEM encoded X.509 certificate chain
// ordered from leaf to root.
CROS_SOFT_BIND_CERT_CHAIN = 1;
}
Type type = 1;
// The certificate data as specified by |type|.
repeated bytes certificates = 2;
}
// Device metadata relevant to the suite of multi-device (Better Together)
// features. This data is sent to and received from CryptAuth--using end-to-end
// encryption--as part of DeviceSync v2.
// Next ID: 5
message BetterTogetherDeviceMetadata {
// A cryptographic public key associated with the device.
// The format of this key is a serialized SecureMessage.GenericPublicKey.
bytes public_key = 1;
// A device model name that's guaranteed not to contain any PII.
string no_pii_device_name = 2;
// A list of seeds for EID BLE advertisements targeting this device.
repeated BeaconSeed beacon_seeds = 3;
// Bluetooth public address, formatted as a hex string with colons and capital
// letters. Example: "01:23:45:67:89:AB"
string bluetooth_public_address = 4;
// Attestation data associated with this device.
AttestationData attestation_data = 5;
}

View file

@ -0,0 +1,37 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
// This message fills the |metadata| bytes field of the FeatureMetadata message
// (found in the file cryptauth_client_app_metadata.proto) when |feature_type|
// is FeatureMetadata::Feature::BETTER_TOGETHER.
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
message BetterTogetherFeatureMetadata {
enum FeatureName {
UNKNOWN_FEATURE = 0;
BETTER_TOGETHER_HOST = 1;
BETTER_TOGETHER_CLIENT = 2;
EASY_UNLOCK_HOST = 3;
EASY_UNLOCK_CLIENT = 4;
MAGIC_TETHER_HOST = 5;
MAGIC_TETHER_CLIENT = 6;
SMS_CONNECT_HOST = 7;
SMS_CONNECT_CLIENT = 8;
PHONE_HUB_HOST = 9;
PHONE_HUB_CLIENT = 10;
WIFI_SYNC_HOST = 11;
WIFI_SYNC_CLIENT = 12;
ECHE_HOST = 13;
ECHE_CLIENT = 14;
PHONE_HUB_CAMERA_ROLL_HOST = 15;
PHONE_HUB_CAMERA_ROLL_CLIENT = 16;
}
repeated FeatureName supported_features = 1;
repeated FeatureName enabled_features = 2;
}

View file

@ -0,0 +1,139 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
// Client-specific metadata used in the CryptAuth v2 Enrollment protocol, which
// is serialized and held in |client_app_metadata| of SyncKeysRequest (in file
// cryptauth_enrollment.proto).
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
// Client specific metadata contained in SyncKeysRequest.client_app_metadata.
// Next id: 31
message ClientAppMetadata {
// App specific metadata from the device. On Android, these should be common
// for all the features as they come from GmsCore, however, on IOS and other
// devices, there could be multiple apps with the feature.
repeated ApplicationSpecificMetadata application_specific_metadata = 1;
// Subgrouping of device identifiers.
// Instance ID: See more info at go/gcm-in-gmscore and
// https://g3doc.corp.google.com/java/com/google/wireless/android/iid/g3doc/index.md?cl=head
string instance_id = 2;
// Token to authenticate the instance ID.
string instance_id_token = 3;
// Checkin android id of the device.
fixed64 android_device_id = 4;
// Chrome and iOS use a UUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// Where x is a lowercase hex digit.
// For iOS, this UUID is the IDFV.
// For backward compatibility with some Chrome long_device_ids, this can also
// be something else.
// For the same reason, this field is case sensitive, even with valid UUIDs.
string long_device_id = 5;
// Subgrouping of device features field. These help in targeting specific
// class of devices, for ex: Tablets vs phones etc.
// Locale of the device.
string locale = 6;
// The Operating System version.
string device_os_version = 7;
// The Operating System version number on the device.
int64 device_os_version_code = 8;
// The Operating system release on the device.
string device_os_release = 9;
// The Operating system codename on the device.
string device_os_codename = 10;
// Size of the display in thousandths of an inch (e.g. 7000 mils = 7 in)
int32 device_display_diagonal_mils = 11;
// Device's model name (e.g., an android.os.Build.MODEL)
string device_model = 12;
// The device manufacturer name.
string device_manufacturer = 13;
// The type of device this is.
enum DeviceType {
UNKNOWN = 0;
ANDROID = 1;
CHROME = 2;
IOS = 3;
BROWSER = 4;
OSX = 5;
}
DeviceType device_type = 14;
// Subgrouping of lock screen related fields. Used by many identity features.
// Is this device using a secure screenlock (e.g., a pattern or pin unlock).
bool using_secure_screenlock = 15;
// Is auto-unlocking the screenlock supported ?
bool auto_unlock_screenlock_supported = 16;
// Is auto-unlocking the screenlock (e.g., when at "home") enabled ?
bool auto_unlock_screenlock_enabled = 17;
// Subgrouping of bluetooth state related fields on the device. Used by many
// features.
// Does the device have a Bluetooth (classic) radio?
bool bluetooth_radio_supported = 18;
// Is the Bluetooth (classic) radio on?
bool bluetooth_radio_enabled = 19;
// Does the device have a ble radio?
bool ble_radio_supported = 20;
// Does the device hardware support a mobile data connection?
bool mobile_data_supported = 21;
// Does the device support tethering ?
bool tethering_supported = 22;
// If a feature wants to upload some metadata common to all its keys.
repeated FeatureMetadata feature_metadata = 23;
// Bluetooth address for EasyUnlock.
string bluetooth_address = 24;
// Is the device a "Pixel Experience" Android device?
bool pixel_experience = 25;
// Is the device running in the ARC++ container on a chromebook?
bool arc_plus_plus = 26;
// Does the device support user presence that is backed by hardware
// (unspoofable by malware)?
bool hardware_user_presence_supported = 27;
// Does the device support user verification (E.g., passcode, biometrics)?
bool user_verification_supported = 28;
// Does the device support creating a key in trusted execution environment?
bool trusted_execution_environment_supported = 29;
// Does the device support creating a key in a dedicated secure element
// hardware?
bool dedicated_secure_element_supported = 30;
// The response blob generated by the DroidGuard client on the device.
string droid_guard_response = 31;
}
// Metadata that's app specific.
// Next id: 6
message ApplicationSpecificMetadata {
// Used for device_address of DeviceInfo field 2, but for GCM capable devices.
bytes gcm_registration_id = 1;
// Does the user have notifications enabled for the given device address.
bool notification_enabled = 2;
// The software version running on the device.
string device_software_version = 3;
// The software version number running on the device.
int64 device_software_version_code = 4;
// Software package information if applicable.
string device_software_package = 5;
// Whether the user has Bluetooth enabled for the given device address.
bool bluetooth_enabled = 6;
}
// Metadata which is same for different keys belonging to a particular feature.
message FeatureMetadata {
enum Feature {
UNKNOWN = 0;
AUTHZEN = 1;
BETTER_TOGETHER = 2;
}
Feature feature_type = 1;
bytes metadata = 2;
}

View file

@ -0,0 +1,164 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
// Contains messages and data types used by request, response, and directive
// messages in the CryptAuth v2 Enrollment protocol.
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
// The types of cryptographic keys that are supported.
enum KeyType {
// Default value. Don't use!
KEY_TYPE_UNSPECIFIED = 0;
// 16-byte random byte string
RAW128 = 1;
// 32-byte random byte string
RAW256 = 2;
// Curve25519
CURVE25519 = 3;
// P256
P256 = 4;
// The key will be provided by the application.
CUSTOM = 127;
}
// The generic format for public-key certificates.
message Certificate {
// The identifier bound to the cert, e.g., an email address or phone number.
string common_name = 1;
// The raw bytes of the public key.
bytes public_key = 2;
// The UNIX timestamp when the cert will expire.
int64 expire_time_millis = 3;
// A restriction imposed on the applications using this key.
// Claims are validated along with the signature, when this key is used.
message Claim {
// Claim name.
string name = 1;
// Whether this claim is critical in the certificate. If it is critical,
// the client must fail the validation of the certificate if the client does
// not recognize the name of the claim.
bool critical = 2;
// Claim value.
bytes value = 3;
}
// All claims associated with the use of this key.
repeated Claim claims = 4;
// The signature over all of the above.
bytes signature = 5;
}
// Uniquely identifies a server-side policy instance, which is associated with a
// key or a client. Subset of this policy is communicated to the client and
// referenced using this message.
// A set of related policies are identified by a name. Every time the policy
// changes, it gets a new unique version number to distinguish it from the
// policy instance it is based on. Together, following fields uniquely identify
// a policy instance.
message PolicyReference {
// The name of the policy.
string name = 1;
// The version of the policy.
int64 version = 2;
}
// The client-specific metadata contained in SyncKeysRequest.
//
// Note: This message is encoded as query parameters for some requests. If any
// field or subfield of this proto changes, update the files
// cryptauth_proto_to_query_parameters_util.{h,cc}.
message ClientMetadata {
// The counter for how many times the request has been retried.
int64 retry_count = 1;
// The reason why the request has been invoked.
enum InvocationReason {
// Unspecified invocation reason.
INVOCATION_REASON_UNSPECIFIED = 0;
// First run of the software package invoking this call.
INITIALIZATION = 1;
// Ordinary periodic actions (e.g., monthly key rotation).
PERIODIC = 2;
// Slow-cycle periodic action (e.g., yearly keypair rotation).
SLOW_PERIODIC = 3;
// Fast-cycle periodic action (e.g., daily sync for Smart Lock users).
FAST_PERIODIC = 4;
// Expired state (e.g., expired credentials, or cached entries) was
// detected.
EXPIRATION = 5;
// An unexpected protocol failure occurred (so attempting to repair state).
FAILURE_RECOVERY = 6;
// A new account has been added to the device.
NEW_ACCOUNT = 7;
// An existing account on the device has been changed.
CHANGED_ACCOUNT = 8;
// The user toggled the state of a feature (e.g., Smart Lock enabled via
// bluetooth).
FEATURE_TOGGLED = 9;
// A "push" from the server caused this action (e.g., a sync tickle).
SERVER_INITIATED = 10;
// A local address change triggered this (e.g., GCM registration id
// changed).
ADDRESS_CHANGE = 11;
// A software update has triggered this.
SOFTWARE_UPDATE = 12;
// A manual action by the user triggered this (e.g., commands sent via adb).
MANUAL = 13;
// A custom key has been invalidated on the device (e.g. screen lock is
// disabled).
CUSTOM_KEY_INVALIDATION = 14;
// Periodic action triggered by auth_proximity
PROXIMITY_PERIODIC = 15;
}
// Reason for invocation.
InvocationReason invocation_reason = 2;
// Whether the platform has hardware supports for certain algorithms.
message CryptoHardware {
// AES-128
bool aes128 = 1;
// ASE-256
bool aes256 = 2;
// Carryless multiplication
bool clmul = 3;
// Curve25519
bool curve25519 = 4;
// P256
bool p256 = 5;
}
// Crypto hardware available on the client.
CryptoHardware crypto_hardware = 3;
// If the request is issued as a direct result, or a follow-up for a
// notification/tickle, the session_id from that notification.
string session_id = 4;
}
// Identifies Cryptauth services.
enum TargetService {
// Unspecified Cryptauth service.
TARGET_SERVICE_UNSPECIFIED = 0;
// Cryptauth Enrollment.
ENROLLMENT = 1;
// Cryptauth DeviceSync.
DEVICE_SYNC = 2;
}

View file

@ -0,0 +1,318 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
// Contains the request and response messages used in the CryptAuth v2
// DeviceSync protocol. Specifically,
//
// -- SyncMetadata --
// * Request: The device sends its metadata to CryptAuth, some of it encrypted
// with the the device's version of the group public key. This version of
// the group public key is also sent in the request.
// * Response: If CryptAuth can confirm that the device is in possession of the
// correct group public key, then CryptAuth returns metadata for the user's
// devices in the DeviceSync group. The group public key and/or the
// encrypted group private key might also be returned.
//
// -- ShareGroupPrivateKey --
// * Request: The device shares the group private key by encrypting it with the
// public key of the user's other devices. These encrypted group private
// keys are persisted by CryptAuth for the other devices to retrieve as
// necessary.
// * Response: Trivial
//
// -- BatchNotifyGroupDevices --
// * Request: The client sends a list of the devices that it wants to tickle via
// a GCM message.
// * Response: Trivial
//
// -- BatchGetFeatureStatuses --
// * Request: The client queries CryptAuth for the state of features on the
// user's devices, for example, whether or not Magic Tether is enabled on
// any of the user's phones.
// * Response: The query results.
//
// -- BatchSetFeatureStatuses --
// * Request: The client requests CryptAuth to set the state of various features
// for the user's devices. Optionally, features can be enabled exclusively,
// meaning enabled on one device and disabled on all others.
// * Response: Trivial
//
// -- GetDevicesActivityStatus --
// * Request: Trivial
// * Response: The state of activity for the user's devices. This includes if
// the device is currently online and the time the device was last active.
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
import "cryptauth/cryptauth_common.proto";
import "cryptauth/cryptauth_directive.proto";
// A common context for requests.
//
// Note: This message is encoded as query parameters for some requests. If any
// field or subfield of this proto changes, update the files
// cryptauth_proto_to_query_parameters_util.{h,cc}.
message RequestContext {
// The group name.
// A device can join multiple groups. Each group will be identified by a
// unique name.
// The device should have previously enrolled a public key with this name with
// the server, using the Enrollment API.
// The key material associated with the key of this name is used by other
// devices in the group to communicate securely with this device.
string group = 1;
// Common metadata about this request.
ClientMetadata client_metadata = 2;
// Device identifier.
string device_id = 3;
// Used to authenticate device_id.
string device_id_token = 4;
}
// Requests from a client to sync its metadata and receive encrypted copy of
// other metadata updated since its last sync.
message SyncMetadataRequest {
// The context of this request.
RequestContext context = 1;
// Public key material intended for group use. Will either be created by the
// device upon first joining, or will be existing group public key in its
// possession.
// May be discarded if device is joining an existing group that already has a
// group key pair.
bytes group_public_key = 3;
// Device's metadata encrypted with the given group public key.
bytes encrypted_metadata = 4;
// Set to true if the device needs the group's private key.
bool need_group_private_key = 5;
// Used to obtain only updated metadata, since the last request.
// If not set, all metadata will be sent.
bytes freshness_token = 6;
}
// One device's metadata, containing an identifier for the particular device,
// along with its encrypted metadata.
message DeviceMetadataPacket {
// Device identifier.
string device_id = 1;
// This device's metadata, encrypted with the group's private key.
bytes encrypted_metadata = 2;
// Indicates that the associated device needs the group's private key.
bool need_group_private_key = 3;
// The associated device's public key, to be used with
// EncryptedGroupPrivateKey below.
bytes device_public_key = 4;
// A name known to the server or which was assigned by the user to the device.
string device_name = 5;
}
// Response from server with any new devices' encrypted metadata and public key.
message SyncMetadataResponse {
// Collection of encrypted metadata from devices that have been updated since
// last provided refresh_token. All metadata if none was provided.
repeated DeviceMetadataPacket encrypted_metadata = 1;
// Public key associated with the group, used to encrypt all metadata.
// May be different than key received in the request.
// If not set, the server is indicating a new group key pair must be created
// by this device.
bytes group_public_key = 2;
// An encrypted group private key that contains device public key used for
// encryption. Encrypted with the public key of the device.
EncryptedGroupPrivateKey encrypted_group_private_key = 3;
// Updated freshness token from the server.
// Use this value in subsequent requests, to obtain only data updated since
// the last request.
bytes freshness_token = 4;
// The updated client-specific directives.
ClientDirective client_directive = 5;
}
// Encrypted group private key, including identifiers for both sender and
// recipient devices.
message EncryptedGroupPrivateKey {
// Identifier for device receiving group private key.
string recipient_device_id = 1;
// Identifier for device sending group private key.
string sender_device_id = 2;
// Group private key, encrypted with the public key of the recipient device.
bytes encrypted_private_key = 3;
// Hash of the group public key used to encrypt this devices metadata.
int64 group_public_key_hash = 7;
}
// Share the group's private key with another device.
message ShareGroupPrivateKeyRequest {
// The context of this request.
RequestContext context = 1;
// A collection of encrypted group private keys, each identified with the
// device public key of both the sender and the recipient.
repeated EncryptedGroupPrivateKey encrypted_group_private_keys = 2;
}
// The server's response to sharing the group's private key.
message ShareGroupPrivateKeyResponse {}
// Allows a device, which is part of the group, notify another group device.
// This allows setup to work, e.g. by letting the other device know it needs to
// turn on the bluetooth radio.
//
// Note: This request is encoded as query parameters in a GET request. If any
// field or subfield of this proto changes, update the files
// cryptauth_proto_to_query_parameters_util.{h,cc}.
message BatchNotifyGroupDevicesRequest {
// The context of this request.
RequestContext context = 1;
// Group devices to notify.
repeated string notify_device_ids = 2;
// Target service & feature type to specify in the notification.
TargetService target_service = 3;
// Feature type.
string feature_type = 4;
}
// Response to BatchNotifyGroupDevices.
message BatchNotifyGroupDevicesResponse {}
// Requests feature enabled/disabled statuses per device in the group.
//
// Note: This request is encoded as query parameters in a GET request. If any
// field or subfield of this proto changes, update the files
// cryptauth_proto_to_query_parameters_util.{h,cc}.
message BatchGetFeatureStatusesRequest {
// The context of this request.
RequestContext context = 1;
// Which devices to query.
// Leave unset if all group devices should be queried.
repeated string device_ids = 2;
// Which feature types to query.
repeated string feature_types = 3;
}
// Enabled/disabled status of a single device.
message DeviceFeatureStatus {
// Enabled/disabled status of a named feature.
message FeatureStatus {
// Feature type name.
string feature_type = 1;
// If the feature is enabled.
bool enabled = 2;
// The last time the feature was set. Only set for BatchGetFeatureStatuses.
int64 last_modified_time_millis = 3;
// Set to true to disable all group devices other than the specified device.
// This can only be used when enabling features. Only set for
// BatchSetFeatureStatuses.
bool enable_exclusively = 4;
}
// Device identifier.
string device_id = 1;
// The status of features associated with this device.
repeated FeatureStatus feature_statuses = 2;
}
// Response to BatchGetFeatureStatuses.
message BatchGetFeatureStatusesResponse {
// The status of all queried group devices.
// Only the requested devices and requested features will be populated.
repeated DeviceFeatureStatus device_feature_statuses = 1;
}
// Sets feature types enable/disable statuses per device in the group.
message BatchSetFeatureStatusesRequest {
// The context of this request.
RequestContext context = 1;
// The feature statuses to set for specific devices.
repeated DeviceFeatureStatus device_feature_statuses = 2;
// Set to true to disable all group devices other than the specified device.
// This can only be used with a single device and only when enabling features.
bool enable_exclusively = 3 [deprecated = true];
}
// Response to BatchSetFeatureStatuses.
message BatchSetFeatureStatusesResponse {}
// Request for GetDevicesActivityStatus.
message GetDevicesActivityStatusRequest {
// The context of this request.
RequestContext context = 1;
}
// Describes the device's network reachability.
enum ConnectivityStatus {
// Default value.
UNKNOWN_CONNECTIVITY = 0;
// The device appears to be unreachable.
OFFLINE = 1;
// The device appears to be online and reachable.
ONLINE = 2;
}
// Copied from
// https://cs.chromium.org/chromium/src/third_party/protobuf/src/google/protobuf/timestamp.proto?rcl=b51864c7aae4372308052b9fd5c1913ceeee3884
message Timestamp {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
int64 seconds = 1;
// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
int32 nanos = 2;
}
// Activity status of a single device.
message DeviceActivityStatus {
// Device identifier.
string device_id = 1;
// The last time this device was active as retrieved from Bond. Freshness
// is on the order of minutes.
int64 last_activity_time_sec = 2;
// Online status of the device as inferred by reachability via FCM.
ConnectivityStatus connectivity_status = 3;
// When the device last enrolled its DeviceSync key or when its metadata was
// last updated, the most recent of these two timestamps.
Timestamp last_update_time = 4;
}
// Response for GetDevicesActivityStatus.
message GetDevicesActivityStatusResponse {
// The status of all group devices.
repeated DeviceActivityStatus device_activity_statuses = 1;
}

View file

@ -0,0 +1,113 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
// Contains messages sent from CryptAuth to clients who registered keys using
// the v2 Enrollment protocol. The messages provide instructions to clients such
// as how frequently to check in with CryptAuth via a SyncKeysRequest, how long
// to wait between failed enrollment attempts, and what other keys are required
// to cross-sign for a particular key.
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
import "cryptauth/cryptauth_common.proto";
// The policy to be handed down to the party which registered the public key
// with the server. It is produced on the fly from current ServerSidePolicy
// and PolicyConfig (PC).
message KeyDirective {
// The specific policy which was used to generate this message.
PolicyReference policy_reference = 1;
// When rotating the current key, 'crossproof_key_name' keys should be used
// to cross sign. This is retrieved from PolicyConfig.crossproof_key_name .
repeated string crossproof_key_names = 2;
// The time when the key was enrolled/rotated (as observed by the server).
// This should be the same as ServerSidePolicy.enroll_time_millis .
int64 enroll_time_millis = 3;
}
// This contains the directives handed down to the party which registered the
// public key with the server. These directives are aggregated from across all
// the policies of the keys that have been registered by this first party.
message ClientDirective {
// The specific policy which was used to generate this message.
PolicyReference policy_reference = 1;
// The first party should check in with the server after this period.
// The server may require the client (first party) to rotate the key
// (based on PolicyConfig.rotate_delay_millis from across all the policies
// of the registered keys).
// For each policy of a registered key a value is randomly drawn from
// [PC.checkin_delay_millis - PC.checkin_delay_millis_interval,
// PC.checkin_delay_millis + PC.checkin_delay_millis_interval].
// The minimum value from across all these values is used.
//
// Whenever such a time period is coming due, the client should check in
// all its keys with the server. The server tells the client which of those
// keys need to be rotated and the rotation process proceeds for all these
// keys (bundled together).
int64 checkin_delay_millis = 2;
// In case any call to CryptAuth v2 failed, the first party should retry
// at most these many times right away, without the need to wait at all.
// Passed in from PC.retry_attempts.
// For example, a value of 1 means one original request, and if failed, a
// single retry should follow.
int32 retry_attempts = 3;
// In case any call to CryptAuth v2 failed retry_attempts + 1 times, the first
// party should retry the call again after this time period. If this latter
// retry fails, the first party should wait this time period again then retry
// and repeat until the request succeeds.
// For each policy of a registered key a value is randomly drawn from
// [PC.retry_period_millis - PC.retry_period_millis_interval,
// PC.retry_period_millis + PC.retry_period_millis_interval].
// The maximum value from across all these values is used.
int64 retry_period_millis = 4;
// The timestamp when this policy was minted.
// This can help the client sync with the server's time.
// checkin_delay_millis and retry_period_millis are relative to this time.
// Without this timestamp, the client should act right away with regard to
// the *_millis fields (ie, schedule something at NOW + *_millis).
// With this timestamp (considering the times of both server and client are
// in sync), the client would have all the required information for
// a later action.
int64 create_time_millis = 5;
// Which other services should be invoked after this interaction is complete.
repeated InvokeNext invoke_next = 6;
}
// Instructing the client to invoke a specific service.
message InvokeNext {
// Target service to be involved next.
TargetService service = 1;
// Key name to be processed for target service.
string key_name = 2;
}
// The policy to be handed down to a third party along with the corresponding
// public key of the device it asked for. It is produced on the fly from current
// PolicyConfig and ServerSidePolicy (defined in
// java/com/google/security/cryptauth/v2/backend/common/policy/policy.proto).
message ThirdPartyKeyDirective {
// The specific policy which was used to generate this message.
PolicyReference policy_reference = 1;
// The third party should not use this key after this timestamp.
// It should sync with CryptAuth for getting a fresh one after this timestamp.
// This should be consistent with what the latest first party directive states
// (in its create_time_millis field), combined with
// PolicyConfig.rotate_delay_millis .
int64 expire_time_millis = 2;
// The timestamp when this policy was distributed to the third party.
int64 distribute_time_millis = 3;
}

View file

@ -0,0 +1,298 @@
/* SPDX-FileCopyrightText: 2014 The Chromium Authors
* SPDX-License-Identifier: BSD-3-Clause
*/
// Contains the request and response messages used in the CryptAuth v2
// Enrollment protocol. Specifically,
// (1) SyncKeysRequest: The client submits information about their current set
// of keys to the CryptAuth server. The client can update their
// client-specific or key-specific metadata at this time as well.
// (2) SyncKeysResponse: The CryptAuth server responds with instructions such
// as what existing keys to (de)active, what new keys to create, and the
// time of the next check-in.
// (3) EnrollKeysRequest: If new keys were requested in the SyncKeysResponse,
// the client sends the new key information to CryptAuth in this request.
// (4) EnrollKeysResponse: If a certificate was generated, it will be provided
// here; otherwise, this can simply be a signal of a successful
// enrollment.
syntax = "proto3";
package cryptauthv2;
option optimize_for = LITE_RUNTIME;
import "cryptauth/cryptauth_common.proto";
import "cryptauth/cryptauth_directive.proto";
// The first request in the enrollment protocol. The request contains the
// information including the keys currently held by the client, the latest
// policies received from the server, and the metadata associated with the
// client and keys.
message SyncKeysRequest {
// The unique name of the application.
string application_name = 1;
// The version of the CryptAuth client library.
string client_version = 2;
// The request to enroll a key or update the info related to a key.
message SyncSingleKeyRequest {
// The purpose/application of the key.
string key_name = 1;
// Identifiers of keys currently held by the client.
repeated bytes key_handles = 2;
// The policy_reference received in the last KeyDirective.
PolicyReference policy_reference = 3;
// Key-specific metadata.
KeyMetadata key_metadata = 4;
// A key-specific opaque blob provided by the application.
bytes key_app_metadata = 5;
}
// Per key sync data.
repeated SyncSingleKeyRequest sync_single_key_requests = 3;
// The policy_reference received in the last ClientDirective.
PolicyReference policy_reference = 4;
// Client-specific metadata.
ClientMetadata client_metadata = 5;
// A client-specific opaque blob provided by the application.
// In the GmsCore case, this is a protobuf of type `ClientAppMetadata`.
bytes client_app_metadata = 6;
}
// The response to SyncKeysRequest. The response instructs how the client should
// manage existing keys and whether to create a new key.
message SyncKeysResponse {
// The session indentifer generated by the server, which must be
// cryptographically random.
bytes random_session_id = 1;
// The ephemeral DH public key generated by the server.
bytes server_ephemeral_dh = 2;
// The response corresponding to the SyncSingleKeyRequest message.
message SyncSingleKeyResponse {
// The actions corresponding to the key handles in SyncKeysRequest.
enum KeyAction {
// Default value. A client receiving this should treat it as a noop.
// (-- But, be wary of b/119886258. --)
KEY_ACTION_UNSPECIFIED = 0;
// Keep the key and make it the "active" key.
ACTIVATE = 1;
// Keep the key. When enrollment is complete, ensure the key is not
// "active".
// (-- But, be wary of b/119886258 and a noop on iOS. --)
DEACTIVATE = 2;
// Delete the key.
DELETE = 3;
}
// Key actions with one entry per key handle and in the same order as in the
// request.
repeated KeyAction key_actions = 1;
// The instruction for the client to create a new key.
enum KeyCreation {
// Do not create a new key.
NONE = 0;
// Create a new key, and then use it as the "active" key.
ACTIVE = 1;
// Create a new key, but do not use it as the "active" key.
// (-- Beware of b/119889101. This doesn't work on Android or iOS. --)
INACTIVE = 2;
}
// Instruction for key creation.
KeyCreation key_creation = 2;
// The type of the cryptographic key.
KeyType key_type = 3;
// The updated key-specific directives.
KeyDirective key_directive = 4;
// A key-specific opaque blob given to the application.
bytes key_app_directive = 5;
// The storage level where the key is created and stored.
enum KeyStorageLevel {
// Default value. The client is free to decide where to create the key.
KEY_STORAGE_LEVEL_UNSPECIFIED = 0;
// The key should be created and stored in software store. E.g. the
// client may create a key using a crypto library and store it in a
// file.
SOFTWARE = 1;
// The key should be created in a Trusted Execution Environment (TEE).
// E.g., TrustZone from ARM chips.
TRUSTED_EXECUTION_ENVIRONMENT = 2;
// The key should be created in a dedicated hardware that is separate from
// the main processor. E.g., StrongBox chips in Android devices and Secure
// Enclave in iOS devices.
DEDICATED_SECURE_ELEMENT = 3;
};
// The storage level to create the key.
KeyStorageLevel key_storage_level = 6;
// The newly created key should require hardware backed user presence when
// using the key.
bool hardware_user_presence_required = 7;
// The newly created key should require user verification when using the
// key.
bool user_verification_required = 8;
}
// Per key sync response.
repeated SyncSingleKeyResponse sync_single_key_responses = 3;
// The updated client-specific directives.
ClientDirective client_directive = 4;
// A client-specific opaque blob given to the application.
bytes client_app_directive = 5;
// The state of the server.
enum ServerStatus {
// The server is fine; the rest of SyncKeysResponse should be processed.
SERVER_OK = 0;
// The server is overloaded; client_directive should be followed.
SERVER_OVERLOADED = 1;
}
// The status of the server.
ServerStatus server_status = 6;
}
// The second request in the enrollment protocol. The second request is
// necessary if the client wants to enroll a new key. The request contains the
// information such as the material of the new key, and necessary proofs for
// verifying the key.
message EnrollKeysRequest {
// The session identifier copied from the SyncKeysResponse message.
bytes random_session_id = 1;
// The ephemeral DH public key generated by the client.
bytes client_ephemeral_dh = 2;
// The request to enroll a key, e.g., create a new key or rotate an old one.
message EnrollSingleKeyRequest {
// The key_name copied from SyncKeysRequest.
string key_name = 1;
// The identifier of the new key.
bytes new_key_handle = 2;
// The raw bytes of the new public key or custom data.
bytes key_material = 3;
// The public-key signature or MAC tag that shows the client indeed
// possesses the private or secret key.
bytes key_proof = 4;
// Cross-signatures or MAC tags by other keys.
message KeyCrossproof {
// The key_name of the cross-signing key.
string other_key_name = 1;
// The computed cross-signatures or MAC tags.
bytes other_key_proof = 2;
}
// Cross proofs.
repeated KeyCrossproof key_crossproofs = 5;
// Subject to certify.
repeated CertificateRequest certificate_requests = 6;
// Attestation of the key.
message KeyAttestation {
// The type of the key attestation.
enum KeyAttestationType {
// Default value.
KEY_ATTESTATION_TYPE_UNSPECIFIED = 0;
// Attestation generated by Android KeyStore API.
// See
// https://developer.android.com/training/articles/security-key-attestation
// The payload should be the concatenation of the X.509
// certificates returned by KeyStore attestation API encoded in ASN.1
// DER.
ANDROID_KEYSTORE_ATTESTATION = 1;
}
// The attestation type.
KeyAttestationType type = 1;
// The payload of the key attestation. The content of the payload is
// dependent on the attestation type.
bytes payload = 2;
}
// The attestation of the key if the key supports one.
KeyAttestation key_attestation = 7;
}
// Per key enroll data.
repeated EnrollSingleKeyRequest enroll_single_key_requests = 3;
}
// The response to EnrollKeysRequest. The response can contain a public-key
// certificate for the client to perform offline authentications.
message EnrollKeysResponse {
// The response corresponding to the EnrollSingleKeyRequest message.
message EnrollSingleKeyResponse {
// The server may produce a certificate and send it to the client.
repeated Certificate certificate = 1;
}
// Per key enroll response.
repeated EnrollSingleKeyResponse enroll_single_key_responses = 1;
}
// Subject to certify.
message CertificateRequest {
// The type of subject to certify.
enum CommonNameType {
// Reserved.
UNKNOWN_COMMON_NAME_TYPE = 0;
// Indicates a phone number needs to be signed.
PHONE_NUMBER = 1;
}
// Type of content to be signed.
CommonNameType type = 1;
// Raw data of the content.
bytes data = 2;
// Bytes used to verify the validation of data.
bytes token = 3;
// Additional data used to help verify data. (e.g. audience)
bytes additional_data = 4;
}
// The key-specific metadata contained in SyncKeysRequest.
message KeyMetadata {}
// This generic rpc is used by MagicShare, BetterTogether and possibly other
// features in the future to obtain enrollment information from the server.
// This methods behavior shall be based on the key_name which is supplied.
// The client and server shall set and expect specific data in
// request_key_metadata and response_key_metadata, based on the application_name
// and key_name.
message GetMetadataRequest {
// The unique name of the application
string application_name = 1;
// The version of the CryptAuth client library
string client_version = 2;
// The request to get key metadata related to a key name.
message GetSingleKeyMetadataRequest {
// The purpose/application of the key.
string key_name = 1;
// key specific metadata
bytes request_key_metadata = 2;
}
// Per key request
repeated GetSingleKeyMetadataRequest get_single_key_metadata_request = 3;
// InvocationReason, retry count, etc. (same as SyncKeys).
ClientMetadata client_metadata = 4;
// A client-specific opaque blob provided by the application.
bytes app_metadata = 5;
}
// The response to GetMetadataRequest. The response contains key metadata based
// on the application name_and key_name in GetMetadataRequest.
message GetMetadataResponse {
// The response of GetKeyMetadataRequest.
message GetSingleKeyMetadataResponse {
// Key specific response metadtata.
bytes response_key_metadata = 1;
}
// A response for every key_metadata_request above.
repeated GetSingleKeyMetadataResponse get_single_skey_metadata_response = 1;
}

View file

@ -0,0 +1,76 @@
/*
* SPDX-FileCopyrightText: 2025 e foundation
* SPDX-License-Identifier: Apache-2.0
*/
option java_package = "org.microg.gms.checkin";
option java_outer_classname = "DeviceConfig";
message DeviceConfig {
// ConfigurationInfo.reqTouchScreen
// eg. 3
optional int32 touchScreen = 1;
// ConfigurationInfo.reqKeyboardType
// eg. 1
optional int32 keyboardType = 2;
// ConfigurationInfo.reqNavigation
// eg. 1
optional int32 navigation = 3;
// ConfigurationInfo.screenLayout
// eg. 3
optional int32 screenLayout = 4;
// ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD
// eg. 0
optional bool hasHardKeyboard = 5;
// ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV
// eg. 0
optional bool hasFiveWayNavigation = 6;
// DisplayMetrics.densityDpi
// eg. 320
optional int32 densityDpi = 7;
// ConfigurationInfo.reqGlEsVersion
// eg. 196608
optional int32 glEsVersion = 8;
// PackageManager.getSystemSharedLibraryNames
// eg. "android.test.runner", "com.android.future.usb.accessory", "com.android.location.provider",
// "com.android.media.remotedisplay", "com.android.mediadrm.signer", "com.google.android.maps",
// "com.google.android.media.effects", "com.google.widevine.software.drm", "javax.obex"
repeated string sharedLibrary = 9;
// PackageManager.getSystemAvailableFeatures
// eg. android.hardware.[...]
repeated string availableFeature = 10;
// Build.CPU_ABI and Build.CPU_ABI2 != "unknown"
// eg. "armeabi-v7a", "armeabi"
repeated string nativePlatform = 11;
// DisplayMetrics.widthPixels
// eg. 1200
optional int32 widthPixels = 12;
// DisplayMetrics.heightPixels
// eg. 1824
optional int32 heightPixels = 13;
// Context.getAssets.getLocales
// eg. [...], "en-US", [...]
repeated string locale = 14;
// GLES10.glGetString(GLES10.GL_EXTENSIONS)
// eg. "GL_AMD_compressed_ATC_texture", [...]
repeated string glExtension = 15;
// unused
optional int32 deviceClass = 16;
// unused
optional int32 maxApkDownloadSizeMb = 17;
}

View file

@ -0,0 +1,278 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package google.familymanagement.v1;
option java_outer_classname = "FamilyManagementProto";
option java_package = "org.microg.gms.family";
option java_multiple_files = true;
service FamilyManagementService {
// Get the home group management configuration interface
rpc GetFamilyManagementConfig(GetFamilyManagementConfigRequest) returns (GetFamilyManagementConfigResponse);
// Get the family group member list interface
rpc GetFamily(GetFamilyRequest) returns (GetFamilyResponse);
// When exiting the family group, the page content displays
rpc GetFamilyManagementPageContent(GetFamilyRequest) returns (GetFamilyManagementPageContentResponse);
// Delete invitation interface
rpc DeleteInvitation(DeleteOperationRequest) returns (DeleteOperationResponse);
// Delete member interface
rpc DeleteMember(DeleteOperationRequest) returns (DeleteOperationResponse);
// Delete family interface
rpc DeleteFamily(DeleteOperationRequest) returns (DeleteOperationResponse);
}
// Responses to operations such as canceling invitations and removing members
message DeleteOperationResponse {
optional DeleteOperationResult result = 1;
}
message DeleteOperationResult {
optional string consistencyToken = 1;
optional int32 expireTime = 2;
}
// When jumping to WebView when removing family members, etc., the page configuration loaded
message OctarineWebViewPageConfiguration {
optional string requestUrl = 1;
optional string accountName = 2;
optional int32 initialTitleType = 3;
optional int32 initialAccountDisplay = 4;
optional int32 theme = 5;
optional string callingPackageName = 6;
optional string consistencyToken = 7;
optional bool disableClearCut = 8;
}
// Get home group management configuration
message GetFamilyManagementConfigRequest {
optional RequestContext context = 1;
optional bool unknownBool2 = 2 [default = true];
optional bool unknownBool3 = 3 [default = true];
optional bool directAdd = 4;
}
message GetFamilyManagementConfigResponse {
optional FamilyConfigExtra configExtra = 1;
optional FamilyConfigMain configMain = 2;
}
message FamilyConfigExtra {
}
message FamilyConfigMain {
optional FamilyTypeList familyTypeList = 2;
repeated FamilyOption familyOption = 5;
optional FamilyInviteConfig familyInviteConfig = 6;
}
message FamilyTypeList {
repeated int32 type = 1;
repeated FamilyMemberIdList memberIdList = 2;
}
message FamilyOption {
optional int32 optionId = 1;
repeated FamilyOptionContent optionContents = 2;
}
message FamilyInviteConfig {
optional FamilyInviteText content = 5;
}
message FamilyInviteText {
optional string cpTitle = 1;
optional string addRecipientEmail = 2;
optional string addOthersEmail = 3;
optional string contacts = 4;
optional string send = 5;
optional string smsFeeNotice = 6;
optional string invalidEmailNotice = 7;
optional string validEmailReminderInfo = 8;
optional string selectedInviteesInfo = 9;
}
message FamilyMemberIdList {
optional string memberId = 1;
repeated int32 unKnownInt2 = 2;
}
message FamilyOptionContent {
optional int32 optId = 1;
optional string content = 2;
}
// Return value when exiting a family group
message GetFamilyManagementPageContentResponse {
optional FamilyPageHeader header = 1;
optional FamilyPageBody body = 2;
}
message FamilyPageHeader {
optional FamilyHeaderInfo info = 1;
}
message FamilyHeaderInfo {
optional string title = 1;
optional int32 type = 2;
}
message FamilyPageBody {
optional int32 status = 1;
repeated FamilySection sections = 2;
repeated FamilyHelpLink helpLinks = 3;
repeated FamilyBulletPoint bulletPoints = 4;
}
message FamilySection {
optional int32 sectionId = 1;
optional string content = 2;
}
message FamilyHelpLink {
optional string tag = 1;
optional string appContext = 2;
optional string url = 4;
}
message FamilyBulletPoint {
repeated FamilySection items = 1;
}
message GetFamilyRequest {
optional RequestContext context = 1;
optional uint32 flag = 2;
optional PlaceHolder placeHolder = 3;
// optional PlaceHolder placeHolder2 = 4;
optional MemberInfo memberInfo = 5;
}
message DeleteOperationRequest {
optional RequestContext context = 1;
optional string memberId = 2;
optional PlaceHolder placeHolder = 3;
// optional PlaceHolder2 placeHolder2 = 4;
optional MemberInfo memberInfo = 5;
}
message MemberInfo {
optional string memberId = 1;
}
message PlaceHolder {
}
message RequestContext {
required string familyExperimentOverrides = 1;
optional DeviceInfo deviceInfo = 3;
optional string moduleSet = 4;
}
message DeviceInfo {
optional string moduleVersion = 1;
optional int32 clientType = 2;
optional CallerInfo moduleInfo = 4;
// required ScreenDensity screenDensity = 5;
}
message CallerInfo {
optional string appId = 1;
}
message ScreenDensity {
required int32 densityLevel = 1;
}
message GetFamilyResponse {
optional string userId = 2;
optional bool isActive = 3;
optional FamilyRole familyRole = 4;
optional JoinMethod joinType = 5;
optional int32 maxAvailableSlots = 7;
repeated FamilyMember memberDataList = 8;
repeated FamilyInvite invitationList = 9;
}
message FamilyInvite {
optional string invitationId = 1;
optional InviteInfo inviteInfo = 2;
optional MemberProfile profile = 3;
optional FamilyRole role = 4;
optional int64 inviteState = 5;
optional string appId = 7;
optional string invitationMessage = 8;
optional string contactId = 11;
}
message InviteInfo {
optional string emailAddress = 1;
optional string phoneNumber = 2;
}
// Family group member roles
enum FamilyRole {
UNKNOWN_FAMILY_ROLE = 0;
HEAD_OF_HOUSEHOLD = 1;
PARENT = 2;
MEMBER = 3;
CHILD = 4;
UNCONFIRMED_MEMBER = 5;
}
// The method of joining the group, that is, by invitation or other means
enum JoinMethod {
UNKNOWN_JOIN_METHOD = 0;
INVITED_BY_ADMIN = 1;
JOINED_BY_LINK = 2;
JOINED_BY_EMAIL = 3;
MIGRATED = 4;
}
message FamilyMember {
optional string memberId = 1;
optional FamilyRole role = 3;
optional MemberProfile profile = 4;
optional string hohGivenName = 6;
repeated int32 tags = 7;
}
message MemberProfile {
optional string displayName = 1;
optional string profilePhotoUrl = 3;
optional string email = 4;
optional string familyName = 6;
optional string defaultPhotoUrl = 9;
}
// reAuthProofTokensRequest
message ReAuthProofTokensRequest {
optional int32 type = 2;
optional string password = 4;
}
// reAuth settings response
message ReAuthSettingsResponse {
optional ReAuthSettings settings = 1;
}
message ReAuthSettings {
optional ReAuthSettingsOption option1 = 1;
optional ReAuthSettingsOption option2 = 2;
}
message ReAuthSettingsOption {
optional int32 type = 1;
optional string resetPinUrlPart1 = 2;
optional string resetPinUrlPart2 = 3;
optional string resetPinUrlPart3 = 5;
optional string recoveryUrl = 6;
}

View file

@ -0,0 +1,65 @@
/*
* SPDX-FileCopyrightText: 2025 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package google.play.games.whitelisted.v1whitelisted;
option java_outer_classname = "GamesPlayersProto";
option java_package = "org.microg.gms.games";
option java_multiple_files = true;
service PlayersFirstParty {
rpc DeleteApplicationDataFirstParty (DeleteApplicationDataRequest) returns (DeleteApplicationDataResponse);
rpc DeletePlayerFirstParty (DeletePlayerRequest) returns (DeletePlayerResponse);
}
service ApplicationsFirstParty {
rpc ListApplicationsWithUserDataFirstParty (ListApplicationsWithUserDataRequest) returns (ListApplicationsWithUserDataResponse);
}
message ListApplicationsWithUserDataRequest {
optional string locale = 1;
optional string androidSdk = 2;
}
message ListApplicationsWithUserDataResponse {
optional string tag = 1;
optional int32 code = 2;
repeated FirstPartyApplication firstPartyApplication = 3;
}
message FirstPartyApplication {
optional string tag = 1;
optional Application application = 2;
optional int32 unlockAchievementsNum = 6;
optional int32 played = 9;
}
message Application {
optional string tag = 1;
optional string gameId = 2;
optional string gameName = 3;
optional ApplicationIcon gameIcon = 7;
optional int32 achievementsNum = 10;
}
message ApplicationIcon {
optional string type = 1;
optional int32 width = 2;
optional int32 height = 3;
optional string url = 4;
optional string tag = 5;
}
message DeletePlayerRequest {}
message DeletePlayerResponse {}
message DeleteApplicationDataRequest {
optional string gameId = 1;
optional int32 status = 2;
}
message DeleteApplicationDataResponse {}

View file

@ -0,0 +1,183 @@
package social.boq.notifications.gmscoreapi;
option java_outer_classname = "GunsGmscoreApiService";
option java_package = "org.microg.gms.gcm";
service GunsGmscoreApiService {
rpc GmsGnotsFetchByIdentifier(FetchByIdentifierRequest) returns (FetchByIdentifierResponse);
rpc GmsGnotsSetReadStates(GmsGnotsSetReadStatesRequest) returns (GmsGnotsSetReadStatesResponse);
}
message FetchByIdentifierRequest {
optional GmsConfig config = 1;
optional NotificationIdentifierList identifiers = 2;
}
message GmsConfig {
message GmsVersionInfo {
optional int32 version = 10;
}
optional GmsVersionInfo versionInfo = 3;
}
message NotificationIdentifierList {
repeated NotificationIdentifier notifications = 1;
optional DeviceInfo deviceInfo = 2;
}
message FetchByIdentifierResponse {
optional NotificationList notifications = 2;
}
message NotificationList {
repeated NotificationData notificationDataList = 1;
optional uint64 serverTime = 3;
}
message NotificationData {
optional UserInfo userInfo = 1;
optional NotificationIdentifier identifier = 2;
optional bool isActive = 3;
optional NotificationContent content = 4;
optional NotificationAction action = 5;
optional DeviceInfo deviceInfo = 6;
optional uint64 createTime = 7;
optional IntentActions intentActions = 8;
optional uint64 expiryTime = 9;
optional BinaryPayload binaryPayload = 10;
}
message IntentActions {
optional IntentPayload primaryPayload = 1;
optional IntentPayload secondaryPayload = 2;
}
message UserInfo {
optional string userId = 1;
}
message NotificationIdentifier {
optional string type = 1;
optional string uniqueId = 2;
optional uint64 timestamp = 3;
optional string source = 4;
optional string registrationId = 5;
optional int64 receivedTime = 6;
optional bytes payload = 7;
}
message NotificationContent {
optional int32 priority = 1;
optional IconInfo icon = 2;
optional string title = 3;
optional string accountName = 4;
optional string email = 5;
optional string description = 6;
optional string contentDescription = 7;
optional string notificationContentKey = 8;
optional string toastMessage = 9;
optional bool notifDefFlag = 10;
optional bool notifDefVibrateEnabled = 11;
optional bool notifDefSound = 12;
optional bool notifDefVisibilityLevel = 13;
optional ActionButtons buttons = 14;
optional bool isLocalOnly = 15;
optional string taskDescriptionLabel = 16;
repeated NotificationButton actionButtons = 17;
optional NotificationChannelInfo channelInfo = 18;
optional string groupKey = 19;
optional string substName = 20;
}
message NotificationChannelInfo {
optional string id = 1;
optional string description = 2;
optional string groupId = 3;
optional string groupName = 4;
optional int32 importance = 5;
optional string name = 6;
}
message IconInfo {
optional string iconUrl = 1;
}
message ActionButtons {
optional string primaryText = 1;
optional string secondaryText = 2;
}
message NotificationButton {
optional string text = 1;
optional NotificationAction action = 2;
optional string icon = 3;
optional bool isEnabled = 4;
optional int32 buttonType = 6;
}
message NotificationAction {
optional ActionMetadata metadata = 1;
optional ActionIntent intent = 2;
}
message ActionMetadata {
optional string actionUrl = 1;
optional bool value = 2;
}
message ActionIntent {
optional IntentPayload intentPayload = 4;
}
message IntentPayload {
optional string className = 1;
optional string action = 2;
optional int32 launchType = 3;
repeated IntentExtra extras = 4;
optional int32 flags = 5;
}
message IntentExtra {
optional string key = 1;
optional string value = 2;
}
message GmsGnotsSetReadStatesRequest {
optional GmsConfig config = 1;
optional ReadStateList readStates = 2;
}
message ReadStateList {
repeated ReadStateItem items = 1;
}
message ReadStateItem {
optional NotificationIdentifier notification = 1;
optional string state = 3;
optional int32 status = 4;
}
message GmsGnotsSetReadStatesResponse {
}
message DeviceInfo {
optional DensityQualifier densityQualifier = 1;
enum DensityQualifier {
LDPI = 0;
MDPI = 1;
HDPI = 2;
XHDPI = 3;
TVDPI = 4;
XXHDPI = 5;
}
optional string localeTag = 2;
optional int32 sdkVersion = 3;
optional float density = 4;
optional string timeZoneId = 5;
repeated NotificationChannelInfo notificationChannels = 6;
}
message BinaryPayload {
required string type = 1;
required bytes data = 2;
}

View file

@ -0,0 +1,53 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
option java_package = "org.microg.gms.googlehelp";
option java_multiple_files = true;
message RequestContent {
optional CallerAppInfo appInfo = 1;
optional DeviceInfo deviceInfo = 2;
optional RequestBody body = 3;
optional string host = 4;
}
message ResponseContentWarp {
optional ResponseContent content = 1;
}
message ResponseContent {
optional AnswerInfo info = 1;
optional uint32 theme = 2;
}
message AnswerInfo {
optional string answerId = 1;
optional string answerTitle = 2;
optional string answerUrl = 3;
optional uint32 type = 5;
}
message CallerAppInfo {
optional string packageName = 1;
optional string version = 2;
}
message DeviceInfo {
optional string language = 1;
optional string name = 2;
optional string version = 3;
optional string code = 7;
optional string timeZone = 9;
}
message RequestBody {
optional string appContext = 3;
optional string session = 4;
optional uint32 gmsVersionCode = 12;
optional string gmsVersionName = 13;
optional uint32 type = 26;
optional string ap = 28;
}

View file

@ -0,0 +1,31 @@
package com.google.android.gms.locationsharingreporter.service;
message ReportingRequestStore {
optional int32 batterySaverState = 2;
optional int32 locationSettingState = 3;
optional int64 lastReceivedLocationTs = 4;
optional int64 recordedSessionStartTime = 7;
optional NetworkConnectivityState networkConnectivityState = 11;
map<string, LocationSharingInfo> accountLocationSharingMap = 12;
optional int64 createTimestamp = 14;
optional int64 startReportingTimestamp = 15;
}
enum ReportingType {
ONGOING_REPORTING_ENABLED = 1;
SINGLE_SHARE_REPORTING_ENABLED = 2;
}
message LocationSharingInfo {
optional int64 createdTimestamp = 5;
}
enum NetworkConnectivityState {
CONNECTIVITY_UNKNOWN = 0;
CONNECTIVITY_DISCONNECTED = 1;
CONNECTIVITY_CONNECTED = 2;
}

View file

@ -0,0 +1,212 @@
syntax = "proto2";
package social.userlocation.frontend;
service UserLocationFrontendService {
rpc UpdateSharingState(UpdateSharesStateRequest) returns (UpdateSharesStateResponse);
rpc ReadShares(ReadSharesRequest) returns (ReadSharesResponse);
rpc RemoveShares(RemoveSharesRequest) returns (RemoveSharesResponse);
rpc UploadLocation(UploadLocationRequest) returns (UploadLocationResponse);
rpc UploadLocationIfShareExists(UploadLocationIfShareExistsRequest) returns (UploadLocationIfShareExistsResponse);
}
message UpdateSharesStateRequest {
optional UserSharingState userSharingState = 1;
}
message UserSharingState {
optional int32 isSharingEnabled = 1;
optional int32 hasSignedTos = 2;
optional string countryCode = 3;
optional bool isUpdate = 6;
}
message UpdateSharesStateResponse {
optional int32 status = 1;
}
message RemoveSharesRequest {
}
message RemoveSharesResponse {
}
message UploadLocationIfShareExistsRequest {
}
message UploadLocationIfShareExistsResponse {
}
message UploadLocationRequest {
optional int64 requestCreationTime = 2;
optional bool isUserReportingDisabled = 3;
optional LocationReportingRecord locationReportingRecord = 4;
optional ClientEnvironment clientEnvironment = 5;
repeated DeviceLocationMessage deviceLocationMessageList = 6;
optional GeofenceReportingConfig geofenceReportingConfig = 7;
optional bool shouldEnableGeofencingOptimization = 9;
optional UploadConfig uploadConfig = 10;
}
message UploadLocationResponse {
optional UploadLocationResult result = 1;
optional LocationReportingParameters locationReportingParameters = 3;
}
/**
* Upload begin
*/
message LocationReportingRecord {
optional string ovenfreshId = 1;
optional LocationReportingStatus locationReportingStatus = 2;
optional int32 attemptCount = 3;
optional int64 uploadTime = 4;
optional int64 ovenfreshCreationTime = 5;
}
enum LocationReportingStatus {
LOCATION_REPORTING_STATUS_UNKNOWN = 0;
LOCATION_REPORTING_STATUS_OVENFRESH_RECEIVED = 1;
LOCATION_REPORTING_STATUS_COLLECTION_STARTED = 2;
LOCATION_REPORTING_STATUS_COLLECTION_IN_PROGRESS = 3;
LOCATION_REPORTING_STATUS_SUCCEEDED = 4;
LOCATION_REPORTING_STATUS_FAILED_LOCATION_UNAVAILABLE = 5;
LOCATION_REPORTING_STATUS_FAILED_PERMISSIONS_DENIED = 6;
LOCATION_REPORTING_STATUS_FAILED_LOCATION_DISABLED = 7;
LOCATION_REPORTING_STATUS_FAILED_DEVICE_INCAPABLE = 8;
LOCATION_REPORTING_STATUS_FAILED_REPORTING_RATE_EXCEEDED = 9;
LOCATION_REPORTING_STATUS_FAILED_NO_CONNECTIVITY = 10;
LOCATION_REPORTING_STATUS_FAILED_NO_ACTIVE_CLIENTS = 11;
LOCATION_REPORTING_STATUS_FAILED_NO_CLIENTS_WITH_LOCATION_ACCESS = 12;
LOCATION_REPORTING_STATUS_FAILED_INELIGIBLE_TO_REPORT = 13;
}
message ClientEnvironment {
optional string androidVersion = 2;
optional string gmscoreVersion = 3;
}
message DeviceLocationMessage {
optional DeviceLocationRecord deviceLocationRecord = 1;
}
message DeviceLocationRecord {
optional int64 eventTimestampMillis = 1;
optional GeoPoint geoPoint = 2;
optional double accuracy = 3;
optional BatteryInfo batteryInfo = 4;
repeated hflh unKnownMessage5 = 5;
optional WearableStatusCode wearableStatusCode = 7; // unused
optional PlaceCandidateIdentifier placeCandidateIdentifier = 8; // unused
}
message GeoPoint {
optional double altitude = 1;
optional double longitude = 2;
optional double latitude = 3;
}
message BatteryInfo {
optional bool isCharging = 1;
optional int32 batteryLevelPercent = 2;
}
message hflh {
optional int32 unknowInt1 = 1; //unknow enum
}
message WearableStatusCode {
optional int32 wearableStateCode = 1;
}
message PlaceCandidateIdentifier {
optional fixed64 highId = 1;
optional fixed64 lowId = 2;
}
message UploadConfig {
optional int32 unknowInt1 = 1; //unknow enum
optional UploadPolicy uploadPolicy = 2;
}
message UploadPolicy {
optional bool allowNonOvenfreshUploads = 1;
}
enum UploadLocationResult {
UNKNOWN_RESULT = 0;
SUCCESS = 1;
UPLOAD_REJECTED = 2;
}
/**
* Upload end
*/
message ReadSharesRequest {
optional WearOsAccountAndLocationConfig config = 2;
optional GeofenceReportingConfig geofenceReportingConfig = 4;
}
message WearOsAccountAndLocationConfig {
optional bool hasWearOsUsmAccount = 4;
optional bool isLocationReportingEnabled = 5;
}
message GeofenceReportingConfig {
optional bytes geofenceToken = 1;
enum ReportingProtocol {
REPORTING_PROTOCOL_UNKNOWN = 0;
REPORTING_PROTOCOL_SINGLE_DEVICE = 1;
REPORTING_PROTOCOL_MULTI_DEVICE_WITH_PRIMARY_DETECTION = 2;
}
optional ReportingProtocol protocol = 2;
}
message ReadSharesResponse {
repeated PinpointLocationShare pinpointLocationSharesList = 2;
optional LocationReportingParameters locationReportingParameters = 12;
optional bool isNoticeUpdated = 14;
}
message PinpointLocationShare {
repeated LocationShareCondition shareConditions = 2;
optional LocationShareOptions locationShareOptions = 4;
optional string shareLabel = 5;
optional string locationShareUrl = 7;
}
message LocationShareCondition {
optional int32 conditionType = 1;
}
message LocationShareOptions {
optional LocationShareId locationShareId = 1;
optional int32 shareType = 2;
optional int32 conditionType = 3;
}
message LocationShareId {
optional string oid = 4;
optional LocationShareAuth locationShareAuth = 10;
}
message LocationShareAuth {
optional string tokenId = 1;
optional string zookie = 2;
optional int32 unknowFileInt3 = 3; //unknow enum
}
message LocationReportingParameters {
optional int64 serverTimestamp = 1;
optional bool isReportingEnabled = 2;
optional int32 shareRemainingTimeSec = 5;
optional bool hasAdditionalRestrictions = 10;
}

View file

@ -0,0 +1,270 @@
// Derived from mcs.proto in chromium source code. Original license text below.
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MCS protocol for communication between Chrome client and Mobile Connection
// Server .
option java_package = "org.microg.gms.gcm.mcs";
/*
Common fields/comments:
stream_id: no longer sent by server, each side keeps a counter
last_stream_id_received: sent only if a packet was received since last time
a last_stream was sent
status: new bitmask including the 'idle' as bit 0.
*/
/**
TAG: 0
*/
message HeartbeatPing {
optional int32 stream_id = 1;
optional int32 last_stream_id_received = 2;
optional int64 status = 3;
}
/**
TAG: 1
*/
message HeartbeatAck {
optional int32 stream_id = 1;
optional int32 last_stream_id_received = 2;
optional int64 status = 3;
}
message ErrorInfo {
required int32 code = 1;
optional string message = 2;
optional string type = 3;
optional Extension extension = 4;
}
// MobileSettings class.
// "u:f", "u:b", "u:s" - multi user devices reporting foreground, background
// and stopped users.
// hbping: heatbeat ping interval
// rmq2v: include explicit stream IDs
message Setting {
required string name = 1;
required string value = 2;
}
message HeartbeatStat {
required string ip = 1;
required bool timeout = 2;
required int32 interval_ms = 3;
}
message HeartbeatConfig {
optional bool upload_stat = 1;
optional string ip = 2;
optional int32 interval_ms = 3;
}
/**
TAG: 2
*/
message LoginRequest {
enum AuthService {
ANDROID_ID = 2;
}
required string id = 1; // Must be present ( proto required ), may be empty
// string.
// mcs.android.com.
required string domain = 2;
// Decimal android ID
required string user = 3;
required string resource = 4;
// Secret
required string auth_token = 5;
// Format is: android-HEX_DEVICE_ID
// The user is the decimal value.
optional string device_id = 6;
// RMQ1 - no longer used
optional int64 last_rmq_id = 7;
repeated Setting setting = 8;
optional int32 compress = 9;
repeated string received_persistent_id = 10;
// Replaced by "rmq2v" setting
optional bool include_stream_ids = 11;
optional bool adaptive_heartbeat = 12;
optional HeartbeatStat heartbeat_stat = 13;
// Must be true.
optional bool use_rmq2 = 14;
optional int64 account_id = 15;
// ANDROID_ID = 2
optional AuthService auth_service = 16;
optional int32 network_type = 17;
optional int64 status = 18;
}
/**
* TAG: 3
*/
message LoginResponse {
required string id = 1;
// Not used.
optional string jid = 2;
// Null if login was ok.
optional ErrorInfo error = 3;
repeated Setting setting = 4;
optional int32 stream_id = 5;
// Should be "1"
optional int32 last_stream_id_received = 6;
optional HeartbeatConfig heartbeat_config = 7;
// used by the client to synchronize with the server timestamp.
optional int64 server_timestamp = 8;
}
message StreamErrorStanza {
required string type = 1;
optional string text = 2;
}
/**
* TAG: 4
*/
message Close {
}
message Extension {
// 12: SelectiveAck
// 13: StreamAck
required int32 id = 1;
required bytes data = 2;
}
/**
* TAG: 7
* IqRequest must contain a single extension. IqResponse may contain 0 or 1
* extensions.
*/
message IqStanza {
enum IqType {
GET = 0;
SET = 1;
RESULT = 2;
IQ_ERROR = 3;
}
optional int64 rmq_id = 1;
required IqType type = 2;
required string id = 3;
optional string from = 4;
optional string to = 5;
optional ErrorInfo error = 6;
// Only field used in the 38+ protocol (besides common last_stream_id_received, status, rmq_id)
optional Extension extension = 7;
optional string persistent_id = 8;
optional int32 stream_id = 9;
optional int32 last_stream_id_received = 10;
optional int64 account_id = 11;
optional int64 status = 12;
}
message AppData {
required string key = 1;
required string value = 2;
}
/**
* TAG: 8
*/
message DataMessageStanza {
// Not used.
optional int64 rmq_id = 1;
// This is the message ID, set by client, DMP.9 (message_id)
optional string id = 2;
// Project ID of the sender, DMP.1
required string from = 3;
// Part of DMRequest - also the key in DataMessageProto.
optional string to = 4;
// Package name. DMP.2
required string category = 5;
// The collapsed key, DMP.3
optional string token = 6;
// User data + GOOGLE. prefixed special entries, DMP.4
repeated AppData app_data = 7;
// Not used.
optional bool from_trusted_server = 8;
// Part of the ACK protocol, returned in DataMessageResponse on server side.
// It's part of the key of DMP.
optional string persistent_id = 9;
// In-stream ack. Increments on each message sent - a bit redundant
// Not used in DMP/DMR.
optional int32 stream_id = 10;
optional int32 last_stream_id_received = 11;
// Not used.
optional string permission = 12;
// Sent by the device shortly after registration.
optional string reg_id = 13;
// Not used.
optional string pkg_signature = 14;
// Not used.
optional string client_id = 15;
// serial number of the target user, DMP.8
// It is the 'serial number' according to user manager.
optional int64 device_user_id = 16;
// Time to live, in seconds.
optional int32 ttl = 17;
// Timestamp ( according to client ) when message was sent by app, in seconds
optional int64 sent = 18;
// How long has the message been queued before the flush, in seconds.
// This is needed to account for the time difference between server and
// client: server should adjust 'sent' based on his 'receive' time.
optional int32 queued = 19;
optional int64 status = 20;
optional bytes raw_data = 21;
optional int32 delay = 22;
}
/**
Included in IQ with ID 13, sent from client or server after 10 unconfirmed
messages.
*/
message StreamAck {
// No last_streamid_received required. This is included within an IqStanza,
// which includes the last_stream_id_received.
}
/**
Included in IQ sent after LoginResponse from server with ID 12.
*/
message SelectiveAck {
repeated string id = 1;
}

View file

@ -0,0 +1,63 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
option java_package = "com.google.android.gms.potokens";
option java_multiple_files = true;
message CipherKey {
optional int32 key = 1;
optional bytes value = 3;
}
message KeyData {
optional string typeUrl = 1;
optional CipherKey value = 2;
optional int32 keyMaterialType = 3;
}
message Key {
optional KeyData data = 1;
optional int32 status = 2;
optional int32 keyId = 3;
optional int32 outputPrefixType = 4;
}
message KeySet {
optional int32 keyId = 1;
repeated Key keyList = 2;
}
message PoTokenInfo {
optional int32 key = 6;
optional int32 time = 1;
optional bytes inputData = 2;
optional string pkgName = 3;
optional bytes pkgSignSha256 = 4;
optional bytes tokenData = 5;
}
message GetPoIntegrityTokenRequest {
optional int32 mode = 1;
optional bytes dgResult = 2;
optional bytes dgRandKey = 3;
}
message GetPoIntegrityTokenResponse {
optional bytes desc = 1;
optional int32 code = 2;
optional bytes backup = 3;
// optional bytes d = 4;
// optional bytes e = 5;
}
message PoTokenResult {
optional bytes encryptData = 1;
optional bytes tokenData = 2;
}
message PoTokenResultWrap {
optional PoTokenResult data = 1;
}

View file

@ -0,0 +1,210 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package google.internal.notifications.v1;
service NotificationsApiService {
rpc MultiLoginUpdate(RegistrationRequest) returns (RegistrationResponse);
rpc FetchLatestThreads(FetchLatestThreadsRequest) returns (FetchLatestThreadsResponse);
}
message RegistrationRequest {
optional string chimeGmsClientId = 1;
optional RegistrationPayload registrationPayload = 2;
repeated DeviceRequest devices = 3;
optional RegistrationReason reason = 5;
optional string internalTargetId = 7;
}
message RegistrationPayload {
optional Channel channel = 1;
optional AppRegistrationContainer appRegistrationContainer = 2;
optional string representativeTargetId = 3;
}
enum Channel {
CHANNEL_UNKNOWN = 0;
EMAIL = 1;
APPLE_PUSH = 2;
GCM_DEVICE_PUSH = 3;
SMS = 5;
CUSTOM_ENDPOINT = 6;
WEB_PUSH = 7;
MATCHSTICK = 8 [deprecated = true];
VIRTUAL_INBOX = 10;
IN_APP_TRAY = 11 [deprecated = true];
IN_WEB = 12;
}
message AppRegistrationContainer {
oneof appRegistrationChoice {
AppRegistration appRegistration = 1;
}
}
message AppRegistration {
optional string regId = 1;
optional string packageName = 2;
optional int64 androidId = 3;
optional int64 userSerialNumber = 4;
}
message DeviceRequest {
optional string unused = 1;
optional GmsDeviceContext gmsDeviceContext = 3;
optional int32 ttl = 4;
optional string representativeTargetId = 5;
optional AuthWrapper auth = 6;
optional string id = 7;
}
message GmsDeviceContext {
optional string languageTag = 1;
optional GmsDeviceProfile gmsDeviceProfile = 3;
optional string timeZoneId = 4;
}
message GmsDeviceProfile {
optional float density = 2;
optional string versionName = 3;
optional string release = 4;
optional string id = 5;
optional string model = 6;
optional int32 sdkVersion = 7;
optional string manufacturer = 8;
optional SdkType sdkType = 9;
optional string channelNumber = 10;
optional string deviceModel = 11;
repeated NotificationChannel channels = 12;
repeated NotificationChannelGroup channel_groups = 13;
optional AppBlockState appBlockState = 14;
optional string deviceCountry = 15;
optional FeatureBitmapList featureBitmapList = 16;
optional DeviceType deviceType = 18;
optional string unused = 24;
}
enum SdkType {
SDK_TYPE_UNSPECIFIED = 0;
CUSTOM = 1;
GUNS = 2;
CHIME = 3;
GUNS_GMSCORE = 4;
RAW_FCM_GMSCORE = 5;
}
message NotificationChannel {
optional string channelId = 1;
optional string groupId = 2;
optional NotificationImportance importance = 3;
enum UnknownMessage {
UNSPECIFIED = 0;
TRUE = 1;
FALSE = 2;
}
optional UnknownMessage unknownMessage = 4;
}
enum NotificationImportance {
IMPORTANCE_UNSPECIFIED = 0;
IMPORTANCE_NONE = 1;
IMPORTANCE_DEFAULT = 2;
IMPORTANCE_HIGH = 3;
IMPORTANCE_LOW = 4;
IMPORTANCE_MAX = 5;
IMPORTANCE_MIN = 6;
}
message NotificationChannelGroup {
optional string groupId = 1;
optional ChannelGroupStatus channelGroupStatus = 2;
}
enum ChannelGroupStatus {
CHANNEL_GROUP_UNKNOWN = 0;
CHANNEL_GROUP_ALLOWED = 1;
CHANNEL_GROUP_BANNED = 2;
}
enum AppBlockState {
APP_BLOCK_STATE_UNKNOWN = 0;
ALLOWED = 1;
BANNED = 2;
}
message FeatureBitmapList {
repeated uint64 featureBitmaps = 1;
}
enum DeviceType {
DEVICE_TYPE_DEFAULT = 0;
DEVICE_TYPE_TV = 1;
DEVICE_TYPE_WEARABLE = 2;
DEVICE_TYPE_AUTOMOTIVE = 3;
DEVICE_TYPE_BATTLESTAR = 4;
DEVICE_TYPE_CHROME_OS = 5;
}
message AuthWrapper {
message AuthToken {
optional string authToken = 1;
}
oneof auth {
AuthToken authTokenWrapper = 1;
}
}
enum RegistrationReason {
REGISTRATION_REASON_UNSPECIFIED = 0;
DEVICE_START = 1;
APP_UPDATED = 2;
ACCOUNT_CHANGED = 3;
SERVER_SYNC_INSTRUCTION = 4;
LOCALE_CHANGED = 5;
TIMEZONE_CHANGED = 6;
COLLABORATOR_API_CALL = 7;
GUNS_MIGRATION = 8;
REGISTRATION_ID_CHANGED = 9;
CHANNEL_BLOCK_STATE_CHANGED = 10;
GROWTHKIT_PERIODIC_REGISTRATION = 11;
PERIODIC_REGISTRATION = 12;
GMSCORE_DEBUG = 13;
APP_BLOCK_STATE_CHANGED = 14;
}
message RegistrationResponse {
repeated AccountRegistrationResult registrationResults = 1;
optional string internalTargetId = 2;
}
message AccountRegistrationResult {
optional RegistrationError error = 1;
optional RegistrationPayload payload = 2;
optional string obfuscatedGaiaId = 4;
optional string id = 6;
optional bool success = 7;
}
message RegistrationError {
optional int32 errorCode = 1;
optional string errorMessage = 2;
}
enum RegistrationStatus {
STATUS_UNKNOWN = 0;
STATUS_REGISTERED = 1;
STATUS_PENDING_REGISTRATION = 2;
STATUS_FAILED_REGISTRATION = 3;
STATUS_UNREGISTERED = 4;
STATUS_PENDING_UNREGISTRATION = 5;
STATUS_FAILED_UNREGISTRATION = 6;
}
message FetchLatestThreadsRequest {
}
message FetchLatestThreadsResponse {
}

View file

@ -0,0 +1,126 @@
package google.play.games.games.v1;
option java_outer_classname = "SnapshotProto";
option java_package = "org.microg.gms.games";
option java_multiple_files = true;
service SnapshotsExtended {
rpc SyncSnapshots (GetSnapshotRequest) returns (GetSnapshotResponse);
rpc DeleteSnapshot (DeleteSnapshotInfo) returns (EmptyResult);
rpc ResolveSnapshotHead(ResolveSnapshotHeadRequest) returns (ResolveSnapshotHeadResponse);
rpc PrepareSnapshotRevision(PrepareSnapshotRevisionRequest) returns (PrepareSnapshotRevisionResponse);
rpc CommitSnapshotRevision(CommitSnapshotRevisionRequest) returns (EmptyResult);
}
message ResolveSnapshotHeadResponse {
optional SnapshotMetadata snapshotMetadata = 1;
}
message PrepareSnapshotRevisionRequest {
optional string title = 1;
repeated ukq c = 2;
optional string randomUUID = 3;
}
message PrepareSnapshotRevisionResponse {
optional string title = 1;
repeated UploadLinkInfo uploadLinkInfos = 2;
}
message CommitSnapshotRevisionRequest {
optional string snapshotName = 1;
optional Snapshot snapshot = 3;
optional string unknownFileString2 = 2;
repeated string unknownFileString4 = 4;
optional string randomUUID = 5;
optional string oneofField6 = 6;
optional int32 unknownFileInt7 = 7;
}
message UploadLinkInfo {
optional int32 id = 2;
optional string url = 3;
optional int32 unknownFileInt4 = 4;
}
message ukq {
optional int32 unknownFileInt1 = 1;
optional int32 unknownFileInt2 = 2;
}
message ResolveSnapshotHeadRequest {
optional string snapshotName = 1;
optional int32 unknownFileInt2 = 2;
optional int32 unknownFileInt3 = 3;
}
message GetSnapshotRequest {
repeated int32 unknownFileIntList3 = 3;
optional int32 unknownFileInt4 = 4;
optional int32 unknownFileInt6 = 6;
}
message DeleteSnapshotInfo {
optional string snapshotName = 1;
optional string snapshotId = 2;
}
message EmptyResult {
}
message GetSnapshotResponse {
repeated GameSnapshot gameSnapshot = 1;
optional string dataSnapshot = 2;
optional string unknownFileString3 = 3;
optional int32 unknownFileInt4 = 4;
}
message GameSnapshot {
optional SnapshotMetadata metadata = 1;
optional int32 type = 2;
}
message SnapshotMetadata {
optional string snapshotName = 1;
optional Snapshot snapshot = 2;
optional int32 type = 3;
repeated Snapshot snapshots = 4;
}
message Snapshot {
optional string snapshotId = 1;
optional SnapshotContent content = 2;
optional SnapshotContentInfo snapshotContentInfo = 3;
optional SnapshotImage coverImage = 4;
}
message SnapshotContent {
optional string description = 2;
optional SnapshotTimeInfo snapshotTimeInfo = 3;
optional int64 progressValue = 5;
optional string deviceName = 6;
optional int64 duration = 7;
}
message SnapshotTimeInfo {
required int64 timestamp = 1;
required int32 playedTime = 2;
}
message SnapshotContentInfo {
optional string token = 1;
optional string url = 2;
optional string contentHash = 3;
optional int64 size = 4;
}
message SnapshotImage {
optional string token = 1;
optional string imageUrl = 2;
optional int32 width = 3;
optional int32 height = 4;
optional string contentHash = 5;
optional string mimeType = 6;
}

View file

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: 2025 e foundation
* SPDX-License-Identifier: Apache-2.0
*/
// This should be part of the vending package, but it is hard to import proto
// files from other modules.
option java_package = "org.microg.vending";
option java_outer_classname = "UploadDeviceConfigRequest";
import "deviceconfig.proto";
message UploadDeviceConfigRequest {
optional DeviceConfig deviceConfiguration = 1;
optional string manufacturer = 2;
optional string gcmRegistrationId = 3;
}