summaryrefslogtreecommitdiffstats
path: root/cmds/installd
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-101-18/+5
|\ | | | | | | | | | | https://android.googlesource.com/platform/frameworks/native into cm-13.0 Android 6.0.1 release 22
| * Installd: Fully decouple pre- and post-bootcomplete propertiesAndreas Gampe2015-09-281-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | Do not fall back to dalvik.vm.dex2oat-threads if dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use the value of dalvik.vm.image-dex2oat-threads. Instead use the default behavior of dex2oat in that situation. (cherry picked from commit 919461cbeef3e9f35388fc099a5fcdae1cb79cc6) Bug: 24413760 Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6
* | Themes: Reference app resource when compiling theme [1/2]d34d2016-01-203-29/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to pass in the path to the target apk as an additional included resource apk, allowing theme designers to reference styles and attributes from the original package without needing to duplicate them. Duplicating attributes never worked quite well, and causes all sorts of issues, including crashing apps. Instead of a theme declaring attributes, that are app specific, it simply reference the originals. This way things like colors that are style specific get included correctly. Here's an example of stat_sys_wifi_signal_4_fully.xml using this feature. By using ?com.android.systemui:attr/ we are able to reference attributes defined in SystemUI directly in our themed resource. <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="17.25dp" android:height="18dp" android:viewportWidth="46.0" android:viewportHeight="48.0"> <path android:fillColor="?com.android.systemui:attr/backgroundColor" android:pathData="M20.4,18.0"/> <path android:fillColor="?com.android.systemui:attr/fillColor" android:pathData="M42.0,32.0l0.0,-4.0L26.0,18.0L26.0,7.0c0.0,-1.7 -1.3,-3.0 -3.0, -3.0c-1.7,0.0 -3.0,1.3 -3.0,3.0l0.0,11.0L4.0,28.0l0.0,4.0l16.0,-5.0l0.0,11.0l-4.0, 3.0l0.0,3.0l7.0,-2.0l7.0,2.0l0.0,-3.0l-4.0,-3.0L26.0,27.0L42.0,32.0z"/> </vector> Change-Id: Ic00b5d91fc651a29a8c3ab341e5494107acd0463 TICKET: CYNGNOS-1645
* | installd: Consider bundled app dir as a valid apk pathSteve Kondik2015-11-074-0/+12
| | | | | | | | Change-Id: I92db56f21bf91e0816b63faffcfbb270ca2d8fca
* | Merge tag 'android-6.0.0_r26' into HEADRicardo Cerqueira2015-11-053-17/+39
|\ \ | |/ | | | | | | | | | | | | | | Android 6.0.0 release 26 Conflicts: include/android/input.h Change-Id: Ifa374c6d3055be3b8a5d60967f8b4c0043da739b
| * Installd: Take boot status as dexopt parameterAndreas Gampe2015-09-213-16/+7
| | | | | | | | | | | | | | | | | | Expect the boot status explicitly as a parameter so that we do not have to rely on dev.bootcomplete, which isn't meaningfully set when the device needs the decryption screen on boot. Bug: 23898216 Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
| * Installd: Allow different behavior before bootcompleteAndreas Gampe2015-09-161-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check dev.bootcomplete in dex2oat(). Use the information for two changes. Only switch to the background when we're post bootcomplete. This will ensure better utilization after upgrades. Add a second dex2oat-threads property that is used pre bootcomplete. A separation of these phases allows using less cores when the device is up, freeing up resources for other purposes, e.g., avoid jank. The precedence during boot is the boot property, or the image property if the former doesn't exist, or the default property as a fallback. Bug: 23898216 Bug: 24004256 Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d
* | installd: Run all of the appt setup operations in the child processRicardo Cerqueira2015-10-301-22/+22
| | | | | | | | Change-Id: Ifc18741380d7f922540d04ef622f17edfd87dbdf
* | installd: Call pipe() before forkingd34d2015-10-281-5/+6
| | | | | | | | Change-Id: Ideef9387c503a25dadb2afb4e4b394a2e61cd8e9
* | installd: Use -f (force overwrite) for aaptd34d2015-10-281-0/+2
| | | | | | | | | | | | | | When re-creating resource apks for themes, aapt will fail if the apk already exists unless we use -f Change-Id: If2c3a634aa3ca061009aa6892530d643f8f67e9f
* | Themes: Restructure resource cache [2/2]d34d2015-10-263-48/+16
| | | | | | | | Change-Id: Ib62081e0551e572680b92c0a587bdc7bbee9b62b
* | Themes: Port to CM13 [2/3]Clark Scheff2015-10-263-22/+208
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Themes: Forward port installd Id: I5c03bdca30d55f252d486ddac0355f41623ba8d5 Themes: Remove legacy theme support Id: I6823a6f2735f07f8e4a25a9c0f6f297577a554ab Access Themed ResTables from compiled theme apk [2/2] Before this patch the ResTable for a theme/app was created and accessed seperate from the compiled APK. Since the compiled APK has its own copy of the resources.arsc, we can just reuse the table in the APK instead Id: Ib7916eba5663db5d077d33fc02623748e8a9f10c Send target sdk version to aapt [2/2] If vector drawables are used in a theme we must have a minSdkVersion of 21 passed to aapt or else aapt will Segfault. Id: Ib5ffa6d12c91d465f3a603e03b09ab03b02715c7 Change-Id: Ie14322b7efb40b270abd3d4ca1b7c5f97bf4b5ca
* Only restorecon_data once for all users.Jeff Sharkey2015-07-201-4/+4
| | | | | | | | | | restorecon_data already iterates across all found users internally, so we don't need to call it for each UID moved. In fact, this was a bug that caused data for the owner to be relabeled when moving apps back to internal storage. Bug: 21813384 Change-Id: I5ba76d4f30d129365864c8a25b665f344b99a6b4
* Installd: Add a swap override flagAndreas Gampe2015-07-161-7/+36
| | | | | | | | Add dalvik.vm.dex2oat-swap system property to override a default decision. Bug: 20658562 Change-Id: I34368c6e435d1a9ceec20a0bf1c8c6213e527f5e
* Split app move into separate copy/delete steps.Jeff Sharkey2015-07-073-18/+8
| | | | | | | | | | | App movement now has three distinct stages: copying, scanning, and cleanup. Previously, a battery pull late in the move process would end up with packages.xml pointing at the old location which had been torn down. Now, we update packages.xml to point at the new location as the "source of truth" before we start deleting the old location. Bug: 21831336 Change-Id: I62b8916c673265c240e2574ea968cdce5a7a0074
* Fix directory path of codecache.Daichi Hirono2015-06-241-1/+1
| | | | | | | | | Previously installd removed the normal cache directory when delete_code_cache is called. It should delete the code cache directory. BUG=21206499 Change-Id: I5774430e389e22805fa7984b4c83420c3677ca75
* Rename --include-cfi to --generate-debug-info.David Srbecky2015-06-191-4/+4
| | | | | | | | | This follows a change in dex2oat. (cherry picked from commit 741a6ff2e264b96edbca3ac95e720b21c8e39382) Bug: 21924613 Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
* Installd: Add debug.gencfi to run_dex2oatAndreas Gampe2015-06-191-3/+15
| | | | | | | | | | Add the debug.gencfi system property that forces generation of CFI data. (cherry picked from commit 816243d470bade03c264e67e39590f6852581898) Bug: 21924613 Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
* Add an installd command to link filesNarayan Kamath2015-06-094-9/+51
| | | | | | | | | | Given a pair of absolute paths {from_path, to_path} , check that they are both valid apk subpaths (eg. /data/app/package/foo) and link(2) to_path to from_path. This is required by staged installs, where we link existing apks and oat files to their staging location. bug: 20889739 Change-Id: I3b5e3b43677af68be59308121a4409caaa6a72f0
* Offer to move both code and data together.Jeff Sharkey2015-04-305-98/+201
| | | | | | | | | | | | | We now move code under /data/app/com.example when a complete move is requested. This really only works for new cluster-style installs that also have native libraries and OAT contained inside. Teach measuring code about cluster-style installs when measuring app footprint. Also offer to measure private data space for all users. Bug: 19993667, 20275578 Change-Id: I6df7b947cb5cc8a4552f56f4b64a661e8512389f
* Command to move private app data between volumes.Jeff Sharkey2015-04-105-55/+149
| | | | | | | | | | | | | | | New "mvuserdata" command will move all private app data from one volume UUID to another. It leverages the existing "cp" toybox command to do the heavy lifting for all known users, preserving details like timestamps and permissions. It invokes restorecon() to correctly label the new location when the copy is finished. Changes installd to no longer drop capabilities, so we run as root again. This also allows us to exec "cp" with CAP_DAC_OVERRIDE and CAP_FOWNER still in effect. Bug: 19993667 Change-Id: I1f407a7c4a1af97ca5afc27b04eb16b4936cbdef
* Start accepting volume UUIDs from framework.Jeff Sharkey2015-04-093-31/+38
| | | | | | | | | We're now parsing and passing through volume UUIDs sent across the command socket. The "!" argument value is treated as null, which means internal storage. Bug: 19993667 Change-Id: I17729a769ce687a2e94e85991a6338c77ded0b66
* More volume UUID awareness.Jeff Sharkey2015-04-097-148/+115
| | | | | | | | | | | Teach free_cache() and restorecon_data() about building per-volume paths. Also clean up restorecon_data() by using std::string when building paths. Clearer names for path building utility methods, and tests to verify. Bug: 19993667 Change-Id: Iacfbcdaa5b901cc2490bc8eba366dfdeb44f1d93
* Installd: Fix Clang buildAndreas Gampe2015-04-091-5/+2
| | | | | | Remove some unused parameters and variables. Change-Id: I507ae48fe1744b800ceb29192d463fd26c2ccda7
* Merge "Plumb through volume UUID when building paths."Jeff Sharkey2015-04-097-243/+132
|\
| * Plumb through volume UUID when building paths.Jeff Sharkey2015-04-077-243/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since app data paths can live on expanded storage devices, accept the target volume UUID when building paths. The null UUID indicates the default internal storage. To improve readability, start using std::string in several places, which throws when allocations fail. For now, perform last-second sanity checks on incoming path arguments, but we'll eventually want to check arguments as they come through installd.cpp, instead of crashing the entire daemon. Also remove "lib" symlink code from install() and make_user_data(), since we're no longer supporting /data/app-lib. The framework already uses linklib() to create the right symlink for the selected ISA-specific library dir. Bug: 19993667 Change-Id: Ib9343575ffb62bf3981e19375de8f3822fc31e28
* | installd: Add support for SELF_PATCHOAT_NEEDED.Richard Uhler2015-04-073-26/+40
|/ | | | Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
* Switch installd to compile as C++.Jeff Sharkey2015-04-076-41/+43
| | | | | | | This is the minimal change needed to switch it over to C++, which paves the way for using more robust utilities like std::string. Change-Id: I80ed6280146875eb6ddbbb340c05450388ca13f0
* Valid APK paths now include expanded storage.Jeff Sharkey2015-04-074-5/+16
| | | | | | | | Apps on expanded storage live at /mnt/expand/<uuid>/app/com.example, so we need to relax one more directory level. Bug: 19993667 Change-Id: I347ec7b92435ea69e632ed5d5fdfabe38ce0b56e
* Use AID_SYSTEM as uid when creating oat dirFyodor Kupolov2015-04-071-12/+2
| | | | | | | | | Previously AID_INSTALL was used, which was causing permission denied errors when PackageManager was trying to recursively rename staging directory Bug: 19550105 Bug: 20087446 Change-Id: I3a9e3056c1fbc1ce0077a3ce52cf77ea6b5085ee
* Fix errors caused by unused variablesFyodor Kupolov2015-04-021-2/+1
| | | | Change-Id: Ie52ae0e9a642504ee7b78c6bc54b61549cfb0342
* Merge "Support for storing OAT files in app directory"Fyodor Kupolov2015-04-023-27/+116
|\
| * Support for storing OAT files in app directoryFyodor Kupolov2015-03-303-27/+116
| | | | | | | | | | | | | | | | | | | | Changes to installd: - dexopt now allows oat_dir param for custom output directory - Added helper method calculate_oat_file_path for calculating oat file output location based on oat_dir and apk_path. Bug: 19550105 Change-Id: I6b079207310583adeb6dad918a58034a059e34c4
* | Installd: Support dex2oat threads system propertyAndreas Gampe2015-03-301-0/+12
|/ | | | | | | Check dalvik.vm.dex2oat-threads in installd and pass to dex2oat. Bug: 19992386 Change-Id: I5e7806cf560607d31a1d6901dffb14bee538c9cc
* Store odex files in oat/<isa>/ directory.Richard Uhler2015-03-251-14/+38
| | | | | | | | | | | | | | | Previously odex files were stored alongside the dex location as: dex location: /foo/bar/base.apk odex location: /foo/bar/<isa>/base.odex This changes where odex files are stored, adding an "oat" directory: dex location: /foo/bar/base.apk odex location: /foo/bar/oat/<isa>/base.odex See also the corresponding changes in platform/art and platform/build. Bug: 19550105 Change-Id: I4c6be4f0c41ff175904846db8e360c4af815b265
* Use verify-at-runtime if debug.usejit is trueMathieu Chartier2015-03-201-0/+7
| | | | | Bug: 19735273 Change-Id: Ib65b50dbde00184544a1341f351a0fe0ef504d32
* am 5a25a63d: Merge "Installd: Pass debuggable flag"Andreas Gampe2015-03-103-9/+23
|\ | | | | | | | | * commit '5a25a63de2693177b15817fb19b684ca7bfec582': Installd: Pass debuggable flag
| * Installd: Pass debuggable flagAndreas Gampe2015-03-093-9/+23
| | | | | | | | | | | | Pass the debuggable flag from the package manager to dex2oat. Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666
* | Merge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEADBill Yi2015-02-191-0/+5
|\ \ | |/ |/|
| * am 96e4409e: Merge "Installd: Disallow relocation for decryption"Andreas Gampe2015-01-071-15/+24
| |\ | | | | | | | | | | | | * commit '96e4409e8c38b1d79285eca9886d44ff850b5748': Installd: Disallow relocation for decryption
| * \ am d3255076: Merge "Installd: Swap file for dex2oat"Andreas Gampe2014-12-221-3/+59
| |\ \ | | | | | | | | | | | | | | | | * commit 'd325507698d8379e431a8c8fefcfafe59956bd88': Installd: Swap file for dex2oat
| * \ \ am 1be4021c: Merge "Installd: Remove dalvik paths"Andreas Gampe2014-12-161-42/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '1be4021c2a867c7e067a3c5b937a054f0eb7817f': Installd: Remove dalvik paths
| * \ \ \ am 754f16fc: Merge "Fix installd command line parser"Mike Lockwood2014-11-211-1/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit '754f16fcf4b56f52450f91e3e840bad8a2cc997c': Fix installd command line parser
| * \ \ \ \ am ba4a43c6: Merge "Kill INCLUDE_SYS_MOUNT_FOR_STATFS."Elliott Hughes2014-11-201-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'ba4a43c6c78547444446181b4fae20a5d61d35ff': Kill INCLUDE_SYS_MOUNT_FOR_STATFS.
| * \ \ \ \ \ am 11bf9e5c: Merge "Add support for dalvik.vm.isa.<instruction set>.variant"Ian Rogers2014-11-141-0/+12
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '11bf9e5c2f90101d56d918e1b3fe780b873e5566': Add support for dalvik.vm.isa.<instruction set>.variant
| * \ \ \ \ \ \ resolved conflicts for merge of 37878b1e to lmp-mr1-dev-plus-aospDmitriy Ivanov2014-11-113-0/+22
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I748a7d2fb43fd63189f4688edbd0991e2b609dba
| | * | | | | | | Add an installd command to mark the end of boot.Narayan Kamath2014-11-103-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug: 18280671 Change-Id: I6b3aeaf143ab3b78881f163ec5c17b9bf20172ed
| * | | | | | | | am 106e5820: Merge "installd: Set priority to background for dexopting" into ↵Igor Murashkin2014-11-061-0/+5
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lmp-mr1-dev * commit '106e582053121f1934c33a6c98d35377e8ae384a': installd: Set priority to background for dexopting
| | * | | | | | | installd: Set priority to background for dexoptingIgor Murashkin2014-11-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes jank caused by dex2oat while installing an application in the background. Bug: 17497551 Change-Id: I5a69b00c0fd76ae22a0d1adb242bef6c18a75743
| * | | | | | | | am 91c395f6: am 60fd3fee: Migrate CA certificates to all usersRobin Lee2014-10-153-35/+144
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '91c395f6c344682f1ae5926766d4d7247dee6df4': Migrate CA certificates to all users