Commit Graph

425 Commits

Author SHA1 Message Date
Narayan Kamath b1a6c2f95a Add an installd command to mark the end of boot.
bug: 18280671

Change-Id: I6b3aeaf143ab3b78881f163ec5c17b9bf20172ed
2014-11-10 17:04:12 +00:00
Igor Murashkin 106e582053 Merge "installd: Set priority to background for dexopting" into lmp-mr1-dev 2014-11-06 02:43:56 +00:00
Igor Murashkin 9e87a80140 installd: Set priority to background for dexopting
This fixes jank caused by dex2oat while installing an application in the
background.

Bug: 17497551
Change-Id: I5a69b00c0fd76ae22a0d1adb242bef6c18a75743
2014-11-05 15:21:12 -08:00
Mark Salyzyn 9cea6ccbd8 dumpstate: report device uptime mmc performance
Bug: 18085992
Change-Id: Ibc0a37d3d2649d1e6708d9357f37ed75f2cea121
2014-11-04 09:39:27 -08:00
Patrick Auchter 70ec294153 atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing
Both Sync Manager tracing and kernel sync tracing were using "sync" to
enable tracing and since Sync Manager was found first, this prevented
enabling kernel sync tracing.

To fix this, use "syncman" to enable Sync Manager tracing.

Change-Id: Id3b799e01e5041c582cd752c8c40d3e36954f821
Signed-off-by: Iliyan Malchev <malchev@google.com>
2014-10-27 13:07:58 -07:00
Arve Hjønnevåg 2db0f5f31c dumpstate: Add trusty version if driver is found
Change-Id: I7780ea8e1d777c222a73408f70d8a6d49dee1d92
2014-10-16 16:11:07 -07:00
Robin Lee 60fd3feeca Migrate CA certificates to all users
Copies the /data/misc/keychain/cacert-* directories to all users on
the device, whereas previously they were simply copied to user 0.

This is a shallow copy so anything that wasn't supposed to be there
will disappear.

Bug: 17811821
Change-Id: Iae5909ab8d5efdb83c9c8fdf0e10ab7060d022cc
2014-10-15 19:04:33 +00:00
Christopher Ferris ed9354fc84 Accept socket connection before tracing.
Sometimes dumping threads takes a long time and bugreport times
out. This change will cause us to accept the bugreport socket connection
before dumping threads and should avoid the failed to connect to dumpstate
service problems we've seen.

Bug: 17758374
Change-Id: I80afa0353cf1c340873f481a8d1d7faffff54120
2014-10-01 17:35:01 -07:00
Lorenzo Colitti a9e8374c72 Include the VPN server IP address in the VPN state file.
This will be used by LegacyVpnRunner to create a throw route
pointing at it.

Bug: 17462989
Change-Id: I3ebf0cec726dd12b2c57ba5d66775f8c02b25b70
2014-09-19 13:27:56 +09:00
Jeff Brown 1dc94e3156 Make dumpstate vibrate immediately.
Previously, the vibration was not performed until after stacks
were gathered which takes a long time.  Moved the vibration
to happen earlier so we provide better user feedback for the
three-button salute when collecting a bug report.

Deleted some dead code for playing begin/end sounds.

Improved the timing measurement code to help track down why
bug reports are so slow.  (They take over a minute now which
can cause us to lose valuable diagnostic information.)

Bug: 17474152
Change-Id: Iac73f7993d7dc85196aad96f459b22fd4a710f94
2014-09-11 14:19:04 -07:00
Christopher Ferris 5ef471c5f9 Merge "Use time() instead of clock() for timeouts." into lmp-dev 2014-09-09 20:29:15 +00:00
Christopher Ferris 89d4949f86 Use time() instead of clock() for timeouts.
The clock() function returns the processor time used by the process. This
is not a good timeout mechanism since the code is suspended most of the
time waiting for the forked process to finish. Replace with the time()
function.

Bug: 17154069
Change-Id: Ib383329f9db269445d71a100553b08e71fddda3f
2014-09-09 13:10:49 -07:00
Jeff Sharkey 770180a4dd Add new system APK locations.
Add /system/priv-app and /oem/app paths to system paths.  Also allow
rmdex on system apps, and quietly ignore when it was already removed.

Also relax logging when clearing code cache, since it's optional.

Bug: 17205122
Change-Id: I4fc4d0f63a3596937c4defbd64e1f8a1c563f02d
2014-09-09 08:22:58 -07:00
Alex Light 8b17ac6bd6 Remove obsolete prunedexcache
Bug: 16875245

(cherry picked from commit 5f727f8694)

Change-Id: I06e14c405aa4af295795982c1d236be3cb00e893
2014-08-28 16:54:54 -07:00
Jeff Sharkey 7903c6a263 Merge "Make clear data stricter." into lmp-dev 2014-08-27 17:58:35 +00:00
Jeff Sharkey 3316fe472f Make clear data stricter.
It should nuke everything under the data directory.  PMS will come
around and generate the lib symlink after we're finished.

Bug: 16739202
Change-Id: Ib70af2e1450e3bed6781fb497b9cc67e1e594c49
2014-08-27 10:46:28 -07:00
Calin Juravle 97477d203e Set compiler filter flag to true when vmSafeMode is present.
Bug: 12457423
Change-Id: I33345c5cce76681d8a6592ebae8c9f96a9f0f8bd
2014-08-27 16:10:03 +01:00
Calin Juravle 7de2bde3c4 Merge "Add vm_safe_mode to dexopt." into lmp-dev 2014-08-26 19:10:06 +00:00
Calin Juravle 20558f1154 Merge "Pass isa features flag to dex2oat." into lmp-dev 2014-08-26 17:34:57 +00:00
Calin Juravle b1efac1035 Add vm_safe_mode to dexopt.
The flag enforces interpret-only flag for dex2oat.

Bug: 12457423
Change-Id: Ifdafcc1afa32996577fa44c5682eeb58c79772ac
2014-08-26 18:10:40 +01:00
Calin Juravle 8fc7315a67 Pass isa features flag to dex2oat.
Bug: 16716262
Change-Id: Ifbc3a1520bc177aa87855edb60c36346f24c77cd
2014-08-26 18:10:36 +01:00
Andres Morales 47c166a9ad Merge "Fix deadlock when killing adb bugreport" into lmp-dev 2014-08-25 17:31:50 +00:00
Andres Morales 2e671bbdb7 Fix deadlock when killing adb bugreport
Leave default signal handler (terminate) for parent process,
add SIG_IGN as signal handler for children and let them
go down when the parent gets SIGPIPE.

Bug: 17109154
Change-Id: Id33db3e97a32f289eb2a9a1a0ca8acbe3dcd285d
2014-08-22 12:10:44 -07:00
Calin Juravle c597b6dd89 Fix validation of system paths in installd.
System apps are now installed under their own directory
(system_app_dir/app_dir/app.apk). The new path doesn't pass installd
validation because of obsolete checks which verify that the path does
not contain subdirectories past the system_app_dir.

The CL fixes the validation to accept at most on subdirectory.

Bug: 17109858
Change-Id: I13abb52c0016610ff436f6a26bb6b3b85dc4dfb0
2014-08-22 14:52:53 +01:00
Calin Juravle 67cfe0c066 Merge "Allow apk path to contain one subdirectory." into lmp-dev 2014-08-22 12:58:11 +00:00
Calin Juravle fd88ff2edd Allow apk path to contain one subdirectory.
In the current directory layout this prevented rm_dex and move_dex
commands to validate the apk path and thus cleaning up resources.

Bug: 16888084
Change-Id: Iba579d075a9c6d7de047e7ffef95441498257086
2014-08-20 15:37:54 +01:00
Colin Cross b1ce49b2ed atrace: avoid unnecessary writes to trace_clock
Writing to trace_clock erases the trace buffer, even if the value
hasn't changed.  This prevents use of --async_start and --async_dump
to leave background tracing running and dump after an even that
needs debugging, because --async_dump writes to trace_clock and
resets the buffer before it can read it.

Read and parse the current value from trace_clock before writing,
and skip the write if the value isn't changing.

Change-Id: Ia2ec5bb654fb0bd179771b511ff261731ba47dca
2014-08-20 14:28:47 -07:00
Colin Cross 580407f107 atrace: add memory reclaim tracing
Add "memreclaim" to trace direct reclaim, shrink slab cycles, and
kswapd waking up and sleeping.

Change-Id: I4cfb313820a3a9aa5a9d07a39c42db41c24304a6
2014-08-18 17:48:16 -07:00
Dan Willemsen f440d398fa atrace: Add IRQ events
Add "irq" to trace irq and softirq events.

Change-Id: I45356c2912a1fa130667ada7b21e9fb54ddcfba5
2014-08-18 17:47:56 -07:00
Jeff Brown c8c5e4c66b Merge "Add trace tag for power management." into lmp-dev 2014-08-15 21:23:40 +00:00
Brian Carlstrom e18987efb5 Disable verification based on vold.decrypt. [frameworks/native]
Bug: 15165413
Change-Id: Ie70bf4e1348b7b8b2454cf9b498b272416d61c34
2014-08-15 09:57:55 -07:00
Jeff Brown 3200b0bf50 Add trace tag for power management.
Also added a couple of other existing missing tags in atrace.

Bug: 17004602
Change-Id: I6f697a2a15922bd4695acfa203d45eaae40cd00e
2014-08-14 19:24:47 -07:00
Brian Carlstrom 3b14e5b1f3 Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup
Bug: 15927194

(cherry picked from commit 0378aaf257)

Change-Id: I462b5ac256c4d091ed4023cf4b97dd6a4abcaa5f
2014-08-11 18:31:03 +01:00
Brian Carlstrom 41cd9eb424 Disable compilation based on vold.decrypt. [frameworks/native]
Bug: 15165413

(cherry picked from commit 538998f204)

Change-Id: Idae36efa1cb3fb99b51fa0a79b6bb037981d1c71
2014-08-06 21:59:35 -07:00
Brian Carlstrom 9a87db6e1f 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

(cherry picked from commit cf51ba1360)

Change-Id: I6613c9710878d56ed8c121e0caded76a64430f76
2014-08-06 21:59:32 -07:00
Alex Light 43c5d30795 Make system use patchoat to relocate during runtime.
Make installd understand a patchoat directive and carry it out.

Bug: 15358152

(cherry picked from commit 7365a10689)

Change-Id: Id84a15e626ddde63876914068d3d9aa037abc65b
2014-08-06 16:27:55 -07:00
Lorenzo Colitti d4c3d38957 Improve network connectivity dumping.
1. Explicitly dump IP addresses.

   Currently, some IP addresses are dumped using netcfg, but that
   only dumps the first IPv4 address on each interface. Instead,
   call ip -4 addr and ip -6 addr explicitly to dump all IPv4 and
   IPv6 addresses on the system.

2. Disable dumping /proc/net/{ipv6,}route, because:

 - We already dump all IPv4 and IPv6 routes in the tables that
   we use.
 - /proc/net/route is confusing because it only includes routes
   in the main table, which are all but unused. It's also in
   unreadable host-byte-order hex.
 - /proc/net/ipv6_route is confusing because it includes routes
   from all tables but does not say what table they are in.

3. Instead of dumping the contents of /proc/net/arp , use
   "ip -4 neigh show" and "ip -6 neigh show" to dump the
   neighbour caches for both IPv4 and IPv6.

Bug: 16663736
Change-Id: Id3e509b877ab7b00eb2399b6a9868b12245da2f0
2014-07-31 01:56:12 +00:00
Christopher Ferris 7dc7f3221f Add dumping of tombstones to dumpstate.
Dump only those tombstones modified within the last half an hour.

Change-Id: I8ce836b2e19eba7a9c0c31a4f312f9a382526da7
2014-07-23 19:18:07 -07:00
Elliott Hughes d2a049220a Always #include <sys/...>, not <linux/...>.
(cherry picked from commit 1e4ee9afd2)

Change-Id: Ie005774484f98bb33c8f867cddb778ac04a1d4ea
2014-07-18 18:19:54 -07:00
Elliott Hughes 119b765a05 Fix implicit declaration of function 'prctl' in installd.
(cherry picked from commit ec535c5ba5)

Change-Id: I3da977d85ce544b23ff00934fdbd201d683e9210
2014-07-18 17:30:32 -07:00
Colin Cross 0d6180f122 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.

(cherry picked from commit 8eb25d552b)

Change-Id: I6b1568161fae278f0e6107990e5b750cf0ca902b
2014-07-17 12:42:14 -07:00
Jeff Sharkey c796b681e5 Offer to delete code cache directories.
Bug: 16187224
Change-Id: Ia860b051a34ffdfb4f6e0ea19f90cb73509c4eee
2014-07-15 21:49:51 -07:00
Riley Spahn 2a0e40945b 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.

(cherry picked from commit c67e6307ca)

Change-Id: Iaf14b21346822a6b544091a0f4a9949117934b9a
2014-07-15 10:11:33 -07:00
Matthew Xie f3381cf1a6 dump bluedroid kernel status do not merge
Change-Id: I4617f770088f86ceda2caf58bd1fdae81b3e31df
(cherry picked from commit ed3b9a0977)
2014-07-14 20:53:32 +00:00
Nick Kralevich 652c485467 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

(cherry picked from commit 7d42a3c31b)

Change-Id: I1f826b88826561ea126d811c087ba30623141511
2014-07-14 10:19:55 -07:00
Robin Lee 16cec83a66 am 8098af6e: am 7c5be65f: Merge "Rename \'mkuser\' command to \'mkuserconfig\'"
* commit '8098af6ea29e9d28a6314d12963cef3107de9c18':
  Rename 'mkuser' command to 'mkuserconfig'
2014-07-09 17:36:12 +00:00
Robin Lee 8098af6ea2 am 7c5be65f: Merge "Rename \'mkuser\' command to \'mkuserconfig\'"
* commit '7c5be65f2819bf0328715bc405483788dd7a81f2':
  Rename 'mkuser' command to 'mkuserconfig'
2014-07-09 17:31:58 +00:00
Brian Carlstrom fe91d89b4f am d441dbc6: am cbb9d0d7: Merge "Make dex2oat heap size product configurable [frameworks/native]"
* commit 'd441dbc6436dbf8cb13f0b784c7d16f022b7586e':
  Make dex2oat heap size product configurable [frameworks/native]
2014-07-09 15:07:38 +00:00
Sreeram Ramachandran c88da7cc21 resolved conflicts for merge of 928e05b1 to master
Change-Id: I1d1e623a1f95baa4375a87242ce71ea789884649
2014-07-09 08:05:04 -07:00
Brian Carlstrom d441dbc643 am cbb9d0d7: Merge "Make dex2oat heap size product configurable [frameworks/native]"
* commit 'cbb9d0d74008e460963a3c3094f654c50a04a295':
  Make dex2oat heap size product configurable [frameworks/native]
2014-07-09 12:36:58 +00:00