blob: b3425a4d7a8f05957cdb75b69d5d3c20825b4bb5 [file] [log] [blame]
David Chende701692017-10-05 13:16:02 -07001/*
yro0feae942017-11-15 14:38:48 -08002 * Copyright (C) 2017 The Android Open Source Project
David Chende701692017-10-05 13:16:02 -07003 *
4 * Licensed under the Apache License, versionCode 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 */
David Chenf384b902018-03-14 18:36:45 -070016#define DEBUG false // STOPSHIP if true
Joe Onorato9fc9edf2017-10-15 20:08:52 -070017#include "Log.h"
18
Yangster-mac330af582018-02-08 15:24:38 -080019#include "stats_log_util.h"
David Chenc136f452017-11-27 11:52:26 -080020#include "guardrail/StatsdStats.h"
Joe Onorato9fc9edf2017-10-15 20:08:52 -070021#include "packages/UidMap.h"
22
David Chenc136f452017-11-27 11:52:26 -080023#include <android/os/IStatsCompanionService.h>
24#include <binder/IServiceManager.h>
David Chende701692017-10-05 13:16:02 -070025#include <utils/Errors.h>
26
Dianne Hackborn3accca02013-09-20 09:32:11 -070027#include <inttypes.h>
28
David Chende701692017-10-05 13:16:02 -070029using namespace android;
30
David Chenf384b902018-03-14 18:36:45 -070031using android::base::StringPrintf;
32using android::util::FIELD_COUNT_REPEATED;
33using android::util::FIELD_TYPE_BOOL;
34using android::util::FIELD_TYPE_FLOAT;
35using android::util::FIELD_TYPE_INT32;
36using android::util::FIELD_TYPE_INT64;
37using android::util::FIELD_TYPE_MESSAGE;
38using android::util::FIELD_TYPE_STRING;
39using android::util::ProtoOutputStream;
40
David Chende701692017-10-05 13:16:02 -070041namespace android {
42namespace os {
43namespace statsd {
44
David Chenf384b902018-03-14 18:36:45 -070045const int FIELD_ID_SNAPSHOT_PACKAGE_NAME = 1;
46const int FIELD_ID_SNAPSHOT_PACKAGE_VERSION = 2;
47const int FIELD_ID_SNAPSHOT_PACKAGE_UID = 3;
David Chenbd125272018-04-04 19:02:50 -070048const int FIELD_ID_SNAPSHOT_PACKAGE_DELETED = 4;
David Chenf384b902018-03-14 18:36:45 -070049const int FIELD_ID_SNAPSHOT_TIMESTAMP = 1;
50const int FIELD_ID_SNAPSHOT_PACKAGE_INFO = 2;
51const int FIELD_ID_SNAPSHOTS = 1;
52const int FIELD_ID_CHANGES = 2;
53const int FIELD_ID_CHANGE_DELETION = 1;
54const int FIELD_ID_CHANGE_TIMESTAMP = 2;
55const int FIELD_ID_CHANGE_PACKAGE = 3;
56const int FIELD_ID_CHANGE_UID = 4;
David Chenbd125272018-04-04 19:02:50 -070057const int FIELD_ID_CHANGE_NEW_VERSION = 5;
58const int FIELD_ID_CHANGE_PREV_VERSION = 6;
David Chenf384b902018-03-14 18:36:45 -070059
Yangster9df9a7f2017-12-18 13:33:05 -080060UidMap::UidMap() : mBytesUsed(0) {}
61
62UidMap::~UidMap() {}
David Chenc136f452017-11-27 11:52:26 -080063
David Chende701692017-10-05 13:16:02 -070064bool UidMap::hasApp(int uid, const string& packageName) const {
65 lock_guard<mutex> lock(mMutex);
66
David Chenbd125272018-04-04 19:02:50 -070067 auto it = mMap.find(std::make_pair(uid, packageName));
68 return it != mMap.end() && !it->second.deleted;
David Chende701692017-10-05 13:16:02 -070069}
70
Yangster9df9a7f2017-12-18 13:33:05 -080071string UidMap::normalizeAppName(const string& appName) const {
72 string normalizedName = appName;
73 std::transform(normalizedName.begin(), normalizedName.end(), normalizedName.begin(), ::tolower);
74 return normalizedName;
75}
76
77std::set<string> UidMap::getAppNamesFromUid(const int32_t& uid, bool returnNormalized) const {
78 lock_guard<mutex> lock(mMutex);
79 return getAppNamesFromUidLocked(uid,returnNormalized);
80}
81
82std::set<string> UidMap::getAppNamesFromUidLocked(const int32_t& uid, bool returnNormalized) const {
83 std::set<string> names;
David Chenbd125272018-04-04 19:02:50 -070084 for (const auto& kv : mMap) {
85 if (kv.first.first == uid && !kv.second.deleted) {
86 names.insert(returnNormalized ? normalizeAppName(kv.first.second) : kv.first.second);
87 }
Yangster9df9a7f2017-12-18 13:33:05 -080088 }
89 return names;
90}
91
Dianne Hackborn3accca02013-09-20 09:32:11 -070092int64_t UidMap::getAppVersion(int uid, const string& packageName) const {
David Chende701692017-10-05 13:16:02 -070093 lock_guard<mutex> lock(mMutex);
94
David Chenbd125272018-04-04 19:02:50 -070095 auto it = mMap.find(std::make_pair(uid, packageName));
96 if (it == mMap.end() || it->second.deleted) {
97 return 0;
David Chende701692017-10-05 13:16:02 -070098 }
David Chenbd125272018-04-04 19:02:50 -070099 return it->second.versionCode;
David Chend6896892017-10-25 11:49:03 -0700100}
101
102void UidMap::updateMap(const int64_t& timestamp, const vector<int32_t>& uid,
Dianne Hackborn3accca02013-09-20 09:32:11 -0700103 const vector<int64_t>& versionCode, const vector<String16>& packageName) {
Yao Chend10f7b12017-12-18 12:53:50 -0800104 vector<wp<PackageInfoListener>> broadcastList;
105 {
106 lock_guard<mutex> lock(mMutex); // Exclusively lock for updates.
David Chende701692017-10-05 13:16:02 -0700107
David Chenbd125272018-04-04 19:02:50 -0700108 std::unordered_map<std::pair<int, string>, AppData, PairHash> deletedApps;
109
110 // Copy all the deleted apps.
111 for (const auto& kv : mMap) {
112 if (kv.second.deleted) {
113 deletedApps[kv.first] = kv.second;
114 }
Yao Chend10f7b12017-12-18 12:53:50 -0800115 }
David Chende701692017-10-05 13:16:02 -0700116
David Chenbd125272018-04-04 19:02:50 -0700117 mMap.clear();
118 for (size_t j = 0; j < uid.size(); j++) {
119 string package = string(String8(packageName[j]).string());
120 mMap[std::make_pair(uid[j], package)] = AppData(versionCode[j]);
121 }
David Chenf384b902018-03-14 18:36:45 -0700122
David Chenbd125272018-04-04 19:02:50 -0700123 for (const auto& kv : deletedApps) {
124 auto mMapIt = mMap.find(kv.first);
125 if (mMapIt != mMap.end()) {
126 // Insert this deleted app back into the current map.
127 mMap[kv.first] = kv.second;
128 }
129 }
130
David Chenc0f6f632018-01-18 16:02:42 -0800131 ensureBytesUsedBelowLimit();
Yao Chend10f7b12017-12-18 12:53:50 -0800132 StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
Yao Chend10f7b12017-12-18 12:53:50 -0800133 getListenerListCopyLocked(&broadcastList);
David Chende701692017-10-05 13:16:02 -0700134 }
Yao Chend10f7b12017-12-18 12:53:50 -0800135 // To avoid invoking callback while holding the internal lock. we get a copy of the listener
136 // list and invoke the callback. It's still possible that after we copy the list, a
137 // listener removes itself before we call it. It's then the listener's job to handle it (expect
138 // the callback to be called after listener is removed, and the listener should properly
139 // ignore it).
140 for (auto weakPtr : broadcastList) {
141 auto strongPtr = weakPtr.promote();
142 if (strongPtr != NULL) {
David Chen27785a82018-01-19 17:06:45 -0800143 strongPtr->onUidMapReceived(timestamp);
Yao Chend10f7b12017-12-18 12:53:50 -0800144 }
145 }
David Chende701692017-10-05 13:16:02 -0700146}
147
David Chend6896892017-10-25 11:49:03 -0700148void UidMap::updateApp(const int64_t& timestamp, const String16& app_16, const int32_t& uid,
Dianne Hackborn3accca02013-09-20 09:32:11 -0700149 const int64_t& versionCode) {
Yao Chend10f7b12017-12-18 12:53:50 -0800150 vector<wp<PackageInfoListener>> broadcastList;
Yangster9df9a7f2017-12-18 13:33:05 -0800151 string appName = string(String8(app_16).string());
Yao Chend10f7b12017-12-18 12:53:50 -0800152 {
153 lock_guard<mutex> lock(mMutex);
David Chenbd125272018-04-04 19:02:50 -0700154 int32_t prevVersion = 0;
155 bool found = false;
156 auto it = mMap.find(std::make_pair(uid, appName));
157 if (it != mMap.end()) {
158 found = true;
159 prevVersion = it->second.versionCode;
160 it->second.versionCode = versionCode;
161 it->second.deleted = false;
162 }
163 if (!found) {
164 // Otherwise, we need to add an app at this uid.
165 mMap[std::make_pair(uid, appName)] = AppData(versionCode);
166 } else {
167 // Only notify the listeners if this is an app upgrade. If this app is being installed
168 // for the first time, then we don't notify the listeners.
169 getListenerListCopyLocked(&broadcastList);
170 }
171 mChanges.emplace_back(false, timestamp, appName, uid, versionCode, prevVersion);
David Chenf384b902018-03-14 18:36:45 -0700172 mBytesUsed += kBytesChangeRecord;
David Chenc0f6f632018-01-18 16:02:42 -0800173 ensureBytesUsedBelowLimit();
Yao Chend10f7b12017-12-18 12:53:50 -0800174 StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
David Chenf384b902018-03-14 18:36:45 -0700175 StatsdStats::getInstance().setUidMapChanges(mChanges.size());
David Chende701692017-10-05 13:16:02 -0700176 }
177
Yao Chend10f7b12017-12-18 12:53:50 -0800178 for (auto weakPtr : broadcastList) {
179 auto strongPtr = weakPtr.promote();
180 if (strongPtr != NULL) {
David Chen27785a82018-01-19 17:06:45 -0800181 strongPtr->notifyAppUpgrade(timestamp, appName, uid, versionCode);
David Chende701692017-10-05 13:16:02 -0700182 }
David Chende701692017-10-05 13:16:02 -0700183 }
David Chende701692017-10-05 13:16:02 -0700184}
185
David Chenc136f452017-11-27 11:52:26 -0800186void UidMap::ensureBytesUsedBelowLimit() {
187 size_t limit;
188 if (maxBytesOverride <= 0) {
189 limit = StatsdStats::kMaxBytesUsedUidMap;
190 } else {
191 limit = maxBytesOverride;
192 }
193 while (mBytesUsed > limit) {
David Chenf384b902018-03-14 18:36:45 -0700194 ALOGI("Bytes used %zu is above limit %zu, need to delete something", mBytesUsed, limit);
David Chenbd125272018-04-04 19:02:50 -0700195 if (mChanges.size() > 0) {
David Chenf384b902018-03-14 18:36:45 -0700196 mBytesUsed -= kBytesChangeRecord;
197 mChanges.pop_front();
David Chenbd125272018-04-04 19:02:50 -0700198 StatsdStats::getInstance().noteUidMapDropped(1);
David Chenc136f452017-11-27 11:52:26 -0800199 }
David Chenc136f452017-11-27 11:52:26 -0800200 }
201}
202
Yao Chend10f7b12017-12-18 12:53:50 -0800203void UidMap::getListenerListCopyLocked(vector<wp<PackageInfoListener>>* output) {
204 for (auto weakIt = mSubscribers.begin(); weakIt != mSubscribers.end();) {
205 auto strongPtr = weakIt->promote();
206 if (strongPtr != NULL) {
207 output->push_back(*weakIt);
208 weakIt++;
209 } else {
210 weakIt = mSubscribers.erase(weakIt);
211 VLOG("The UidMap listener is gone, remove it now");
David Chende701692017-10-05 13:16:02 -0700212 }
213 }
David Chende701692017-10-05 13:16:02 -0700214}
215
Yao Chend10f7b12017-12-18 12:53:50 -0800216void UidMap::removeApp(const int64_t& timestamp, const String16& app_16, const int32_t& uid) {
217 vector<wp<PackageInfoListener>> broadcastList;
218 string app = string(String8(app_16).string());
219 {
220 lock_guard<mutex> lock(mMutex);
221
David Chenbd125272018-04-04 19:02:50 -0700222 int32_t prevVersion = 0;
223 auto key = std::make_pair(uid, app);
224 auto it = mMap.find(key);
225 if (it != mMap.end() && !it->second.deleted) {
226 prevVersion = it->second.versionCode;
227 it->second.deleted = true;
228 mDeletedApps.push_back(key);
229 }
230 if (mDeletedApps.size() > StatsdStats::kMaxDeletedAppsInUidMap) {
231 // Delete the oldest one.
232 auto oldest = mDeletedApps.front();
233 mDeletedApps.pop_front();
234 mMap.erase(oldest);
235 StatsdStats::getInstance().noteUidMapAppDeletionDropped();
236 }
237 mChanges.emplace_back(true, timestamp, app, uid, 0, prevVersion);
David Chenf384b902018-03-14 18:36:45 -0700238 mBytesUsed += kBytesChangeRecord;
David Chenc0f6f632018-01-18 16:02:42 -0800239 ensureBytesUsedBelowLimit();
Yao Chend10f7b12017-12-18 12:53:50 -0800240 StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
David Chenf384b902018-03-14 18:36:45 -0700241 StatsdStats::getInstance().setUidMapChanges(mChanges.size());
Yao Chend10f7b12017-12-18 12:53:50 -0800242 getListenerListCopyLocked(&broadcastList);
243 }
244
245 for (auto weakPtr : broadcastList) {
246 auto strongPtr = weakPtr.promote();
247 if (strongPtr != NULL) {
David Chen27785a82018-01-19 17:06:45 -0800248 strongPtr->notifyAppRemoved(timestamp, app, uid);
Yao Chend10f7b12017-12-18 12:53:50 -0800249 }
250 }
251}
252
253void UidMap::addListener(wp<PackageInfoListener> producer) {
Joe Onorato9fc9edf2017-10-15 20:08:52 -0700254 lock_guard<mutex> lock(mMutex); // Lock for updates
David Chende701692017-10-05 13:16:02 -0700255 mSubscribers.insert(producer);
256}
257
Yao Chend10f7b12017-12-18 12:53:50 -0800258void UidMap::removeListener(wp<PackageInfoListener> producer) {
Joe Onorato9fc9edf2017-10-15 20:08:52 -0700259 lock_guard<mutex> lock(mMutex); // Lock for updates
David Chende701692017-10-05 13:16:02 -0700260 mSubscribers.erase(producer);
261}
262
David Chen21582962017-11-01 17:32:46 -0700263void UidMap::assignIsolatedUid(int isolatedUid, int parentUid) {
264 lock_guard<mutex> lock(mIsolatedMutex);
265
266 mIsolatedUidMap[isolatedUid] = parentUid;
267}
268
269void UidMap::removeIsolatedUid(int isolatedUid, int parentUid) {
270 lock_guard<mutex> lock(mIsolatedMutex);
271
272 auto it = mIsolatedUidMap.find(isolatedUid);
273 if (it != mIsolatedUidMap.end()) {
274 mIsolatedUidMap.erase(it);
275 }
276}
277
Yangster-macd40053e2018-01-09 16:29:22 -0800278int UidMap::getHostUidOrSelf(int uid) const {
David Chen21582962017-11-01 17:32:46 -0700279 lock_guard<mutex> lock(mIsolatedMutex);
280
281 auto it = mIsolatedUidMap.find(uid);
282 if (it != mIsolatedUidMap.end()) {
283 return it->second;
284 }
285 return uid;
286}
287
David Chend6896892017-10-25 11:49:03 -0700288void UidMap::clearOutput() {
David Chenf384b902018-03-14 18:36:45 -0700289 mChanges.clear();
David Chenc136f452017-11-27 11:52:26 -0800290 // Also update the guardrail trackers.
291 StatsdStats::getInstance().setUidMapChanges(0);
David Chencfc311d2018-01-23 17:55:54 -0800292 mBytesUsed = 0;
David Chenc136f452017-11-27 11:52:26 -0800293 StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
David Chend6896892017-10-25 11:49:03 -0700294}
David Chende701692017-10-05 13:16:02 -0700295
David Chend6896892017-10-25 11:49:03 -0700296int64_t UidMap::getMinimumTimestampNs() {
297 int64_t m = 0;
David Chenbd125272018-04-04 19:02:50 -0700298 for (const auto& kv : mLastUpdatePerConfigKey) {
David Chend6896892017-10-25 11:49:03 -0700299 if (m == 0) {
David Chenbd125272018-04-04 19:02:50 -0700300 m = kv.second;
301 } else if (kv.second < m) {
302 m = kv.second;
David Chend6896892017-10-25 11:49:03 -0700303 }
304 }
305 return m;
306}
307
Yao Chend10f7b12017-12-18 12:53:50 -0800308size_t UidMap::getBytesUsed() const {
David Chenc136f452017-11-27 11:52:26 -0800309 return mBytesUsed;
310}
311
yro4beccbe2018-03-15 19:42:05 -0700312void UidMap::appendUidMap(const int64_t& timestamp, const ConfigKey& key,
313 ProtoOutputStream* proto) {
David Chend6896892017-10-25 11:49:03 -0700314 lock_guard<mutex> lock(mMutex); // Lock for updates
315
David Chenf384b902018-03-14 18:36:45 -0700316 for (const ChangeRecord& record : mChanges) {
317 if (record.timestampNs > mLastUpdatePerConfigKey[key]) {
318 uint64_t changesToken =
yro4beccbe2018-03-15 19:42:05 -0700319 proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_CHANGES);
320 proto->write(FIELD_TYPE_BOOL | FIELD_ID_CHANGE_DELETION, (bool)record.deletion);
321 proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_TIMESTAMP,
322 (long long)record.timestampNs);
323 proto->write(FIELD_TYPE_STRING | FIELD_ID_CHANGE_PACKAGE, record.package);
324 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CHANGE_UID, (int)record.uid);
David Chenbd125272018-04-04 19:02:50 -0700325 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CHANGE_NEW_VERSION, (int)record.version);
326 proto->write(FIELD_TYPE_INT32 | FIELD_ID_CHANGE_PREV_VERSION, (int)record.prevVersion);
yro4beccbe2018-03-15 19:42:05 -0700327 proto->end(changesToken);
David Chenf384b902018-03-14 18:36:45 -0700328 }
329 }
330
David Chenbd125272018-04-04 19:02:50 -0700331 // Write snapshot from current uid map state.
332 uint64_t snapshotsToken =
333 proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_SNAPSHOTS);
334 proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_TIMESTAMP, (long long)timestamp);
335 for (const auto& kv : mMap) {
336 uint64_t token = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
337 FIELD_ID_SNAPSHOT_PACKAGE_INFO);
338 proto->write(FIELD_TYPE_STRING | FIELD_ID_SNAPSHOT_PACKAGE_NAME, kv.first.second);
339 proto->write(FIELD_TYPE_INT32 | FIELD_ID_SNAPSHOT_PACKAGE_VERSION,
340 (int)kv.second.versionCode);
341 proto->write(FIELD_TYPE_INT32 | FIELD_ID_SNAPSHOT_PACKAGE_UID, kv.first.first);
342 proto->write(FIELD_TYPE_BOOL | FIELD_ID_SNAPSHOT_PACKAGE_DELETED, kv.second.deleted);
343 proto->end(token);
David Chenf384b902018-03-14 18:36:45 -0700344 }
David Chenbd125272018-04-04 19:02:50 -0700345 proto->end(snapshotsToken);
David Chenf384b902018-03-14 18:36:45 -0700346
David Chend6896892017-10-25 11:49:03 -0700347 int64_t prevMin = getMinimumTimestampNs();
348 mLastUpdatePerConfigKey[key] = timestamp;
349 int64_t newMin = getMinimumTimestampNs();
350
David Chenf384b902018-03-14 18:36:45 -0700351 if (newMin > prevMin) { // Delete anything possible now that the minimum has
352 // moved forward.
David Chend6896892017-10-25 11:49:03 -0700353 int64_t cutoff_nanos = newMin;
Yao Chen34900c32018-03-19 13:43:29 -0700354 for (auto it_changes = mChanges.begin(); it_changes != mChanges.end();) {
David Chenf384b902018-03-14 18:36:45 -0700355 if (it_changes->timestampNs < cutoff_nanos) {
356 mBytesUsed -= kBytesChangeRecord;
Yao Chen34900c32018-03-19 13:43:29 -0700357 it_changes = mChanges.erase(it_changes);
358 } else {
359 ++it_changes;
David Chend6896892017-10-25 11:49:03 -0700360 }
361 }
362 }
David Chenc136f452017-11-27 11:52:26 -0800363 StatsdStats::getInstance().setCurrentUidMapMemory(mBytesUsed);
David Chenf384b902018-03-14 18:36:45 -0700364 StatsdStats::getInstance().setUidMapChanges(mChanges.size());
David Chende701692017-10-05 13:16:02 -0700365}
366
Yao Chend10f7b12017-12-18 12:53:50 -0800367void UidMap::printUidMap(FILE* out) const {
David Chende701692017-10-05 13:16:02 -0700368 lock_guard<mutex> lock(mMutex);
369
David Chenbd125272018-04-04 19:02:50 -0700370 for (const auto& kv : mMap) {
371 if (!kv.second.deleted) {
372 fprintf(out, "%s, v%" PRId64 " (%i)\n", kv.first.second.c_str(), kv.second.versionCode,
373 kv.first.first);
374 }
David Chende701692017-10-05 13:16:02 -0700375 }
376}
377
David Chend6896892017-10-25 11:49:03 -0700378void UidMap::OnConfigUpdated(const ConfigKey& key) {
379 mLastUpdatePerConfigKey[key] = -1;
380}
381
382void UidMap::OnConfigRemoved(const ConfigKey& key) {
383 mLastUpdatePerConfigKey.erase(key);
384}
385
Yao Chend10f7b12017-12-18 12:53:50 -0800386set<int32_t> UidMap::getAppUid(const string& package) const {
387 lock_guard<mutex> lock(mMutex);
388
389 set<int32_t> results;
David Chenbd125272018-04-04 19:02:50 -0700390 for (const auto& kv : mMap) {
391 if (kv.first.second == package && !kv.second.deleted) {
392 results.insert(kv.first.first);
Yao Chend10f7b12017-12-18 12:53:50 -0800393 }
394 }
395 return results;
396}
397
Yao Chen147ce602017-12-22 14:35:34 -0800398// Note not all the following AIDs are used as uids. Some are used only for gids.
399// It's ok to leave them in the map, but we won't ever see them in the log's uid field.
400// App's uid starts from 10000, and will not overlap with the following AIDs.
401const std::map<string, uint32_t> UidMap::sAidToUidMapping = {{"AID_ROOT", 0},
402 {"AID_SYSTEM", 1000},
403 {"AID_RADIO", 1001},
404 {"AID_BLUETOOTH", 1002},
405 {"AID_GRAPHICS", 1003},
406 {"AID_INPUT", 1004},
407 {"AID_AUDIO", 1005},
408 {"AID_CAMERA", 1006},
409 {"AID_LOG", 1007},
410 {"AID_COMPASS", 1008},
411 {"AID_MOUNT", 1009},
412 {"AID_WIFI", 1010},
413 {"AID_ADB", 1011},
414 {"AID_INSTALL", 1012},
415 {"AID_MEDIA", 1013},
416 {"AID_DHCP", 1014},
417 {"AID_SDCARD_RW", 1015},
418 {"AID_VPN", 1016},
419 {"AID_KEYSTORE", 1017},
420 {"AID_USB", 1018},
421 {"AID_DRM", 1019},
422 {"AID_MDNSR", 1020},
423 {"AID_GPS", 1021},
424 // {"AID_UNUSED1", 1022},
425 {"AID_MEDIA_RW", 1023},
426 {"AID_MTP", 1024},
427 // {"AID_UNUSED2", 1025},
428 {"AID_DRMRPC", 1026},
429 {"AID_NFC", 1027},
430 {"AID_SDCARD_R", 1028},
431 {"AID_CLAT", 1029},
432 {"AID_LOOP_RADIO", 1030},
433 {"AID_MEDIA_DRM", 1031},
434 {"AID_PACKAGE_INFO", 1032},
435 {"AID_SDCARD_PICS", 1033},
436 {"AID_SDCARD_AV", 1034},
437 {"AID_SDCARD_ALL", 1035},
438 {"AID_LOGD", 1036},
439 {"AID_SHARED_RELRO", 1037},
440 {"AID_DBUS", 1038},
441 {"AID_TLSDATE", 1039},
442 {"AID_MEDIA_EX", 1040},
443 {"AID_AUDIOSERVER", 1041},
444 {"AID_METRICS_COLL", 1042},
445 {"AID_METRICSD", 1043},
446 {"AID_WEBSERV", 1044},
447 {"AID_DEBUGGERD", 1045},
448 {"AID_MEDIA_CODEC", 1046},
449 {"AID_CAMERASERVER", 1047},
450 {"AID_FIREWALL", 1048},
451 {"AID_TRUNKS", 1049},
452 {"AID_NVRAM", 1050},
453 {"AID_DNS", 1051},
454 {"AID_DNS_TETHER", 1052},
455 {"AID_WEBVIEW_ZYGOTE", 1053},
456 {"AID_VEHICLE_NETWORK", 1054},
457 {"AID_MEDIA_AUDIO", 1055},
458 {"AID_MEDIA_VIDEO", 1056},
459 {"AID_MEDIA_IMAGE", 1057},
460 {"AID_TOMBSTONED", 1058},
461 {"AID_MEDIA_OBB", 1059},
462 {"AID_ESE", 1060},
463 {"AID_OTA_UPDATE", 1061},
464 {"AID_AUTOMOTIVE_EVS", 1062},
465 {"AID_LOWPAN", 1063},
466 {"AID_HSM", 1064},
Yao Chen29f79b52018-01-17 10:56:48 -0800467 {"AID_RESERVED_DISK", 1065},
468 {"AID_STATSD", 1066},
469 {"AID_INCIDENTD", 1067},
Yao Chen147ce602017-12-22 14:35:34 -0800470 {"AID_SHELL", 2000},
471 {"AID_CACHE", 2001},
472 {"AID_DIAG", 2002}};
473
David Chende701692017-10-05 13:16:02 -0700474} // namespace statsd
475} // namespace os
Yao Chen29f79b52018-01-17 10:56:48 -0800476} // namespace android