Alan Stokes | 17fd36a | 2021-09-06 17:22:37 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2021 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | //! Common items used by CompOS server and/or clients |
| 18 | |
| 19 | pub mod compos_client; |
| 20 | |
| 21 | /// VSock port that the CompOS server listens on for RPC binder connections. This should be out of |
| 22 | /// future port range (if happens) that microdroid may reserve for system components. |
| 23 | pub const COMPOS_VSOCK_PORT: u32 = 6432; |
| 24 | |
| 25 | /// The root directory where the CompOS APEX is mounted (read only). |
| 26 | pub const COMPOS_APEX_ROOT: &str = "/apex/com.android.compos"; |
| 27 | |
| 28 | /// The root of the data directory available for private use by the CompOS APEX. |
| 29 | pub const COMPOS_DATA_ROOT: &str = "/data/misc/apexdata/com.android.compos"; |
Alan Stokes | b2cc79e | 2021-09-14 14:08:46 +0100 | [diff] [blame] | 30 | |
| 31 | /// The sub-directory where we store information relating to the pending instance |
| 32 | /// of CompOS (based on staged APEXes). |
| 33 | pub const PENDING_DIR: &str = "pending"; |
| 34 | |
| 35 | /// The sub-directory where we store information relating to the current instance |
| 36 | /// of CompOS (based on active APEXes). |
| 37 | pub const CURRENT_DIR: &str = "current"; |
| 38 | |
| 39 | /// The file that holds the encrypted private key for a CompOS instance. |
| 40 | pub const PRIVATE_KEY_BLOB_FILE: &str = "key.blob"; |
| 41 | |
| 42 | /// The file that holds the public key for a CompOS instance. |
| 43 | pub const PUBLIC_KEY_FILE: &str = "key.pubkey"; |
| 44 | |
| 45 | /// The file that holds the instance image for a CompOS instance. |
| 46 | pub const INSTANCE_IMAGE_FILE: &str = "instance.img"; |