Home | History | Annotate | Download | only in pm

Lines Matching refs:SYSTEM

79 import static android.system.OsConstants.O_CREAT;
80 import static android.system.OsConstants.O_RDWR;
204 import android.system.ErrnoException;
205 import android.system.Os;
258 import dalvik.system.CloseGuard;
259 import dalvik.system.DexFile;
260 import dalvik.system.VMRuntime;
315 * momentarily, as it's one of the most contended locks in the system.
526 * Messages for {@link #mHandler} that need to wait for system ready before
592 * Tracks new system packages [received in an OTA] that we expect to
603 * of these during boot as we need to look at all of the system packages in order
613 * Tracks existing system packages prior to receiving an OTA. Keys are package name.
617 * Whether or not system app permissions should be promoted from install to runtime.
638 // System configuration read by SystemConfig.
693 // Broadcast actions that are only available to the system.
1117 // System/policy permission grants are not backed up
1151 Context.BIND_AUTO_CREATE, UserHandle.SYSTEM)) {
1191 System.identityHashCode(mHandler));
1198 System.identityHashCode(mHandler));
1224 System.identityHashCode(mHandler));
1235 System.identityHashCode(params));
1250 System.identityHashCode(params));
1300 System.identityHashCode(params));
1330 System.identityHashCode(params));
1652 // children if the parent on the system image had them already granted.
1984 // For system user, enable apps based on the following conditions:
1986 // -- system app which has no launcher icons
1987 // -- system app which has INTERACT_ACROSS_USERS permission
1988 // -- system IME app
1994 | AppsQueryHelper.GET_IMES, /* systemAppsOnly */ true, UserHandle.SYSTEM));
1998 /* systemAppsOnly */ false, UserHandle.SYSTEM));
2001 Log.i(TAG, "Applications installed for system user: " + enableApps);
2003 UserHandle.SYSTEM);
2016 + " for system user");
2030 * Requests that files preopted on a secondary system partition be copied to the data partition
2033 * completion. See platform/system/extras/cppreopt/ for the implementation of the actual copy.
2071 mSettings.addSharedUserLPw("android.uid.system", Process.SYSTEM_UID,
2165 // and they are an update to a system app - caused by bug/32321269
2198 final String bootClassPath = System.getenv("BOOTCLASSPATH");
2199 final String systemServerClassPath = System.getenv("SYSTEMSERVERCLASSPATH");
2218 // NOTE: For now, we're compiling these system "shared libraries"
2258 // when upgrading from pre-M, promote system app permissions from install to runtime
2268 // save off the names of pre-existing system packages prior to scanning; we don't
2269 // want to automatically grant runtime permissions for new system apps
2297 // Collected privileged system packages.
2304 // Collect ordinary system packages.
2327 // Prune any system packages that no longer exist.
2335 * If this is not a system app, it can't be a
2336 * disable system app.
2348 * If the system app is both scanned and in the
2355 logCriticalInfo(Log.WARN, "Expecting better updated system app for "
2356 + ps.name + "; removing system app. Last known codePath="
2369 logCriticalInfo(Log.WARN, "System package " + ps.name
2414 * Remove disable package settings for any updated system
2417 * Otherwise, just revoke their system-level permissions.
2425 msg = "Updated system package " + deletedAppName
2430 msg = "Updated system app + " + deletedAppName
2431 + " no longer present; removing system privileges for "
2443 * Make sure all system apps that we expected to appear on
2445 * appeared, crawl back and revive the system version.
2453 system");
2479 Slog.e(TAG, "Failed to parse original system package: "
2525 // NOTE: We ignore potential failures here during a system scan (like
2569 // Prepare storage for system user really early during boot,
2570 // since core system apps like SettingsProvider and SystemUI
2614 // components in the system server might ask for package contexts for these apps.
2616 // Note that "onlyCore" in this context means the system is encrypted or encrypting
2619 long start = System.nanoTime();
2631 (int) TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start);
2712 // once we have a booted system.
2715 // Expose private service for system components to use.
2911 Slog.w(TAG, "Non-system app '" + packageName + "' in sysconfig <app-link>");
3090 throw new SecurityException("Package " + packageName + " not a system app!");
3353 if ("android".equals(packageName)||"system".equals(packageName)) {
3792 * Checks if the request is from the system or an app that has INTERACT_ACROSS_USERS
4058 throw new SecurityException("Cannot grant system fixed permission "
4168 throw new SecurityException("Cannot revoke system fixed permission "
4273 // Only the system can change these flags and nothing else.
4331 // Only the system can change system fixed flags.
4580 * system upgrade) and {@code scannedSigs} will be in the newer format.
4804 filter.dump(new PrintStreamPrinter(System.out), " ");
4832 // system isn't up yet; can't read settings, so, assume no ephemeral apps
4836 // we can't get a content resolver until the system is ready; these checks must happen last
4893 // We've exhausted all ways to deny ephemeral application; let the system look for them.
5518 * Filter out activities with systemUserOnly flag set, when current user is not System.
6680 File systemDir = new File(dataDir, "system");
6697 String dateString = formatter.format(new Date(System.currentTimeMillis()));
6868 // Check to see if this package could be hiding/updating a system
6874 // If this is a package we don't know about on the system partition, we
6875 // may need to remove disabled child packages on the system partition
6879 // If this is a parent package for an updated system app and this system
6881 // we have to prune them from the disabled system packages.
6907 // First check if this is a system package that may involve an update
6909 // If new package is not located in "/system/priv-app" (e.g. due to an OTA),
6923 // The system package has been updated and the code path does not match
6929 Slog.w(PackageManagerService.TAG, "Code path for hidden system pkg "
6940 // Update the disabled system child packages to point to the package too.
6957 // The current app on the system partition is better than
6959 // back to the system partition version.
6961 // apps in system partition will go through. If not there won't be a working
6988 // An updated system app will not have the PARSE_IS_SYSTEM flag set
7003 * A new system app appeared, but we already had a non-system one of the
7015 logCriticalInfo(Log.WARN, "Package " + ps.name + " appeared on system, but"
7024 * If the newly-added system app is an older version than the
7032 + ps.versionCode + "; hiding system");
7035 * The newly found system app is a newer version that the
7053 // are kept in different files. (except for app in either system or
7092 * If the system app should be overridden by a previously installed
7093 * data, hide the system app now and let the /data/app scan pick it up
7157 * Enforces that only the system UID or root's UID can call a method exposed
7161 * @throws SecurityException if the caller is not system or root
7172 enforceSystemOrRoot("Only the system can request fstrim");
7184 final long timeSinceLast = System.currentTimeMillis() - ms.lastMaintenance();
7216 enforceSystemOrRoot("Only the system can request package update");
7238 final long startTime = System.nanoTime();
7243 (int) TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - startTime);
7295 // If the OTA updates a system app which was previously preopted to a non-preopted state
7344 p.mLastPackageUsageTimeInMills[reason] = System.currentTimeMillis();
7567 + ": old package not in system partition");
8017 // Only allow system apps to be flagged as core apps.
8061 mResolveActivity.processName = "system:ui";
8103 // With a singular exception for new system packages. When an OTA contains
8104 // a new system package, we allow the codepath to change from a system location
8141 // Only system apps can use these features.
8277 // We only do this here for apps not on a system dir, because those
8279 // will take care of the system apps by updating all of their
8302 String msg = "System package " + pkg.packageName
8317 // The signature has changed, but this package is in the system
8335 String msg = "System package " + pkg.packageName
8405 // Some system apps still use directory structure for native libraries
8430 // This is a special case for the "system" package, where the ABI is
8518 + "another disabled system app. Ignoring package " + pkg.packageName);
8526 // Only system apps can add new shared libraries.
8533 // system image. This is important to get rid of a lot
8535 // system update of the app to add a library, then uninstalling
8564 + name + " that is not declared on system image; skipping");
8613 // part of the system partition and marker changes must be applied to all users.
8643 // A package on the system image has changed; consider this
8816 // Assume by default that we did not install this permission into the system.
8837 // Allow system apps to redefine non-system permissions
8851 + p.info.name + " is system; overriding " + bp.sourcePackage;
9051 * Derive the ABI of a non-system package located at {@code scanFile}. This information
9062 // system apps, we can probably assume that this information doesn't change
9071 // extract libs from system app when it was not updated.
9390 // If "/system/lib64/apkname" exists, assume that is the per-package
9391 // native library directory to use; otherwise use "/system/lib/apkname".
9396 // This is a bundled system app so choose the path based on the ABI.
9437 * be determined from the contents of the system partition, i.e whether
9439 * of this information, and instead assume that the system was built
9446 // If "/system/lib64/apkname" exists, assume that is the per-package
9447 // native library directory to use; otherwise use "/system/lib/apkname".
9466 * @param apkRoot the root of the installed apk, something like {@code /system} or {@code /oem}
9467 * under which system libraries are installed.
9776 // Only system apps can hold shared libraries.
9896 // replace the granted permissions of the system packages.
10023 // For legacy system apps, install becomes runtime.
10024 // We cannot check hasInstallPermission() for system apps since those
10048 // If this is an existing, non-system package, then
10249 // For updated system applications, a system permission
10262 // The system apk may have been updated with an older
10264 // granted a new system permission that it didn't have
10276 // Also if a privileged parent package on the system image or any of
10311 // to a system permission as part of the runtime permission redesign, then
10317 // If this permission is to be granted to the system installer and
10323 // If this permission is to be granted to the system verifier and
10330 // Any pre-installed system app is allowed to get this permission.
10341 // If this permission is to be granted to the system setup wizard and
10519 * priority defined on the system partition</li>
10548 // the system package is not disabled; we're parsing the system partition
10557 // priorities after all system packages have been scanned.
10590 // privileged apps on the system image get whatever priority they request
10706 // all this for nothing; the requested priority was <= what was on the system
10783 // System apps are never considered stopped for purposes of
10826 //System.out.println("Result: " + res.activityInfo.className +
10838 res.system = res.activityInfo.applicationInfo.isSystemApp();
10851 Integer.toHexString(System.identityHashCode(filter.activity)));
10855 out.println(Integer.toHexString(System.identityHashCode(filter)));
10866 Integer.toHexString(System.identityHashCode(activity)));
10990 // System apps are never considered stopped for purposes of
11036 res.system = res.serviceInfo.applicationInfo.isSystemApp();
11049 Integer.toHexString(System.identityHashCode(filter.service)));
11053 out.println(Integer.toHexString(System.identityHashCode(filter)));
11064 Integer.toHexString(System.identityHashCode(service)));
11208 // System apps are never considered stopped for purposes of
11255 res.system = res.providerInfo.applicationInfo.isSystemApp();
11269 Integer.toHexString(System.identityHashCode(filter.provider)));
11273 out.println(Integer.toHexString(System.identityHashCode(filter)));
11284 Integer.toHexString(System.identityHashCode(provider)));
11382 //System.out.println("Comparing: q1=" + q1 + " q2=" + q2);
11396 //System.out.println("Comparing: m1=" + m1 + " m2=" + m2);
11400 if (r1.system != r2.system) {
11401 return r1.system ? -1 : 1;
11576 // Only system components can circumvent runtime permissions when installing.
11595 params.setTraceMethod("installAsUser").setTraceCookie(System.identityHashCode(params));
11599 System.identityHashCode(msg.obj));
11601 System.identityHashCode(msg.obj));
11631 params.setTraceMethod("installStage").setTraceCookie(System.identityHashCode(params));
11635 System.identityHashCode(msg.obj));
11637 System.identityHashCode(msg.obj));
11658 // The just-installed/enabled app is bundled on the system, so presumed
12138 enforceSystemOrRoot("Only the system is allowed to finish installs");
12606 + Integer.toHexString(System.identityHashCode(this))
12826 return "InstallParams{" + Integer.toHexString(System.identityHashCode(this))
12884 // Check for updated system application.
12887 Slog.w(TAG, "Cannot install update to system app on sdcard");
13053 verifierUser = UserHandle.SYSTEM;
14195 System.currentTimeMillis(), user);
14312 // don't allow a system upgrade unless the upgrade hash matches
14393 // Set the system/privileged flags as needed
14462 scanFlags | SCAN_UPDATE_TIME, System.currentTimeMillis(), user);
14565 // Remove existing system package
14572 // We didn't need to disable the .apk as a current system package,
14600 System.currentTimeMillis());
14646 // Add back the old system package
14856 // For system-bundled packages, we assume that installing an upgraded version
14864 Slog.d(TAG, "Implicitly enabling system package on upgrade: " + pkgName);
14866 // Enable system package for requested users
15146 // If the owning package is the system itself, we log but allow
15158 + " attempting to redeclare system permission "
15169 // Abort update; system app can't be replaced with app on sdcard
15171 "Cannot install updates to system apps on sdcard");
15174 // Abort update; system app can't be replaced with an ephemeral app
15176 "Cannot update a system app with an ephemeral app");
15715 // We're downgrading a system app, which will apply to all users, so
15925 // a downgrade of a system app to the factory package
15964 * Tries to delete system package.
15970 Slog.w(TAG, "Attempt to delete child system package " + deletedPkg.packageName);
15977 // Confirm if the system package has been updated
15978 // An updated system app can be deleted. This will also have to restore
15979 // the system pkg from system partition
15989 Slog.w(TAG, "Attempt to delete unknown system package "+ deletedPkg.packageName);
15992 Slog.d(TAG, "Deleting system pkg from data partition");
16039 // Reinstate the old system package
16045 // Install the system package
16046 if (DEBUG_REMOVE) Slog.d(TAG, "Re-installing system package: " + disabledPs);
16059 Slog.w(TAG, "Failed to restore system package:" + deletedPkg.packageName + ": "
16064 // update shared libraries for the newly re-installed system package
16209 "setRequiredForSystemUser can only be run by the system or root");
16271 // its data. If this is a system app, we only allow this to happen if
16273 // semantics than normal for uninstalling system apps.
16296 // This is a system app, so we assume that the
16300 if (DEBUG_REMOVE) Slog.d(TAG, "Deleting system app");
16330 if (DEBUG_REMOVE) Slog.d(TAG, "Removing system package: " + ps.name);
16331 // When an updated system application is deleted we delete the existing resources
16332 // as well and fall back to existing code in system partition
16335 if (DEBUG_REMOVE) Slog.d(TAG, "Removing non-system package: " + ps.name);
16355 // If we uninstalled an update to a system app there may be some
16356 // child packages that appeared as they are declared in the system
16483 containerIntent, conn, Context.BIND_AUTO_CREATE, UserHandle.SYSTEM)) {
16519 enforceSystemOrRoot("Only the system can clear all profile data");
16721 // Never clobber system or policy.
16869 // For now, ignore code size of packages on system partition
17214 "addPersistentPreferredActivity can only be run by the system");
17236 "clearPackagePersistentPreferredActivities can only be run by the system");
17277 * it to a caller-supplied functor to be applied to the running system.
17320 throw new SecurityException("Only the system may call getPreferredActivityBackup()");
17350 throw new SecurityException("Only the system may call restorePreferredActivities()");
17381 throw new SecurityException("Only the system may call getDefaultAppsBackup()");
17411 throw new SecurityException("Only the system may call restoreDefaultApps()");
17437 throw new SecurityException("Only the system may call getIntentFilterVerificationBackup()");
17467 throw new SecurityException("Only the system may call restorePreferredActivities()");
17494 throw new SecurityException("Only the system may call getPermissionGrantBackup()");
17524 throw new SecurityException("Only the system may call restorePermissionGrants()");
17560 // only look at grants that are not system/policy fixed
17732 // The system owns everything.
18121 enforceSystemOrRoot("Only the system can request entering safe mode");
18137 // Read the compatibilty setting when the system is ready.
18199 // Kick off any messages waiting for system ready
19065 throw new SecurityException("Media status can only be updated by the system");
19549 // so we don't risk the system server being killed due to
19562 // the system server being killed due to open FDs
19566 System.gc();
19567 System.runFinalization();
19644 // Clean up system data
19898 * will try recovering system apps by wiping data; third-party app data is
19934 * will try recovering system apps by wiping data; third-party app data is
20037 * For system apps on non-FBE devices, this method migrates any existing
20235 "Cannot move system application");
20414 params.setTraceMethod("movePackage").setTraceCookie(System.identityHashCode(params));
20418 System.identityHashCode(msg.obj));
20420 System.identityHashCode(msg.obj));
20522 // Skip over if system app
21131 data.putLong("startTimestamp", System.currentTimeMillis());