Commit Graph

606 Commits

Author SHA1 Message Date
David Srbecky
528c8ddc60 Rename --include-cfi to --generate-debug-info.
This follows a change in dex2oat.

(cherry picked from commit 741a6ff2e2)

Bug: 21924613
Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
2015-06-19 02:32:41 +01:00
Andreas Gampe
3822b8b79c Installd: Add debug.gencfi to run_dex2oat
Add the debug.gencfi system property that forces generation of
CFI data.

(cherry picked from commit 816243d470)

Bug: 21924613
Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
2015-06-19 02:31:33 +01:00
Mark Salyzyn
8f37aa5011 dumpstate: modify logcat timeout to compensate for storage speed
(cherry pick from commit f989162bb8)

Discover the logcat buffer size, divide by the worst storage
speed in kb/s, and multiply by ten to estimate the timeout in
ms for each named buffer. If that value is less than 20 seconds,
then select 20 seconds. Apply this to each logcat request.

Bug: 21555259
Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc
2015-06-15 07:28:28 -07:00
Sharvil Nanavati
94a9875f75 Merge "Remove Bluedroid kernel dump from dumpstate." into mnc-dev 2015-06-12 21:30:03 +00:00
Sharvil Nanavati
3ba7e729a7 Remove Bluedroid kernel dump from dumpstate.
Bluedroid doesn't have much of a kernel component and no devices
expose a bluedroid node in debugfs.

Change-Id: I5600e88c543a109257d95591704a8f2a7261dfdc
2015-06-12 11:35:24 -07:00
Erik Kline
47a7dc81d0 Merge "Incorporate network diagnostics during a bugreport" into mnc-dev 2015-06-09 23:24:54 +00:00
Narayan Kamath
d845c96128 Add an installd command to link files
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
2015-06-09 11:35:43 +01:00
Erik Kline
90926336c1 Incorporate network diagnostics during a bugreport
Bug: 21449922
Change-Id: I81a3774683c08f5d4ab4ea75bec45d279fb210ec
2015-06-09 17:38:12 +09:00
Stephen Smalley
2139c7fa37 Call selinux_status_open() prior to use of selinux_status_updated().
The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

(cherrypicked from commit bea0746b24)

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-06-03 13:46:08 -07:00
Elliott Hughes
bfb1f1cc83 Don't use TEMP_FAILURE_RETRY on close in frameworks/native.
Bug: http://b/20501816
Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6
(cherry picked from commit 997abb668b)
2015-05-15 17:26:44 -07:00
John Reck
2c237ee1d5 Fix async_stop
Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
2015-05-15 10:00:34 -07:00
Aaron Schulman
cbe13ef59b Added Voltage and Current regulator ftrace events to atrace
Cherry-pick of c2c6ecd119 from AOSP

Tracing the state of the voltage and current regulators enables a developer
to attribute power consumption measurements to specific perhipherals and
cores. Unlike other indirect methods of tracing when peripherals and cores
are toggled, the regulator ftrace event indicates the exact point in time
when the kernel switches on or off the device. For example, in the following
trace, a developer can see exactly when the krait2 core starts receiving
power, and and when the voltage is set for voltage scaling.

mpdecision-2172  [000] ...1  1566.665481: regulator_enable: name=krait2
mpdecision-2172  [000] ...1  1566.665493: regulator_enable_delay: name=krait2
mpdecision-2172  [000] ...1  1566.665495: regulator_enable_complete: name=krait2
<...>-4133  [002] ...1  1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000)

Change-Id: Ia322206ef74496daf1d9baa03545d8e89e398487
Signed-off-by: Aaron Schulman <aschulman@google.com>
2015-05-07 09:23:23 -07:00
Mark Salyzyn
326842fca4 dumpstate: report per-partition MMC performance
(Cherry pick from commit 540e3de99f)

Change-Id: If5cabe186d8377056effa1c0672a90e277cd7221
2015-05-01 14:50:55 -07:00
Jeff Sharkey
d792118c49 Offer to move both code and data together.
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
2015-04-30 16:02:58 -07:00
Ashish Sharma
8b3e133e41 Inclide checkin format of dumpsys package in bugreport.
Change-Id: I809377f80e314b358eba22fa916e53c81cac2c47
2015-04-28 13:32:54 -07:00
Jeff Sharkey
1044367a73 am a36a43b3: am c200d20e: am dfc30ae3: Merge "Command to move private app data between volumes."
* commit 'a36a43b354b248cef9407de42fb6b87e1c7085f6':
  Command to move private app data between volumes.
2015-04-10 21:32:03 +00:00
Jeff Sharkey
e363724230 Command to move private app data between volumes.
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
2015-04-10 00:21:35 -07:00
Jeff Sharkey
16af1b044e am 8571e647: am 997eb5dd: am 44a38d93: Merge "Start accepting volume UUIDs from framework."
* commit '8571e647da1e9c2227d22034ba6462235273cb02':
  Start accepting volume UUIDs from framework.
2015-04-09 22:17:46 +00:00
Jeff Sharkey
6fe28a0601 Start accepting volume UUIDs from framework.
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
2015-04-09 14:15:55 -07:00
Jeff Sharkey
fe62ea5d06 am ad6f4996: am 25327881: am 066fadb9: Merge "More volume UUID awareness."
* commit 'ad6f4996dc909dcb8e6e369bf41be514077fb142':
  More volume UUID awareness.
2015-04-09 20:24:05 +00:00
Jeff Sharkey
41ea424413 More volume UUID awareness.
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
2015-04-09 11:44:06 -07:00
Andreas Gampe
e92939471a am 6930a29a: am cae83eca: am f9ab2ad2: Merge "Installd: Fix Clang build"
* commit '6930a29af13f4a958fa7cba544233d2febe4040b':
  Installd: Fix Clang build
2015-04-09 17:36:05 +00:00
Jeff Sharkey
5fd5dd676a am 65fe5dfd: am cbde9b92: am d107c305: Merge "Plumb through volume UUID when building paths."
* commit '65fe5dfdcd08650e0dfbb39f4a716567fb910cab':
  Plumb through volume UUID when building paths.
2015-04-09 17:00:44 +00:00
Andreas Gampe
0ad7a11003 Installd: Fix Clang build
Remove some unused parameters and variables.

Change-Id: I507ae48fe1744b800ceb29192d463fd26c2ccda7
2015-04-09 09:54:35 -07:00
Jeff Sharkey
d107c305f7 Merge "Plumb through volume UUID when building paths." 2015-04-09 16:27:19 +00:00
Richard Uhler
9cebc2bc77 am b8d1ee37: am 19db8c88: am ab91d03b: Merge "installd: Add support for SELF_PATCHOAT_NEEDED."
* commit 'b8d1ee37c4a6897442f5d381d5eb7162e04fcebd':
  installd: Add support for SELF_PATCHOAT_NEEDED.
2015-04-09 14:51:00 +00:00
Richard Uhler
ab91d03b0d Merge "installd: Add support for SELF_PATCHOAT_NEEDED." 2015-04-09 14:13:27 +00:00
Mark Salyzyn
82f393aad6 am d029e95a: am 1b0a8702: am ad436ab5: Merge "dumpstate: scrub APANIC"
* commit 'd029e95a58ea0927ebd3431d9991cd316e568002':
  dumpstate: scrub APANIC
2015-04-08 22:07:20 +00:00
Mark Salyzyn
f423b57dd9 dumpstate: scrub APANIC
Bug: 19525200
Change-Id: Ia2d2857cac953fb4ceafb66ddf775d89d7a777b1
2015-04-08 10:51:51 -07:00
Jeff Sharkey
c03de09173 Plumb through volume UUID when building paths.
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
2015-04-07 20:13:27 -07:00
Richard Uhler
c92fb6247d installd: Add support for SELF_PATCHOAT_NEEDED.
Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
2015-04-07 16:39:29 -07:00
Jeff Sharkey
580e51458e am eb3704a5: am 9e99fce8: am 1cd030be: Merge "Switch installd to compile as C++."
* commit 'eb3704a58e62c0f85cfea776df1040b677263c80':
  Switch installd to compile as C++.
2015-04-07 21:53:19 +00:00
Jeff Sharkey
19803807cd Switch installd to compile as C++.
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
2015-04-07 14:01:43 -07:00
Jeff Sharkey
e23a13299a Valid APK paths now include expanded storage.
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
2015-04-07 14:01:12 -07:00
Fyodor Kupolov
7897031f3e am b58e6cbf: am 4914f85f: am 8f43f77d: Merge "Use AID_SYSTEM as uid when creating oat dir"
* commit 'b58e6cbfa726add05bbe5e31e8ca13815ccf2049':
  Use AID_SYSTEM as uid when creating oat dir
2015-04-07 20:49:09 +00:00
Fyodor Kupolov
8eed7e6a9b Use AID_SYSTEM as uid when creating oat dir
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
2015-04-07 11:22:00 -07:00
Jeff Sharkey
c0bae30131 Merge "Valid APK paths now include expanded storage." 2015-04-07 04:24:27 +00:00
Jeff Brown
969baf52d9 Merge "Add support for int64, float, double types to service command." 2015-04-07 03:50:29 +00:00
Jeff Brown
d46898fed0 Add support for int64, float, double types to service command.
Comes in handy for invoking transactions that require these types.

Change-Id: I8f14519a2531ab2ec7f3218ecda6d1868f6dd7b3
2015-04-06 19:42:43 -07:00
Jeff Sharkey
7d78005a27 Valid APK paths now include expanded storage.
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
2015-04-06 17:44:27 -07:00
Elliott Hughes
62b58afc21 am 7b5f82d8: am 46072d58: am a60ff367: Merge "Remove useless \'svcmgr_handle\' (which had wrong type)."
* commit '7b5f82d8d726e4bcd21c19340c0743a728bc0253':
  Remove useless 'svcmgr_handle' (which had wrong type).
2015-04-06 23:53:49 +00:00
Elliott Hughes
a60ff367a4 Merge "Remove useless 'svcmgr_handle' (which had wrong type)." 2015-04-06 23:13:32 +00:00
Elliott Hughes
0b41ad5d6e Remove useless 'svcmgr_handle' (which had wrong type).
Also use the 'ptr' union member rather than 'handle'.

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Change-Id: I68e5336cd3af3bc61dbddd2b33d7e1512c0c329c
2015-04-03 22:46:56 -07:00
Elliott Hughes
177861d98f am 2d4cf62a: am 8d9f899a: am 031fec0b: Merge "ServiceManager: Print kernel/userspace binder version"
* commit '2d4cf62a2cdfbfbbca5757eb7dd1498d118bf7c9':
  ServiceManager: Print kernel/userspace binder version
2015-04-04 00:39:46 +00:00
Serban Constantinescu
018cf41a15 ServiceManager: Print kernel/userspace binder version
This patch adds extra logging for the binder version in case the userspace
and kernel versions differ.

Change-Id: I9859b29099726cfcfe5ca23d88ed2e101a06af1a
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2015-04-03 17:02:48 -07:00
Fyodor Kupolov
b3fb52f7d8 am bce77997: am ebca76c2: am 9cad1985: Merge "Fix errors caused by unused variables"
* commit 'bce7799786ae712bba9b58f1f99cd12ee05b5cf3':
  Fix errors caused by unused variables
2015-04-03 14:52:38 +00:00
Fyodor Kupolov
35eefd2fa7 am a46d5e4b: am 63750cb6: am 4eb88f88: Merge "Support for storing OAT files in app directory"
* commit 'a46d5e4b9a598330e2a79395dbd201ab88aded00':
  Support for storing OAT files in app directory
2015-04-03 14:52:20 +00:00
Fyodor Kupolov
26ff93c1a7 Fix errors caused by unused variables
Change-Id: Ie52ae0e9a642504ee7b78c6bc54b61549cfb0342
2015-04-02 17:03:11 -07:00
Fyodor Kupolov
4eb88f8839 Merge "Support for storing OAT files in app directory" 2015-04-02 23:11:01 +00:00
Mark Salyzyn
f386c961ea am a231a128: am 0f9bf17a: am 23b204e1: Merge "servicemanager: service_manager missing include for string.h"
* commit 'a231a1287815e80a5ab11e30254005b81254d891':
  servicemanager: service_manager missing include for string.h
2015-04-01 22:09:31 +00:00