Commit Graph

283 Commits

Author SHA1 Message Date
Alex Light 7365a10689 Make system use patchoat to relocate during runtime.
Make installd understand a patchoat directive and carry it out.

Bug: 15358152

Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
2014-08-05 10:22:10 -07:00
Brian Carlstrom 538998f204 Disable compilation based on vold.decrypt. [frameworks/native]
Bug: 15165413
Change-Id: Ibc39ab82e02e42345c6e2667ac45884f2e0cf7a4
2014-08-04 11:25:45 -07:00
Brian Carlstrom cf51ba1360 Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]
This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413
Change-Id: Iff27dc2904f4f0d7c25a684cd6ba16a597f252fd
2014-07-30 14:36:35 -07:00
Christopher Ferris 1fe6107b66 Add dumping of tombstones to dumpstate.
Dump only those tombstones modified within the last half an hour.

Change-Id: I8ce836b2e19eba7a9c0c31a4f312f9a382526da7
2014-07-23 16:33:01 -07:00
Elliott Hughes 1e4ee9afd2 Always #include <sys/...>, not <linux/...>.
Change-Id: I9a3f574e0dd1d3ba39312254513b8b193b610c09
2014-07-18 17:54:09 -07:00
Elliott Hughes ec535c5ba5 Fix implicit declaration of function 'prctl' in installd.
Change-Id: I469ee15a0a8a79d005b15aad5097b6c13c20ab7e
2014-07-18 17:29:15 -07:00
Colin Cross 8eb25d552b dumpstate: fix dumping traces for vm processes on 64-bit
dumpstate was not dumping any stack traces for vm processes because
it was failing the string compare for /system/bin/app_process.
64-bit devices use app_process32 and app_process64 instead of
app_process, and zygote64 alongside zygote.  Change the string
matching to be prefix matching.

Change-Id: I6970e1b1fedfcd601f8db6af62852422fcb71d59
2014-07-16 19:03:49 -07:00
Riley Spahn c67e6307ca Add MAC for remaining service_manager functionality.
Add SELinux MAC for the list and find functionality
to service_manager. By default the list action uses
the service_manager_type attribute as its target
object.

Change-Id: I7630f21a9f3232ae3d6d8b9a1119230b40899aef
2014-07-14 12:35:23 -07:00
Nick Kralevich 7d42a3c31b service_manager: check binder passed lengths
1) Pass length through to str8 function.
2) Fix implicit function definition warning.
3) Check for NULL from bio_get_string16 functions.

Bug: 15886919
Bug: 15888753
Change-Id: I78a401d55b84f382ab83911be32b8d501998aa82
2014-07-12 16:34:01 -07:00
Robin Lee 7c5be65f28 Merge "Rename 'mkuser' command to 'mkuserconfig'" 2014-07-04 08:02:36 +00:00
Brian Carlstrom cbb9d0d740 Merge "Make dex2oat heap size product configurable [frameworks/native]" 2014-07-07 17:50:18 +00:00
Brian Carlstrom e46a75a0f6 Make dex2oat heap size product configurable [frameworks/native]
Bug: 15919420
Change-Id: I0e629ff4f7541f0dde7380e0dbc8dab1c13df7bd
2014-07-08 15:12:07 -07:00
Sreeram Ramachandran 2b3bba34ae Dump all the correct routing tables.
The list of tables is maintained in /data/misc/net/rt_tables by netd.

Change-Id: I55475c08c5e43bcf61af916210e680c47480ac32
2014-07-08 16:29:45 -07:00
Nick Kralevich f9cfae2412 Merge "Remove inline access control in service_manager." 2014-07-02 20:49:53 +00:00
Riley Spahn 1244edcb85 Remove inline access control in service_manager.
Remove the hardcoded tuples of UIDs and the services that
each is allowed to register. We will rely only on permissions
from SELinux.

Change-Id: I1c44555a6e274814282398865b30ee938f40dabb
2014-06-26 15:48:21 -07:00
Brian Carlstrom 53e0776d96 Use current max product dalvik.vm.heapsize as default dex2oat heap size
Bug: 15919420

(cherry picked from commit 3aa138617b)

Change-Id: I569ba111c6163e94dd1b09b21ef374f05d263e72
2014-06-27 14:19:36 -07:00
Narayan Kamath 357df19b14 Merge "Exclude subdirectories when pruning the dex cache." 2014-06-24 06:22:45 +00:00
Narayan Kamath 1e57e4af8a Exclude subdirectories when pruning the dex cache.
This requires a companion package manager change to prune
each instruction specific dex cache individually.

bug: 15677279

Change-Id: I5891981512bde20e49bff65b1842c28886f2b177
2014-06-20 17:46:58 +01:00
Brian Carlstrom 71f9956a23 Merge "Fix obsolete argument name" 2014-06-17 05:00:50 +00:00
Brian Carlstrom 7195fcc218 Fix obsolete argument name
Change-Id: I8030f055ee49dc86d4592f36791edddfc0d60a31
2014-06-16 13:28:03 -07:00
Narayan Kamath 8c9bcff892 Merge "Add an installd command to prune dex files." 2014-06-10 21:26:11 +00:00
Nick Kralevich 0db0f97d87 installd: change profile files to 0660
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
2014-06-12 14:54:43 -07:00
Riley Spahn 69154df9ef Add SELinux checks when adding a service.
Add a MAC check to the svc_can_register function in
service_manager. The types are defined in
external/sepolicy/service.te and the mapping from service
names is defined in external/sepolicy/service_contexts.
Currently uses the property context backend to parse the
contexts file.

Bug: 12909011
Change-Id: I5d90a614263c60571c7c70c2882e6fa929911ca5
2014-06-12 20:46:24 +00:00
Calin Juravle 7281ca65d0 Merge "Pass --top-k-profile-threshold to dex2oat if available." 2014-06-10 21:26:11 +00:00
Robin Lee 7c8bec0179 Rename 'mkuser' command to 'mkuserconfig'
Brings the name more in line with what it actually does.

Change-Id: I0adb14deb1a035abdbe51714356bd0c94ccf04c5
2014-06-10 18:59:55 +01:00
Narayan Kamath 3aee2c5c74 Add an installd command to prune dex files.
This is a straightforward port of logic from
PackageManagerService#pruneDexFiles.

bug: 14407732

Change-Id: I892cff027ddcbb1a4fb37a7af5ecf1697049a188
2014-06-10 15:21:18 +01:00
Calin Juravle 4fdff46166 Pass --top-k-profile-threshold to dex2oat if available.
Also, don't pass --profile-file if the file is empty.
Bug: 12877748

Change-Id: I587d198e64da709930e2cea50a87fed1525281e5
2014-06-10 14:33:15 +01:00
Robin Lee c4193f1fef Merge "Migrate keychain directories to /data/misc/user/0" 2014-06-09 12:44:34 +00:00
Calin Juravle 57c69c3964 Don't always add profile-file option to dex2oat
Add profile-file option to dex2oat only if the profiler is active and
the file exists.

Bug: 12877748
Bug: 15275634
Change-Id: Icef76514c912c88311ed108f2be7a6329131f741
2014-06-06 15:13:06 +01:00
Robin Lee 07053fcb61 Migrate keychain directories to /data/misc/user/0
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
2014-06-05 17:35:50 +00:00
Robin Lee 095c763dd9 Add installd command to create /data/misc user dir
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
2014-06-05 14:34:15 +00:00
Elliott Hughes 259c25080d am 03e2f8fa: Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC."
* commit '03e2f8fa13a791d744758ec9ffe27f52cab730d0':
  Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
2014-05-29 01:02:16 +00:00
Elliott Hughes 03e2f8fa13 Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC." 2014-05-29 00:59:01 +00:00
Brian Carlstrom e67810fd7a am 97a51ad4: Merge "Move to dalvik.vm.lib.2 to force default to libart"
* commit '97a51ad44ae3dcf4976076382923ddcae16233ee':
  Move to dalvik.vm.lib.2 to force default to libart
2014-05-28 22:31:43 +00:00
Brian Carlstrom 856bc78efc Move to dalvik.vm.lib.2 to force default to libart
Bug: 14298175

(cherry picked from commit c4ac3124ff)

Change-Id: I97cc3ff7a269e671b315afa8673dae43d1f86bf1
2014-05-28 14:48:36 -07:00
Brigid Smith 750aa9743c Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
Bug: 15116468
Change-Id: I621532fb53b8317f5a513edfbeb0c50c265342fc
2014-05-28 14:42:09 -07:00
Nick Kralevich fc1b9fa317 am b66ee6c3: Merge "Ensure that app lib symlinks are correctly labeled when created."
* commit 'b66ee6c32d87961d5b9f0be97b5fdccb928fd453':
  Ensure that app lib symlinks are correctly labeled when created.
2014-05-13 20:35:38 +00:00
Stephen Smalley 3a98389263 Ensure that app lib symlinks are correctly labeled when created.
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>
2014-05-13 12:59:40 -04:00
Narayan Kamath 44df726a6c am cb079c89: Merge "Add instruction-set arguments to installd commands."
* commit 'cb079c899ac9d9c5ec90840249821f58c817406c':
  Add instruction-set arguments to installd commands.
2014-05-01 14:00:54 +00:00
Narayan Kamath 1b40032077 Add instruction-set arguments to installd commands.
The instruction-set is used to construct the dalvik cache
path and is also passed down to dex2oat.

(cherry picked from commit 791781bfb8)

Change-Id: I43396b16f6eaecacf0fb7d052526fc5a239167ac
2014-05-01 11:38:02 +01:00
Bill Yi e4f00b2aae Merge commit '6d05ef2310bdc84811d5b0385b009ad11447a749' into HEAD 2014-04-29 11:34:19 -07:00
Chih-Wei Huang 0e8ae16f08 Fix incorrect odex path handling
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
2014-04-28 14:08:16 -07:00
Stephen Smalley a240733137 restorecon the profile directory.
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>
2014-04-09 19:08:20 +00:00
Robert Craig da30dc7336 Modify installd's restorecon function.
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>
2014-03-28 14:32:07 -04:00
Stephen Smalley 7abb52bcaf Send libselinux logging to logcat.
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>
2014-03-26 09:31:25 -04:00
Xia Wang 6d05ef2310 am 9c7db080: Build the benchmark test to /data/local/tmp/ for automated test
* commit '9c7db08049e1d36c2f60dd703f27c432bc8cfbc5':
  Build the benchmark test to /data/local/tmp/ for automated test
2014-03-24 18:39:57 +00:00
Xia Wang 9c7db08049 Build the benchmark test to /data/local/tmp/ for automated test
Change-Id: I27a5ee24636ff9752a35dbab793821f6b7a79221
(cherry picked from commit b7925f1364)
2014-03-24 18:13:19 +00:00
Robert Craig e9887e46ce Extend installd to support SELinux restorecon function.
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>
2014-03-19 17:37:48 +00:00
Mark Salyzyn 92dc3fc52c native frameworks: 64-bit compile issues
- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
2014-03-12 13:12:44 -07:00
Anwar Ghuloum 4bc054019d Fix parameter ordering for installd's dex2oat execl.
Change-Id: Ibd6fd46c6ec3137874f9a3d5eea134bc804e039a
2014-03-11 15:42:58 -07:00