1/* 2 * Copyright (C) 2017 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 17syntax = "proto3"; 18 19package android.service.diskstats; 20 21option java_multiple_files = true; 22option java_outer_classname = "DiskStatsServiceProto"; 23 24message DiskStatsServiceDumpProto { 25 enum EncryptionType { 26 // Unknown encryption type 27 ENCRYPTION_UNKNOWN = 0; 28 // No encryption 29 ENCRYPTION_NONE = 1; 30 // Full disk encryption 31 ENCRYPTION_FULL_DISK = 2; 32 // File-based encryption 33 ENCRYPTION_FILE_BASED = 3; 34 } 35 // Whether the latency test resulted in an error 36 bool has_test_error = 1; 37 // If the test errored, error message is contained here 38 string error_message = 2; 39 // 512B write latency in milliseconds, if the test was successful 40 int32 write_512b_latency_millis = 3; 41 // Free Space in the major partitions 42 repeated DiskStatsFreeSpaceProto partitions_free_space = 4; 43 // Is the device using file-based encryption, full disk encryption or other 44 EncryptionType encryption = 5; 45 // Cached values of folder sizes, etc. 46 DiskStatsCachedValuesProto cached_folder_sizes = 6; 47} 48 49message DiskStatsCachedValuesProto { 50 // Total app data size, in kilobytes 51 int64 agg_apps_size = 1; 52 // Total app cache size, in kilobytes 53 int64 agg_apps_cache_size = 2; 54 // Size of image files, in kilobytes 55 int64 photos_size = 3; 56 // Size of video files, in kilobytes 57 int64 videos_size = 4; 58 // Size of audio files, in kilobytes 59 int64 audio_size = 5; 60 // Size of downloads, in kilobytes 61 int64 downloads_size = 6; 62 // Size of system directory, in kilobytes 63 int64 system_size = 7; 64 // Size of other files, in kilobytes 65 int64 other_size = 8; 66 // Sizes of individual packages 67 repeated DiskStatsAppSizesProto app_sizes = 9; 68} 69 70message DiskStatsAppSizesProto { 71 // Name of the package 72 string package_name = 1; 73 // App's data size in kilobytes 74 int64 app_size = 2; 75 // App's cache size in kilobytes 76 int64 cache_size = 3; 77} 78 79message DiskStatsFreeSpaceProto { 80 enum Folder { 81 // Data folder 82 FOLDER_DATA = 0; 83 // Cache folder 84 FOLDER_CACHE = 1; 85 // System folder 86 FOLDER_SYSTEM = 2; 87 } 88 // Which folder? 89 Folder folder = 1; 90 // Available space, in kilobytes 91 int64 available_space = 2; 92 // Total space, in kilobytes 93 int64 total_space = 3; 94} 95