summaryrefslogtreecommitdiffstats
path: root/packages/DefaultContainerService
Commit message (Collapse)AuthorAgeFilesLines
* Always bind to DefaultContainerService as OWNER.Jeff Sharkey2012-09-231-7/+9
| | | | | | | | | When PackageManagerService deals with external storage, always bind to DefaultContainerService as USER_OWNER. This avoids binding to a stopped user, which would fail. Bug: 7203111 Change-Id: I8e303c7558e8b5cbe4fea0acc9a472b598df0caa
* Give DefaultContainerService all external storage.Jeff Sharkey2012-09-131-0/+1
| | | | | | | | | Now we can bind to just one instance of DCS, instead of requiring one-per-user. This also means we can operate on otherwise-stopped users. Bug: 7003520 Change-Id: I4881e064ae8942907f6a02c6b868926223455cdc
* Keep track of whether an app is installed for each user.Dianne Hackborn2012-08-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add a new per-user state for an app, indicating whether it is installed for that user. All system apps are always installed for all users (we still use disable to "uninstall" them). Now when you call into the package manager to install an app, it will only install the app for that user unless you supply a flag saying to install for all users. Only being installed for the user is just the normal install state, but all other users have marked in their state for that app that it is not installed. When you call the package manager APIs for information about apps, uninstalled apps are treated as really being not visible (somewhat more-so than disabled apps), unless you use the GET_UNINSTALLED_PACKAGES flag. If another user calls to install an app that is already installed, just not for them, then the normal install process takes place but in addition that user's installed state is toggled on. The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED, PACKAGE_REPLACED etc broadcasts to users who don't have a package installed or not being involved in a change in the install state. There are a few things that are not quite right with this -- for example if you go through a full install (with a new apk) of an app for one user who doesn't have it already installed, you will still get the PACKAGED_REPLACED messages even though this is technically the first install for your user. I'm not sure how much of an issue this is. When you call the existing API to uninstall an app, this toggles the installed state of the app for that user to be off. Only if that is the last user user that has the app uinstalled will it actually be removed from the device. Again there is a new flag you can pass in to force the app to be uninstalled for all users. Also fixed issues with cleaning external storage of apps, which was not dealing with multiple users. We now keep track of cleaning each user for each package. Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
* resolved conflicts for merge of a9c38461 to masterDianne Hackborn2012-06-291-0/+9
|\ | | | | | | Change-Id: Ie7044c4f9f15384c3edd328fa8e2932c731d9d5c
| * Fix issue #6761130: Clearing app data in settings does not clear app's USB ↵Dianne Hackborn2012-06-291-0/+10
| | | | | | | | | | | | | | | | | | | | storage The package manager calls to clear data / clear cache were not also having default container service clear the data on external storage. Now they do. Change-Id: Ib5e5eb6adf2cac5a4cc094cc1a02ac8cfb6a2edf
* | Import translations. DO NOT MERGEEric Fischer2012-06-211-1/+1
| | | | | | | | Change-Id: Iad1ec06b30d1e06958ae84f36d860f9ec522135f
* | Import translations. DO NOT MERGEEric Fischer2012-06-204-4/+4
| | | | | | | | Change-Id: Ic0044b2b8a5d2973a6fcc10f947bdf3b47c0bb6d
* | Import translations. DO NOT MERGEYing Wang2012-06-201-1/+1
| | | | | | | | Change-Id: If56cf4c763d2994bfe838b5b9ebab92a585a135b
* | Add an icon to the user information.Amith Yamasani2012-06-121-0/+1
| | | | | | | | | | | | | | Store the icon in the user folder under /data/system, similar to how the wallpaper is stored. Change-Id: Id8ccb55b9e2ba7b4c557505a7f69f04eca1518cf
* | Import translations. DO NOT MERGEEric Fischer2012-05-251-1/+1
|/ | | | Change-Id: Ic32791829a4f220236aacfc5004471894db915a7
* Change thread priority for disk measurement to bgKenny Root2012-05-141-0/+4
| | | | | | | | | | | Change the thread priority for all disk measurement and statfs calls to background priority. Also move the measurement fully into the measurement task since it makes more sense. Bug: 6332097 Change-Id: Iafc2151313ad9b14117daf67e933dccd32f68d54
* Use long instead of int for file offsetsKenny Root2012-05-101-7/+18
| | | | | | | | Use long instead of int so we don't run into a 2GB file limit. Fix possible overflows in offset and length. Change-Id: Idb3a34f5600f9c2372b9c89256f21757049fa43b
* Add encryption parameters to package installationAnonymous Coward2012-05-071-58/+218
| | | | Change-Id: Ic9f8ab9f8110f08bb3c00725cfce5b8ee7b766f3
* Fix some problems with ASECsKenny Root2012-05-021-2/+9
| | | | | | | | | | | | On devices that had external storage, permissions weren't set correctly on non-forward-locked applications. Also, moving forward locked applications didn't work since DefaultContainerService wasn't able to read it. Fixed some faulty unit tests as well. Bug: 6427212 Change-Id: I5c1f0bf5278549069c78939f0708c4c43a7d4006
* Allow forward locked apps to be in ASECsKenny Root2012-04-251-42/+78
| | | | | | | | | | | | | | | We couldn't put forward-locked apps in ASEC containers before since we didn't have any permissioned filesystems. This adds the ability for forward-locked applications to be in ASEC containers. This means that forward locked applications will be able to be on the SD card now. This change also removes the old type of forward-locking that placed parts of apps in /data/app-private. Now all forward-locked applications will be in ASEC containers. Change-Id: I17ae0b0d65a4a965ef33c0ac2c47e990e55707ad
* Expose statfs() through IMediaContainerService.Jeff Sharkey2012-04-221-0/+16
| | | | | Bug: 6346248 Change-Id: I03ae02578f546fc9f19652cbdece56e2e0ab6a1c
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-1/+1
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Import revised translations.Eric Fischer2011-11-022-0/+48
| | | | Change-Id: I71efb16f2c6b257dfd444728c7e56ada662e6f77
* Import revised translations.Eric Fischer2011-10-181-0/+24
| | | | Change-Id: I83ab00ec220b7c0ba0d37e7f4c91e945e35aab39
* Allow non-required package verifiersKenny Root2011-09-231-0/+1
| | | | | | | | | | * Verifiers can be specified in the AndroidManifest.xml * Those verifiers can respond to the new Intent action * PackageManager API for those verifiers: verifyPendingInstall Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5
* Add boot mode where only "core apps" are started.Dianne Hackborn2011-09-121-1/+1
| | | | | | | | | | | | A core app is one that has coreApp="true" in its manifest tag. The system can successfully boot (though a little painfully) with only framework-res.apk, SettingsProvider.apk, SystemUI.apk, DefaultContainerService.apk, and Launcher2.apk set as core apps. Currently this boot mode is always turned off. Change-Id: Ieaa4a8031c2c391a12996aa8d8b1d65fc2b09d6b
* Import revised translations.Eric Fischer2011-08-221-1/+1
| | | | Change-Id: I51335fa15a40d471010dbcc96e228b170f06ce7e
* Fix external size calculationsKenny Root2011-08-151-3/+3
| | | | | | | | Unfortunately fixed internal size calculations for HC, but never the external size calculations. Bug: 5113898 Change-Id: Idfe8af0ba74a20aa767eb9abac431ee1c74dcf8e
* Better errors from copyResourceKenny Root2011-08-101-53/+53
| | | | | | | | | | | | | | Copy resource would fail without a good error code when the file couldn't be found during copy. Also destroy the target container ID during move operations since it might exist. If the copy failed due to it existing, it would get destroyed anyway. This way the user has a chance to have a good outcome the first time. Bug: 3375299 Bug: 5113898 Change-Id: I00559833f0801bc50e7cc031b462495e37a6b4ab
* Better error codes for missing filesKenny Root2011-08-031-71/+123
| | | | | | | | | | | | Make sure that files that don't exist aren't returning bogus 'out of space' error codes. Add some Javadoc so I can remember what each thing does in an IDE. Add copyright header to NativeLibraryHelper Bug: 3375299 Change-Id: Iac46019160921daca65b21d38897e5165063316e
* Support full-backup encryption and global backup passwordChristopher Tate2011-07-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has supplied a backup password in Settings, that password is validated during the full backup process and is used as an encryption key for encoding the backed-up data itself. This is the fundamental mechanism whereby users can secure their data even against malicious parties getting physical unlocked access to their device. Technically the user-supplied password is not used as the encryption key for the backed-up data itself. What is actually done is that a random key is generated to use as the raw encryption key. THAT key, in turn, is encrypted with the user-supplied password (after random salting and key expansion with PBKDF2). The encrypted master key and a checksum are stored in the backup header. At restore time, the user supplies their password, which allows the system to decrypt the master key, which in turn allows the decryption of the backup data itself. The checksum is part of the archive in order to permit validation of the user-supplied password. The checksum is the result of running the user-supplied password through PBKDF2 with a randomly selected salt. At restore time, the proposed password is run through PBKDF2 with the salt described by the archive header. If the result does not match the archive's stated checksum, then the user has supplied the wrong decryption password. Also, suppress backup consideration for a few packages whose data is either nonexistent or inapplicable across devices or factory reset operations. Bug 4901637 Change-Id: Id0cc9d0fdfc046602b129f273d48e23b7a14df36
* Move extract native libraries to JNI codeKenny Root2011-07-261-28/+1
| | | | | | | | | | | | | The built-in ZipFile class was quite a long time to find an unpack libraries. Move everything to using the libutils ZipFileRO class that goes quite a bit faster. Initial measurements are 6 times faster than the Java code. Also, read files off the disk and compare their CRC against the APK's CRC to see if we need to write the new file to disk. This also cuts down the bootup time by up to a second per APK that has native files. Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
* Import revised translations.Eric Fischer2011-06-202-0/+48
| | | | Change-Id: Ie30d36d7416f687f2d84b0bdf6547cda96446f37
* Import revised translations.Eric Fischer2011-05-263-0/+72
| | | | Change-Id: I10a93a6f3a274354e88263d86a8855d1e7121f58
* Merge "Revise free space checks for package installs"Kenny Root2011-03-151-146/+163
|\
| * Revise free space checks for package installsKenny Root2011-03-141-146/+163
| | | | | | | | Change-Id: Ie72bbab77aa89a50ec096edc1f471eab74829e67
* | frameworks/base: remove LOCAL_PRELINK_MODULEIliyan Malchev2011-03-141-1/+1
|/ | | | | Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Erase OBB files when removing packagesKenny Root2011-01-181-0/+1
| | | | | | | | OBB files on USB storage or SD card should be removed when an application is removed. Bug: 3356804 Change-Id: Ifbbf043368b125fcd47fd74e5cd2e5167a8deb00
* Put externalSize measurements in PackageStatsKenny Root2011-01-161-2/+7
| | | | | | | | | When measuring a package's usage, put the external size in the PackageStats as well. This will allow programs using a lot of space on the external card to be held accountable. Bug: 3308791 Change-Id: If2df07bdbf6ffb31577074fad8f4a87ca4e89086
* Import revised translations.Eric Fischer2010-12-2320-20/+20
| | | | Change-Id: Ia6a9c2838156dd6f83aea9c4809c57f663c710af
* DefaultContainerService's JNI library is requiredKenny Root2010-12-071-1/+1
| | | | | | | | Change from LOCAL_JNI_SHARED_LIBRARIES to LOCAL_REQUIRED_MODULES to make sure the JNI library is built and included when DefaultContainerService is built. Change-Id: I322c72415237c2b70bff345d50e2a9e4f2e6d988
* Add measurement API to DefaultContainerServiceKenny Root2010-12-045-0/+153
| | | | | | | | | | System applications that don't have "media_rw" access need some way to measure the size of directories on the SD card and other internal media. Add this API to DefaultContainerService so they can simply bind to the service and make an RPC. Bug: 3203974 Change-Id: I4e1bcd7a1b702b156c011ecc04f6915022cb258a
* Rename Indonesian and Hebrew translations to match Locale.java conventionsEric Fischer2010-12-022-0/+0
| | | | Change-Id: Icf4f1896d13a4b6bf86503b16bde189f1834fdcc
* am 1de6ca69: am 938d0972: Merge "Grant ACCESS_ALL_DOWNLOADS to ↵Kenny Root2010-12-011-0/+1
|\ | | | | | | | | | | | | DefaultContainerService" into gingerbread * commit '1de6ca69cc541ccdd651071c8bd5629af4e09664': Grant ACCESS_ALL_DOWNLOADS to DefaultContainerService
| * Grant ACCESS_ALL_DOWNLOADS to DefaultContainerServiceKenny Root2010-12-011-0/+1
| | | | | | | | | | | | | | | | Be compatible with the old DownloadProvider behavior of being able to operate on content URIs returned from .insert() Bug: 3242328 Change-Id: I7dad15ac0fefa867c3c8a33a579fc9899ac80262
* | Import initial translations for 20 new locales.Eric Fischer2010-11-1720-0/+480
| | | | | | | | Change-Id: I37d479c9d6293eb57d68ad686d00838445a18890
* | Import revised translations.Eric Fischer2010-11-091-0/+24
| | | | | | | | Change-Id: I9fe6a999fc665faefbf0e7e222d5dfb4fdbcd3b1
* | Add API to check for emulated external storageKenny Root2010-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | When the storage is emulated, we don't want to install ASEC containers to it. This adds the API to check when the external storage is emulated and uses it to check whether or not to install packages to the external storage in an ASEC container. Bug: 3024387 Change-Id: Ia0318aca9e4938a4897deaada5603a4c7c1d0f48
* | am 4309b52f: am 735de3b3: Hash keys with MD5; track IBinders not IInterfaceKenny Root2010-09-301-1/+1
|\ \ | |/ | | | | | | | | | | Merge commit '4309b52fe19de5241113d8f9ebcdf52741e086a9' * commit '4309b52fe19de5241113d8f9ebcdf52741e086a9': Hash keys with MD5; track IBinders not IInterface
| * Hash keys with MD5; track IBinders not IInterfaceKenny Root2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Using a plaintext password doesn't work unless it's a certain length, so just hash the plaintext password with MD5 to make it the right length for the twofish encryption. Tracking the IInterface doesn't make much sense since it's different each time, so track the IBinder instead. That way we can unlinkToDeath the binder when the last thing it's holding onto goes away. Change-Id: Id828d25b4d74f27e9d8b4bfb3909c964469cc473
* | resolved conflicts for merge of d8e8186c to masterKenny Root2010-09-281-1/+6
|\ \ | |/ | | | | Change-Id: Ica3f6cd958717ea7033cab8b4bf9cd3425c1e1c5
| * Update OBB API to include callbacksKenny Root2010-09-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add a callback for users of the StorageManager API to be able to receive notifications when the requested operation completes for mountObb and unmountObb. Add NDK API to get to ObbInfo like the Java API has. Also update the docs for the API and remove the "STOPSHIP" comments. Change-Id: I23a4409c7f8b74d3169614beba920b4d667990a4
* | am 83285781: am 7046bd92: Merge "Allow native shared libraries in ASEC ↵Kenny Root2010-08-271-6/+75
|\ \ | |/ | | | | | | | | | | | | | | containers" into gingerbread Merge commit '8328578152fbfd23952a6cda4b2e60853d78eb74' * commit '8328578152fbfd23952a6cda4b2e60853d78eb74': Allow native shared libraries in ASEC containers
| * Allow native shared libraries in ASEC containersKenny Root2010-08-271-6/+75
| | | | | | | | | | | | | | | | | | | | | | This change moves the native library handling earlier in the package installation process so that it may be inserted into ASEC containers before they are finalized in the DefaultContainerService. Note that native libraries on SD card requires that vold mount ASEC containers without the "noexec" flag on the mount point. Change-Id: Ib34b1886bf6f94b99bb7b3781db6e9b5a58807ba
| * Import revised translations. DO NOT MERGEEric Fischer2010-08-1720-0/+480
| | | | | | | | Change-Id: Id47f0897de1361ba755f149b2886d7d1f79ff494