Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 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 | |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 17 | syntax = "proto2"; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 18 | package android.service.pm; |
| 19 | |
Yi Jin | d6759d4 | 2017-10-12 15:08:49 -0700 | [diff] [blame] | 20 | import "frameworks/base/core/proto/android/content/featureinfo.proto"; |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 21 | import "frameworks/base/libs/incident/proto/android/privacy.proto"; |
Yi Jin | d6759d4 | 2017-10-12 15:08:49 -0700 | [diff] [blame] | 22 | |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 23 | option java_multiple_files = true; |
| 24 | option java_outer_classname = "PackageServiceProto"; |
| 25 | |
| 26 | message PackageServiceDumpProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 27 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 28 | |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 29 | message PackageShortProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 30 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 31 | |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 32 | // Name of package. e.g. "com.android.providers.telephony". |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 33 | optional string name = 1; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 34 | // UID for this package as assigned by Android OS. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 35 | optional int32 uid = 2; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 36 | } |
| 37 | message SharedLibraryProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 38 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 39 | |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 40 | optional string name = 1; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 41 | // True if library path is not null (jar), false otherwise (apk) |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 42 | optional bool is_jar = 2; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 43 | // Should be filled if is_jar is true |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 44 | optional string path = 3; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 45 | // Should be filled if is_jar is false |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 46 | optional string apk = 4; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 47 | } |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 48 | message SharedUserProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 49 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 50 | |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 51 | optional int32 user_id = 1; |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 52 | optional string name = 2 [ (android.privacy).dest = DEST_EXPLICIT ]; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | // Installed packages. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 56 | optional PackageShortProto required_verifier_package = 1; |
| 57 | optional PackageShortProto verifier_package = 2; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 58 | repeated SharedLibraryProto shared_libraries = 3; |
Yi Jin | d6759d4 | 2017-10-12 15:08:49 -0700 | [diff] [blame] | 59 | repeated android.content.pm.FeatureInfoProto features = 4; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 60 | repeated PackageProto packages = 5; |
| 61 | repeated SharedUserProto shared_users = 6; |
| 62 | // Messages from the settings problem file |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 63 | repeated string messages = 7 [ (android.privacy).dest = DEST_EXPLICIT ]; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | message PackageProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 67 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 68 | |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 69 | message SplitProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 70 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 71 | |
| 72 | // The split name of package, e.g. base |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 73 | optional string name = 1; |
| 74 | optional int32 revision_code = 2; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 75 | } |
| 76 | message UserInfoProto { |
Yi Jin | 0d7bc2d1 | 2018-01-23 17:35:19 -0800 | [diff] [blame] | 77 | option (android.msg_privacy).dest = DEST_AUTOMATIC; |
| 78 | |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 79 | enum InstallType { |
| 80 | NOT_INSTALLED_FOR_USER = 0; |
| 81 | FULL_APP_INSTALL = 1; |
| 82 | INSTANT_APP_INSTALL = 2; |
| 83 | } |
| 84 | // Enum values gotten from PackageManger.java |
| 85 | enum EnabledState { |
| 86 | // This component or application is in its default enabled state |
| 87 | // (as specified in its manifest). |
| 88 | COMPONENT_ENABLED_STATE_DEFAULT = 0; |
| 89 | // This component or application has been explictily enabled, regardless |
| 90 | // of what it has specified in its manifest. |
| 91 | COMPONENT_ENABLED_STATE_ENABLED = 1; |
| 92 | // This component or application has been explicitly disabled, regardless of |
| 93 | // what it has specified in its manifest. |
| 94 | COMPONENT_ENABLED_STATE_DISABLED = 2; |
| 95 | // The user has explicitly disabled the application, regardless of what it has |
| 96 | // specified in its manifest. |
| 97 | COMPONENT_ENABLED_STATE_DISABLED_USER = 3; |
| 98 | // This application should be considered, until the point where the user actually |
| 99 | // wants to use it. |
| 100 | COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED = 4; |
| 101 | } |
| 102 | |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 103 | optional int32 id = 1; |
| 104 | optional InstallType install_type = 2; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 105 | // Is the app restricted by owner / admin |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 106 | optional bool is_hidden = 3; |
| 107 | optional bool is_suspended = 4; |
| 108 | optional bool is_stopped = 5; |
| 109 | optional bool is_launched = 6; |
| 110 | optional EnabledState enabled_state = 7; |
| 111 | optional string last_disabled_app_caller = 8; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | // Name of package. e.g. "com.android.providers.telephony". |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 115 | optional string name = 1; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 116 | // UID for this package as assigned by Android OS. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 117 | optional int32 uid = 2; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 118 | // Package's reported version. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 119 | optional int32 version_code = 3; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 120 | // Package's reported version string (what's displayed to the user). |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 121 | optional string version_string = 4; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 122 | // UTC timestamp of install |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 123 | optional int64 install_time_ms = 5; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 124 | // Millisecond UTC timestamp of latest update adjusted to Google's server clock. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 125 | optional int64 update_time_ms = 6; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 126 | // From "dumpsys package" - name of package which installed this one. |
| 127 | // Typically "" if system app or "com.android.vending" if Play Store. |
Yi Jin | c7f9307 | 2017-09-29 15:29:38 -0700 | [diff] [blame] | 128 | optional string installer_name = 7; |
Netta P | 426cbef | 2017-02-10 14:38:39 -0800 | [diff] [blame] | 129 | // Split APKs. |
| 130 | repeated SplitProto splits = 8; |
| 131 | // Per-user package info. |
| 132 | repeated UserInfoProto users = 9; |
| 133 | } |