summaryrefslogtreecommitdiffstats
path: root/cmds/installd
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Make system use patchoat to relocate during runtime.Alex Light2014-08-063-22/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make installd understand a patchoat directive and carry it out. Bug: 15358152 (cherry picked from commit 7365a10689df23334d245b211ce272502ad20669) Change-Id: Id84a15e626ddde63876914068d3d9aa037abc65b
| * | Fix implicit declaration of function 'prctl' in installd.Elliott Hughes2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | (cherry picked from commit ec535c5ba515f58791aa5044ba116d35a10a188e) Change-Id: I3da977d85ce544b23ff00934fdbd201d683e9210
* | | am 1a22eb7b: Merge "Change an accidental ALOGE to an ALOGV"Andreas Gampe2014-08-111-1/+1
|\ \ \ | | |/ | |/| | | | | | | * commit '1a22eb7ba1062ed1ee35cdb9d797019699cbce8b': Change an accidental ALOGE to an ALOGV
| * | Merge "Change an accidental ALOGE to an ALOGV"Andreas Gampe2014-08-111-1/+1
| |\ \
| | * | Change an accidental ALOGE to an ALOGVAlex Light2014-08-111-1/+1
| | | | | | | | | | | | | | | | Change-Id: If07bcef597dd9e531ce6d92c7780ba6ad5090f9a
* | | | am 82e98c21: Merge "Use set_sched_policy to put dexopt operations in ↵Narayan Kamath2014-08-111-0/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | SP_BACKGROUND cgroup" * commit '82e98c21f8606e0de8c6beb4372bc4ae9f52b515': Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup
| * | | Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroupBrian Carlstrom2014-08-081-0/+5
| |/ / | | | | | | | | | | | | Bug: 15927194 Change-Id: Id8bc188de68d62fd5f91a99aaaa6c8f2dea06abd
* | | am 8ce28672: Merge "Make system use patchoat to relocate during runtime."Brian Carlstrom2014-08-053-22/+102
|\ \ \ | |/ / | | | | | | | | | * commit '8ce28672106956eeff6d0ed2d1d826ec192e58ee': Make system use patchoat to relocate during runtime.
| * | Make system use patchoat to relocate during runtime.Alex Light2014-08-053-22/+102
| | | | | | | | | | | | | | | | | | | | | | | | Make installd understand a patchoat directive and carry it out. Bug: 15358152 Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
* | | am 74b3ecf4: Merge "Disable compilation based on vold.decrypt. ↵Brian Carlstrom2014-08-041-1/+11
|\ \ \ | |/ / | | | | | | | | | | | | | | | [frameworks/native]" * commit '74b3ecf485254d8cb4ae2b1d4d5221454738a58d': Disable compilation based on vold.decrypt. [frameworks/native]
| * | Disable compilation based on vold.decrypt. [frameworks/native]Brian Carlstrom2014-08-041-1/+11
| | | | | | | | | | | | | | | Bug: 15165413 Change-Id: Ibc39ab82e02e42345c6e2667ac45884f2e0cf7a4
* | | am 9c49e21d: Merge "Move from dalvik.vm.image-dex2oat-flags to ↵Brian Carlstrom2014-08-041-0/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | dalvik.vm.dex2oat-filter [frameworks/native]" * commit '9c49e21d80cb55b7d77fdf118f06b88100141678': Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]
| * | Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter ↵Brian Carlstrom2014-07-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | [frameworks/native] This will allow us to conditionally change the compiler-filter based on other properties. Bug: 15165413 Change-Id: Iff27dc2904f4f0d7c25a684cd6ba16a597f252fd
* | | am 4dd0d800: Merge "Fix implicit declaration of function \'prctl\' in installd."Elliott Hughes2014-07-191-1/+1
|\ \ \ | |/ / | | / | |/ |/| * commit '4dd0d8008a84d1b8e5d9cae2a3491fa92b79c388': Fix implicit declaration of function 'prctl' in installd.
| * Fix implicit declaration of function 'prctl' in installd.Elliott Hughes2014-07-181-1/+1
| | | | | | | | Change-Id: I469ee15a0a8a79d005b15aad5097b6c13c20ab7e
* | Offer to delete code cache directories.Jeff Sharkey2014-07-153-1/+20
|/ | | | | Bug: 16187224 Change-Id: Ia860b051a34ffdfb4f6e0ea19f90cb73509c4eee
* Merge "Rename 'mkuser' command to 'mkuserconfig'"Robin Lee2014-07-043-5/+5
|\
| * Rename 'mkuser' command to 'mkuserconfig'Robin Lee2014-06-103-5/+5
| | | | | | | | | | | | Brings the name more in line with what it actually does. Change-Id: I0adb14deb1a035abdbe51714356bd0c94ccf04c5
* | Make dex2oat heap size product configurable [frameworks/native]Brian Carlstrom2014-07-082-31/+40
| | | | | | | | | | Bug: 15919420 Change-Id: I0e629ff4f7541f0dde7380e0dbc8dab1c13df7bd
* | Use current max product dalvik.vm.heapsize as default dex2oat heap sizeBrian Carlstrom2014-06-271-1/+8
| | | | | | | | | | | | | | | | Bug: 15919420 (cherry picked from commit 3aa138617b42b87069dbac0b441bd14dca2d8609) Change-Id: I569ba111c6163e94dd1b09b21ef374f05d263e72
* | Merge "Exclude subdirectories when pruning the dex cache."Narayan Kamath2014-06-243-8/+29
|\ \
| * | Exclude subdirectories when pruning the dex cache.Narayan Kamath2014-06-203-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This requires a companion package manager change to prune each instruction specific dex cache individually. bug: 15677279 Change-Id: I5891981512bde20e49bff65b1842c28886f2b177
* | | Merge "Fix obsolete argument name"Brian Carlstrom2014-06-171-1/+1
|\ \ \ | |/ / |/| |
| * | Fix obsolete argument nameBrian Carlstrom2014-06-161-1/+1
| | | | | | | | | | | | Change-Id: I8030f055ee49dc86d4592f36791edddfc0d60a31
* | | Merge "Add an installd command to prune dex files."Narayan Kamath2014-06-104-12/+54
|\ \ \ | |/ / |/| |
| * | Add an installd command to prune dex files.Narayan Kamath2014-06-104-12/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a straightforward port of logic from PackageManagerService#pruneDexFiles. bug: 14407732 Change-Id: I892cff027ddcbb1a4fb37a7af5ecf1697049a188
* | | installd: change profile files to 0660Nick Kralevich2014-06-121-29/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling information leaks data about how people interact with apps, so we don't want the data to be available to other apps. Only the app and system_server need access. Don't create the /data/dalvik-cache/profiles directory. init.rc does it for us now. Change-Id: Ic1b44009faa30d704855e97631006c4b990a4ad3
* | | Merge "Pass --top-k-profile-threshold to dex2oat if available."Calin Juravle2014-06-101-16/+38
|\ \ \ | |_|/ |/| |
| * | Pass --top-k-profile-threshold to dex2oat if available.Calin Juravle2014-06-101-16/+38
| | | | | | | | | | | | | | | | | | | | | Also, don't pass --profile-file if the file is empty. Bug: 12877748 Change-Id: I587d198e64da709930e2cea50a87fed1525281e5
* | | Merge "Migrate keychain directories to /data/misc/user/0"Robin Lee2014-06-091-5/+29
|\ \ \ | |/ / |/| |
| * | Migrate keychain directories to /data/misc/user/0Robin Lee2014-06-051-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With new CA certificates being stored in /data/misc/user/<userid>/ existing ones need to be moved into the same place. After this update only the owner user will have custom trusted CAs; all other users will revert to the default set. Change-Id: I14a4cd6048685902ad5dd3b53494b03fadc41c04
* | | Don't always add profile-file option to dex2oatCalin Juravle2014-06-061-2/+14
|/ / | | | | | | | | | | | | | | | | Add profile-file option to dex2oat only if the profiler is active and the file exists. Bug: 12877748 Bug: 15275634 Change-Id: Icef76514c912c88311ed108f2be7a6329131f741
* | Add installd command to create /data/misc user dirRobin Lee2014-06-054-10/+97
|/ | | | | | | | New command 'mkuser <id>' sets up a user directory in /data/misc/user/, readable by all apps within that user and writeable by the local system process. Change-Id: I5ddde8c4a80f606e723bb41aa64581a0720842d5
* Move to dalvik.vm.lib.2 to force default to libartBrian Carlstrom2014-05-281-1/+1
| | | | | | | | Bug: 14298175 (cherry picked from commit c4ac3124ffb51f13bb4206e9f8452a3712eb09cb) Change-Id: I97cc3ff7a269e671b315afa8673dae43d1f86bf1
* Ensure that app lib symlinks are correctly labeled when created.Stephen Smalley2014-05-131-14/+14
| | | | | | | | | | | | | At present, the app lib symlinks are created before setting the package directory security context, and therefore default to system_data_file. Upon a later restorecon_recursive, they are relabeled to the same type as the package directory, e.g. app_data_file. Avoid this inconsistency by setting the package directory security context before creating the symlink so that it inherits the same security context. Change-Id: I1ee6ccd8a2aa63a4d2efda67f313c97932235911 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Add instruction-set arguments to installd commands.Narayan Kamath2014-05-013-35/+49
| | | | | | | | | The instruction-set is used to construct the dalvik cache path and is also passed down to dex2oat. (cherry picked from commit 791781bfb8cdcdf90e32968159603e2fe5098d94) Change-Id: I43396b16f6eaecacf0fb7d052526fc5a239167ac
* Fix incorrect odex path handlingChih-Wei Huang2014-04-281-3/+7
| | | | | | | | | It's wrong to just concatenate the apk_path and .odex. The bug prevents the prebuilt odex being used since Kitkat. The patch is copied from the code of JellyBean. Change-Id: I0ce8a877e3df8ae1ab9a0e3aeeef2d5253efc223
* restorecon the profile directory.Stephen Smalley2014-04-091-1/+7
| | | | | | | | This is required so that it will be assigned the correct SELinux security context on first creation by installd. Bug: 13927667 Change-Id: I4857d031f9e7e60d48b8c72fcb22a81b3a2ebaaa Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Modify installd's restorecon function.Robert Craig2014-03-282-18/+69
| | | | | | | | | | | | | | | | Changes above with PMS and below with libselinux have resulted in a few changes to the restorecon data api. This change is needed in order to support the new way to issue a recursive restorecon of certain /data/data directories. The restorecondata function has also been modified to find all users on the device for a given package name (argument to the function) and to issue a separate recursive restorecon call for each. Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6 Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
* Send libselinux logging to logcat.Stephen Smalley2014-03-261-0/+25
| | | | | | | | Otherwise we can't readily see log messages from libselinux calls made by installd. Change-Id: I319b30c181470468fe19dd5fbe9251ef03f1163b Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Extend installd to support SELinux restorecon function.Robert Craig2014-03-193-0/+37
| | | | | | | | | | | | Implement new restorecondata function which will allow the relabeling of /data/data and /data/user directories. This is needed in the case of certain OTAs. Not every boot will apply this relabeling however. Consult change I77bf2a0c4c34b1feef6fdf4d6c3bd92dbf32f4a1 for clarification on this issue. Change-Id: I05e8b438950ddb908e46c9168ea6ee601e6d674f Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
* native frameworks: 64-bit compile issuesMark Salyzyn2014-03-122-3/+4
| | | | | | | - Fix format (print/scanf) - Suppress unused argument warning messages (bonus) Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
* Fix parameter ordering for installd's dex2oat execl.Anwar Ghuloum2014-03-111-1/+1
| | | | Change-Id: Ibd6fd46c6ec3137874f9a3d5eea134bc804e039a
* ART profilerDave Allison2014-03-074-37/+112
| | | | | | | | | | | | | | | | | | | | | | Add args to the installd commands for profiler usage. Make installd create the profile files and allow apps to write to them. The profile files are in /data/dalvik-cache/profiles. This central location is needed due to permissions issues with dex2oat reading from an app's data directory. The solution is to put the profile file in a directory owned by the install user and make the file writeable by the shared group id of for the app. The app can read and write to these files only in the profiles directory. The 'system' user also needs to be able to read the files in order to determine the amount of change to the file over time. Bug: 12877748 Change-Id: I9b8e59e3bd7df8a1bf60fa7ffd376a24ba0eb42f Conflicts: cmds/installd/commands.c
* Don't pass in empty arg to dex2oat.Mathieu Chartier2014-03-051-1/+1
| | | | | | | We would occassionally pass in an empty arg "" instead of a NULL. This caused problems since dex2oat isn't made to handle empty args. Change-Id: Ibb1aed64a4aa17459b2a75a5a2abcf13c7fa8ac7
* Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flagsBrian Carlstrom2014-03-041-10/+15
| | | | Change-Id: Ic048ed654ea0ae38c9684e5fa5b14742b6b83305
* Correcting include path in installd test project's Android.mkRamin Zaghi2014-02-281-1/+1
| | | | | | | | installd project has moved from frameworks/base to frameworks/native and so its test project's c_include path defined in Android.mk has to match the change. Change-Id: I597125ff659f51edbd9fc95371790e2d567c78be
* Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."Nick Kralevich2014-02-122-3/+3
|\
| * Convert all selinux_android_restorecon and _setfilecon calls to new API.Stephen Smalley2014-02-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | libselinux selinux_android_restorecon API is changing to the more general interface with flags and dropping the older variants. Also get rid of the old, no longer used selinux_android_setfilecon API and rename selinux_android_setfilecon2 to it as it is the only API in use. Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | Runtime resource overlay, iteration 2Mårten Kongstad2014-02-033-10/+129
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support any number of overlay packages. Support any target package. UPDATED PACKAGE MATCHING ------------------------ In Runtime resource overlay, iteration 1, only a single overlay package was considered. Package matching was based on file paths: /vendor/overlay/system/framework-res.apk corresponded to /system/framework-res.apk. Introduce a more flexible matching scheme where any package is an overlay package if its manifest includes <overlay targetPackage="com.target.package"/> For security reasons, an overlay package must fulfill certain criteria to take effect: see below. THE IDMAP TOOL AND IDMAP FILES ------------------------------ Idmap files are created by the 'idmap' binary; idmap files must be present when loading packages. For the Android system, Zygote calls 'idmap' as part of the resource pre-loading. For application packages, 'idmap' is invoked via 'installd' during package installation (similar to 'dexopt'). UPDATED FLOW ------------ The following is an outline of the start-up sequences for the Android system and Android apps. Steps marked with '+' are introduced by this commit. Zygote initialization Initial AssetManager object created + idmap --scan creates idmaps for overlays targeting 'android', \ stores list of overlays in /data/resource-cache/overlays.list AssetManager caches framework-res.apk + AssetManager caches overlay packages listed in overlays.list Android boot New AssetManager's ResTable acquired AssetManager re-uses cached framework-res.apk + AssetManager re-uses cached 'android' overlays (if any) App boot ActivityThread prepares AssetManager to load app.apk + ActivityThread prepares AssetManager to load app overlays (if any) New AssetManager's ResTable acquired as per Android boot SECURITY -------- Overlay packages are required to be pre-loaded (in /vendor/overlay). These packages are trusted by definition. A future iteration of runtime resource overlay may add support for downloaded overlays, which would likely require target and overlay signatures match for the overlay to be trusted. LOOKUP PRIORITY --------------- During resource lookup, packages are sequentially queried to provide a best match, given the constraints of the current configuration. If any package provide a better match than what has been found so far, it replaces the previous match. The target package is always queried last. When loading a package with more than one overlay, the order in which the overlays are added become significant if several packages overlay the same resource. Had downloaded overlays been supported, the install time could have been used to determine the load order. Regardless, for pre-installed overlays, the install time is randomly determined by the order in which the Package Manager locates the packages during initial boot. To support a well-defined order, pre-installed overlay packages are expected to define an additional 'priority' attribute in their <overlay> tags: <overlay targetPackage="com.target.package" priority="1234"/> Pre-installed overlays are loaded in order of their priority attributes, sorted in ascending order. Assigning the same priority to several overlays targeting the same base package leads to undefined behaviour. It is the responsibility of the vendor to avoid this. The following example shows the ResTable and PackageGroups after loading an application and two overlays. The resource lookup framework will query the packages in the order C, B, A. +------+------+- -+------+------+ | 0x01 | | ... | | 0x7f | +------+------+- -+------+------+ | | "android" Target package A | Pre-installed overlay B (priority 1) | Pre-installed overlay C (priority 2) Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e