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