summaryrefslogtreecommitdiffstats
path: root/packages/DefaultContainerService
Commit message (Collapse)AuthorAgeFilesLines
* Stronger PackageParser contract, more split work.Jeff Sharkey2014-06-181-6/+7
| | | | | | | | | | | | | | | | | | | Require that method callers always provide relevant paths, instead of relying on constructor. Move DisplayMetrics to be an overall parser parameter, and move PARSE_TRUSTED_OVERLAY to flags. Parse split APKs and apply deterministic ordering based on split names. Assert consistent package name and version code across all split APKs in a package, and enforce unique split names and required base APK. Collect certificates for split APKs, enforcing they're all signed consistently. Better flow control and resource cleanup when collecting certs. Refactor validation code so it's easier to reason about. Cleaner maintenance of read buffer when draining stream contents. Change-Id: I8bc8c62095fbb933227b9e76ad8771f4b1246fe8
* Switch PackageParser to reference single path.Jeff Sharkey2014-06-161-1/+1
| | | | | | | | | | | | | | | | | It previously kept mPath separate from mScanPath for some very odd edge cases around moving apps-on-SD. This changes it to always use a single path, refactors moving to keep separate paths. Refactors method names in PackageParser to be clearer about their APK-versus-package relationship. Beginnings of a split package parser. Instead of requiring that callers check error codes when null, switch to always throwing on parse errors, to require that callers deal with the error. Longer term the entire parser should switch to this style, but its too pervasive for a simple refactoring. Change-Id: If071d8e55e46e56cc201fadfb51cb471713ae973
* am 00e3c58d: am 73f7cd98: Merge "Fix build."Narayan Kamath2014-06-031-1/+1
|\ | | | | | | | | * commit '00e3c58d0232952bdcafd02f71e6c9fb00b4d248': Fix build.
| * Fix build.Narayan Kamath2014-06-031-1/+1
| | | | | | | | | | | | Bad resolution of a manual rebase. Change-Id: I56d4c7a343c8fd7a715f983b2db15767849f9af7
* | am dd2e9d33: am 7cb13f8a: Merge "Scan for renderscript files before deciding ↵Narayan Kamath2014-06-031-3/+16
|\ \ | |/ | | | | | | | | | | ABIs." * commit 'dd2e9d3386d2d74f99f79bcad951ff5cdefa6fab': Scan for renderscript files before deciding ABIs.
| * Scan for renderscript files before deciding ABIs.Narayan Kamath2014-06-031-3/+16
| | | | | | | | | | | | | | | | | | The presence of ".bc" files in an APK implies incompatibility with any of the 64 bit ABIs. bug: 14900093 Change-Id: I66ca339a9a149cb3b7e7b349033d80acdeb4140a
| * Add an --abi argument to "pm install"Narayan Kamath2014-06-031-21/+25
| | | | | | | | | | | | | | | | This allows callers to force an install to a particular ABI. This is intended only for testing (and CTS) and is not meant for usage by the installer package. Change-Id: Icb1528c0cd35b1aa9323386cb35ff4aaba374fcb
* | Add an --abi argument to "pm install"Narayan Kamath2014-06-031-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | This allows callers to force an install to a particular ABI. This is intended only for testing (and CTS) and is not meant for usage by the installer package. bug: 14453227 (cherry picked from commit 6431d11cd420536aaa9d93ae510a3151ccc4df1d) Change-Id: I85d4f8785deea02a6a4d3cb0b05e6ef8bf64826b
* | Import translations. DO NOT MERGEBaligh Uddin2014-05-201-1/+1
| | | | | | | | | | Change-Id: If356617f03ddecc5b3512f53e4061887c9e74bb0 Auto-generated-cl: translation import
* | am 05678e17: resolved conflicts for merge of 3ce4f3d0 to masterElliott Hughes2014-04-281-6/+6
|\ \ | | | | | | | | | | | | * commit '05678e17e8c079a1c1c144e23e40a7a644a0b040': Track libcore.os' move to android.system.
| * \ resolved conflicts for merge of 3ce4f3d0 to masterElliott Hughes2014-04-281-6/+6
| |\ \ | | |/ | | | | | | Change-Id: Id5c5997ad8f801b32e1dbd97413ea42e38c27210
| | * Track libcore.os' move to android.system.Elliott Hughes2014-04-281-6/+6
| | | | | | | | | | | | | | | | | | | | | (This is partial, but should cover everything in AOSP master except for the zygote.) Change-Id: I1042c99245765746a744c44e714095cb2c6cb75d
| | * Use LOCAL_JNI_SHARED_LIBRARIES to install JNI libs.Ying Wang2014-04-181-1/+1
| | | | | | | | | | | | Change-Id: Ibef01983891377b859d28cff801f48ef5d8eabb2
| * | Import translations. DO NOT MERGEBaligh Uddin2014-04-231-1/+1
|/ / | | | | | | | | Change-Id: Ic8c5ae13c6ed3ad711170586a245452195c6d963 Auto-generated-cl: translation import
* | Use LOCAL_JNI_SHARED_LIBRARIES to install JNI libs.Ying Wang2014-04-171-1/+1
| | | | | | | | Change-Id: Ibef01983891377b859d28cff801f48ef5d8eabb2
* | resolved conflicts for merge of 286a247e to masterNarayan Kamath2014-04-101-4/+29
|\ \ | |/ | | | | Change-Id: I63df9d482da3ce2ac851959223b9180020ffad0c
| * Re-implement native library search and copies.Ramin Zaghi2014-04-091-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use a two step approach : - First we look through the list of shared libraries in an APK, and choose an ABI based on the (priority) list of ABIs a given device supports. - Then we look through the list of shared libraries and copy all shared libraries that match the ABI we've selected. This fixes a long-standing bug where we would sometimes copy a mixture of different ABIs to the device, and also allows us to clearly pick an ABI to run an app with. The code in NativeLibraryHelper has been refactored so that all file name validation & matching logic is done in a single place (NativeLibrariesIterator). This allows us to avoid a lot of redundant logic and straightens out a few corner cases (for eg. where the abi determination & copying logic do not agree on what files to skip). bug: https://code.google.com/p/android/issues/detail?id=65053 bug: 13647418 Change-Id: I34d08353f24115b0f6b800a7eda3ac427fa25fef Co-Authored-By: Zhenghua Wang <zhenghua.wang0923@gmail.com> Co-Authored-By: Ramin Zaghi <ramin.zaghi@arm.com> Co-Authored-By: Narayan Kamath <narayan@google.com>
* | Remove deprecated localesBaligh Uddin2013-12-098-192/+0
| | | | | | | | | | Bug:11340849 Change-Id: Ib99486303927a6bce308b113d70f8e5b5bce4a13
* | Remove unused imports from frameworks/base.John Spurlock2013-11-201-2/+0
| | | | | | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* | Import translations. DO NOT MERGEBaligh Uddin2013-08-282-0/+48
| | | | | | | | | | Change-Id: I6b9b8488aabcd5c903c1fa32b66b04d9b29101ac Auto-generated-cl: translation import
* | Import translations. DO NOT MERGEBaligh Uddin2013-08-268-0/+192
| | | | | | | | | | Change-Id: I626a2582ed52cc4fe4c45d52c6f15527e1d5715e Auto-generated-cl: translation import
* | Import translations. DO NOT MERGEBaligh Uddin2013-08-1911-0/+264
|/ | | | | Change-Id: Ifff3fa5dd9cfb5a7f3fc84f4cf14ffa42446fbe0 Auto-generated-cl: translation import
* Catch a few extra users of UserEnvironment.Jeff Sharkey2013-08-111-3/+9
| | | | Change-Id: I3112773b72c329893e4118ef1c4f4087d899139e
* am dff4ec87: am e16a21c6: resolved conflicts for merge of 4a59376d to ↵Elliott Hughes2013-07-111-2/+2
|\ | | | | | | | | | | | | stage-aosp-master * commit 'dff4ec87e7b942b7b4410f639fc74c2cffb386d6': Track libcore API change.
| * resolved conflicts for merge of 4a59376d to stage-aosp-masterElliott Hughes2013-07-091-2/+2
| |\ | | | | | | | | | Change-Id: I0e40180b46dc58781c218b8d382299dab73d49cc
| | * Track libcore API change.Elliott Hughes2013-07-091-2/+2
| | | | | | | | | | | | Change-Id: Ib818a7f21325c5f918bf497033a90d76b25ec9e7
* | | Some system apps are more system than othersChristopher Tate2013-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "signatureOrSystem" permissions are no longer available to all apps residing en the /system partition. Instead, there is a new /system/priv-app directory, and only apps whose APKs are in that directory are allowed to use signatureOrSystem permissions without sharing the platform cert. This will reduce the surface area for possible exploits of system- bundled applications to try to gain access to permission-guarded operations. The ApplicationInfo.FLAG_SYSTEM flag continues to mean what it is says in the documentation: it indicates that the application apk was bundled on the /system partition. A new hidden flag FLAG_PRIVILEGED has been introduced that reflects the actual right to access these permissions. At some point the "system" permission category will be renamed to "privileged". Bug 8765951 Change-Id: I6f0fd9cdb9170e076dfc66d83ecea76f8dd7335d
* | | Always close incoming PFD to avoid leaking.Jeff Sharkey2013-04-251-0/+2
|/ / | | | | | | Change-Id: I9559bb1e83c9bf2f9fd2af9c7b0d8b9e3aadc4ae
* | Add liblogYing Wang2013-04-091-2/+3
| | | | | | | | | | Bug: 8580410 Change-Id: I746aa8258866508c3a725d0773faf4518096548f
* | Improve performance of storage measurement.Jeff Sharkey2013-03-012-8/+13
|/ | | | | | | | | | | | | | When calculating directory sizes of data living on emulated external storage, translate the path to use the internal backing data, which avoids going through the emulation layer. It carefully retreats to the original path when it runs into trouble. Testing with a hierarchy of 10 directories deep and 2 directories and 10 files wide at each level, this change improves performance from 5900ms before to 250ms after; over 20 times faster (!). Bug: 8172425 Change-Id: Ia7365416f091e102bf7345a49f7d7209a22580a9
* am afdd978c: am 68e0da7e: Merge "Quiet down a lot of logging." into jb-mr1.1-devDianne Hackborn2012-11-291-1/+1
|\ | | | | | | | | * commit 'afdd978ccd8d45ac789873dd4cf0ab0dd3f46d20': Quiet down a lot of logging.
| * Quiet down a lot of logging.Dianne Hackborn2012-11-271-1/+1
| | | | | | | | | | | | | | Also fix a little problem where the USER_STARTED broadcasts were not being sent as ordered broadcasts(!). Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
* | am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-072-0/+0
|\ \ | |/ |/| | | | | * commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04': Correct executable bit for source files
| * Correct executable bit for source filesKenny Root2012-11-072-0/+0
| | | | | | | | | | | | | | | | | | Many media files and source code files were marked as executable in Git. Remove those. Also a shell script and python script were not marked as executable. Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
* | Try to free cache before giving up on installKenny Root2012-10-181-0/+15
| | | | | | | | | | | | | | | | Try to get installd to free up cache before giving up when there is too little space free. Bug: 7232123 Change-Id: Ie3c8ca8dfc190abbb9a29a7baee31f32e9de7d69
* | Migrate more Secure settings to Global.Jeff Sharkey2012-09-271-2/+2
| | | | | | | | | | | | | | | | Migrate networking, storage, battery, DropBox, and PackageManager related Secure settings to Global table. Bug: 7232014, 7231331, 7231198 Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
* | 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