Commit Graph

643 Commits

Author SHA1 Message Date
Andreas Gampe 7ecaa00987 am 53cab935: am 1fc747d2: am 5a25a63d: Merge "Installd: Pass debuggable flag"
* commit '53cab935d54b6ca013c6a236e09d9160a6aa7f54':
  Installd: Pass debuggable flag
2015-03-10 22:04:23 +00:00
Andreas Gampe 1fc747d20c am 5a25a63d: Merge "Installd: Pass debuggable flag"
* commit '5a25a63de2693177b15817fb19b684ca7bfec582':
  Installd: Pass debuggable flag
2015-03-10 02:10:06 +00:00
Andreas Gampe 598c25e23f Installd: Pass debuggable flag
Pass the debuggable flag from the package manager to dex2oat.

Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666
2015-03-09 15:13:24 -07:00
Nick Kralevich 8f1ef92edc am f11b58f2: am fcf1689c: am 5fec7915: Merge "service_manager: reorder permission checks for find"
* commit 'f11b58f296039a0bf90336e4c38c014f11542092':
  service_manager: reorder permission checks for find
2015-03-05 22:43:39 +00:00
Nick Kralevich fcf1689c1a am 5fec7915: Merge "service_manager: reorder permission checks for find"
* commit '5fec79156d749322dcc0376da1d6cf4d9ee9ccf4':
  service_manager: reorder permission checks for find
2015-03-05 21:48:25 +00:00
Nick Kralevich b27bbd18bb service_manager: reorder permission checks for find
Reorder the find permission checks. This avoids generating misleading
SELinux denials when a service doesn't exist, or when a service is
prohibited to isolated apps.

The original reason for structuring the code this way is explained
in https://android-review.googlesource.com/#/c/100530/4/cmds/servicemanager/service_manager.c@172
The concern at the time was to avoid leaking a situation where
a caller could probe for the existance of a service. This turns out
to be unnecessary. The same return value is used for both a
permission denied and a service not found. The only side effect
is the generation of an SELinux audit log, which likely won't be
accessible to the calling application.

Change-Id: I9760e1821ed16102fa5f9bec07f8c34944565be9
2015-03-05 10:58:40 -08:00
Christopher Ferris 123edd9f81 resolved conflicts for merge of 04e13acd to master
Change-Id: I9bbc9907a5cbde8b374398493bc0dc6b056ea734
2015-02-26 11:01:57 -08:00
Christopher Ferris 69a141e07f am 9d68ed0e: Merge "Add timeout for dump_file."
* commit '9d68ed0ecd3a101c13a163cfe730b13b1564b442':
  Add timeout for dump_file.
2015-02-26 18:40:42 +00:00
Christopher Ferris 9d68ed0ecd Merge "Add timeout for dump_file." 2015-02-26 18:35:02 +00:00
Mark Salyzyn 59b0b568d0 resolved conflicts for merge of d6c8ae9c to master
Change-Id: I3cbb6ed0958b4328aca1798c7fe6080c31555a3a
2015-02-26 10:05:40 -08:00
Mark Salyzyn 2f655daeea am bb67beca: Merge "dumpstate: add pstore read"
* commit 'bb67beca35e7d570ede193a316a92022fbc2f810':
  dumpstate: add pstore read
2015-02-26 17:29:07 +00:00
Mark Salyzyn 2262c16372 dumpstate: add pstore read
Call logcat -L to pull any LAST Android logs. If the kernel is not
configured for PSTORE and PSTORE_PMSG, the hopes are the empty
content will pressure vendors to slice up and configure support.

Change-Id: I5fddfa1e0f59f24fccc30b257ba68af8a8cf8640
2015-02-26 07:41:41 -08:00
Christopher Ferris 54bcc5ffd5 Add timeout for dump_file.
It turns out dump_file is used on a number of /proc and system files.
In one case, the read of a file stalled and caused a bugreport to
hang forever. It's still possible if there is a kernel bug that this
could stall forever, but less likely.

Also, change the return type of nanotime to uint64_t.

Testing:
- Created a named fifo and verified that dump_file fails with a timeout.
- Created a large /data/anr/traces.txt to verify that large files still
  dump properly and that the additional NONBLOCK parameter doesn't cause
  a problem.
- Created a dummy /data/tombstones/tombstone_00 to verify that the
  dump of these files still works.
- Compared a dump using the old dumpstate to the new dumpstate to verify
  nothing obviously different.

Bug: 19117030
Change-Id: I0d3dd27583c853cdaccd2fd278748cb5f9ccd4fb
2015-02-25 19:59:29 -08:00
Bill Yi 28d41f5640 Merge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEAD 2015-02-19 14:31:45 -08:00
Svetoslav 326db4f167 Merge "Remove unnecessary settings state dump." 2015-02-18 00:11:59 +00:00
Svetoslav d527bcbc10 Remove unnecessary settings state dump.
The settings provider now implements dump, hance special dump
code is no longer needed.

Change-Id: I93af3f6acac4ac70d6bbf569d2348cb16b8c0946
2015-02-17 12:55:55 -08:00
Elliott Hughes 6576937ff1 am 75b81aee: Merge "Add missing <sys/file.h> include for flock."
* commit '75b81aee3830d0a8c7c10e3ca7f1652543dbbaca':
  Add missing <sys/file.h> include for flock.
2015-02-17 01:38:59 +00:00
Elliott Hughes 2ead70ce67 Add missing <sys/file.h> include for flock.
Change-Id: I5c9bb4aa74d8a36d44e086bbcb5d60876727ce4c
2015-02-16 10:44:22 -08:00
Christopher Ferris 34e3246646 am 8511b3ae: Merge "Remove -z option."
* commit '8511b3ae5eb42810f97f7c3e993d7f80d3393b83':
  Remove -z option.
2015-02-10 16:53:52 +00:00
Christopher Ferris ff4a4dc7e6 Remove -z option.
This option doesn't work with the current selinux protections and
doesn't serve much of a purpose. You can get the same results running
this:

dumpstate | gzip > /data/local/tmp/dump.txt.gz

Bug: 19271141
Change-Id: Icc76200df33dc708e30c556ec8a0f393f995fe7c
2015-02-09 16:45:35 -08:00
Christopher Ferris 16c62c468a am 50ad67e4: Merge "Add better timeout mechanism for running commands."
* commit '50ad67e4ce6b07b5f5f4649ace81ed9a8b2c2eac':
  Add better timeout mechanism for running commands.
2015-02-04 02:08:44 +00:00
Christopher Ferris 1a9a338615 Add better timeout mechanism for running commands.
Change-Id: I60fc9e7d59c3e0e4b8b2f69f79c6903240bfd131
2015-02-03 14:53:44 -08:00
Elliott Hughes 42b5e6d49c am 51bfedd8: Merge "Add missing includes."
* commit '51bfedd821c79ae34ee1caffd9ae958faa71ecec':
  Add missing includes.
2015-01-30 21:16:38 +00:00
Elliott Hughes 824e30e5ed Add missing includes.
Change-Id: I1dad32ab459c25063a70cf52100a29d00fea3a90
2015-01-29 22:32:32 -08:00
Elliott Hughes e55073a96c am 0e17a265: Merge "Switch dumpstate to "ip link list"."
* commit '0e17a265f5e8bf233a3e3b74fc03ada3dc467bed':
  Switch dumpstate to "ip link list".
2015-01-28 17:34:16 +00:00
Elliott Hughes a59828a5d2 Switch dumpstate to "ip link list".
Change-Id: Ia1db51c866890f09fbd4316764dea5982554598f
2015-01-28 08:45:40 -08:00
Elliott Hughes 2e5a1cf27e am 346329b7: Merge "Move atrace from the obsolete bzero to memset."
* commit '346329b7a70b594895be0aec5dc00f9f4108b533':
  Move atrace from the obsolete bzero to memset.
2015-01-25 20:43:27 +00:00
Elliott Hughes 346329b7a7 Merge "Move atrace from the obsolete bzero to memset." 2015-01-25 19:17:14 +00:00
Elliott Hughes 3da5d235da Move atrace from the obsolete bzero to memset.
(This file wasn't including <strings.h> for bzero or <string.h> for memset.)

Change-Id: Icef0e0dbfd36ebd21058cfd8c747e0a17aee8308
2015-01-25 08:35:20 -08:00
Christopher Ferris 3dea840d21 am c0e10c6f: Merge "Refactor of the bugreport code."
* commit 'c0e10c6f03eaa126aeb745e0b209ad0b219ade6e':
  Refactor of the bugreport code.
2015-01-23 23:12:16 +00:00
Christopher Ferris 9b73bf07d7 Refactor of the bugreport code.
Implemented these changes:

- Make this code C++.
- Avoid hangs by adding a timeout.
- Add the necessary TEMP_FAILURE_RETRY calls.
- Restructure the code a bit.

Bug: 18800936

Change-Id: Iba9f86a4c7beee4f0f36e51234855f4c0834db47
2015-01-23 13:40:56 -08:00
Christopher Ferris 31ef85529d Use the timeout stack dump functions.
Use the native stack dumping functions that allows time outs. If
debuggerd locks up, before a bugreport would hang forever. Now
it will timeout properly and still get all of the other information.

Bug: 18766581

(cherry picked from commit 457731f69e)

Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
2015-01-15 15:35:40 -08:00
Christopher Ferris 8d129cbf5a am 457731f6: Use the timeout stack dump functions.
* commit '457731f69e3106b5aae8fc04f9565af1d875876c':
  Use the timeout stack dump functions.
2015-01-15 01:52:14 +00:00
Christopher Ferris 457731f69e Use the timeout stack dump functions.
Use the native stack dumping functions that allows time outs. If
debuggerd locks up, before a bugreport would hang forever. Now
it will timeout properly and still get all of the other information.

Bug: 18766581
Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
2015-01-14 16:58:55 -08:00
Christopher Ferris d195f87b2d Fix message when a command times out.
The previous version printed out the nanoseconds elapsed, not seconds.

Bug: 18766581

(cherry picked from commit 67c5a8af9e)

Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
2015-01-14 16:10:11 -08:00
Christopher Ferris d8dc9405c3 am 4f9bfffe: Merge "Fix message when a command times out."
* commit '4f9bfffe23d40fdaabe91ea7c7691e52800edb79':
  Fix message when a command times out.
2015-01-12 18:48:23 +00:00
Christopher Ferris 67c5a8af9e Fix message when a command times out.
The previous version printed out the nanoseconds elapsed, not seconds.

Change-Id: I10f6d7bf7b7a4647658313ed83781fda6fd744a5
2015-01-09 16:42:56 -08:00
Andreas Gampe ee7ed02077 am 96e4409e: Merge "Installd: Disallow relocation for decryption"
* commit '96e4409e8c38b1d79285eca9886d44ff850b5748':
  Installd: Disallow relocation for decryption
2015-01-07 22:12:26 +00:00
neo.chae 14e084d39a Installd: Disallow relocation for decryption
When decrypting a device, a tmpfs is temporarily mounted as /data,
the size of which is usually small. When the zygote, system server
and necessary apps are brought up, they will be compiled into the
tmpfs.

If the system image contains prebuilts, they will be relocated instead
of compiled. This is unnecessary. In this special situation it is
acceptable to run out of the prebuilt oat files without relocation,
which can save space in the tmpfs.

This patch ensures that apps are not being relocated.

Change-Id: I42bfb7e3039574b7e4f2772e0d395f093d59ed1b
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
2015-01-07 22:03:07 +00:00
Andreas Gampe 4fb9f9377e am d3255076: Merge "Installd: Swap file for dex2oat"
* commit 'd325507698d8379e431a8c8fefcfafe59956bd88':
  Installd: Swap file for dex2oat
2014-12-22 18:39:37 +00:00
Andreas Gampe e1c01353c4 Installd: Swap file for dex2oat
Add swap file support for dex2oat to installd. Only use in low-memory
mode.

Bug: 18596910

(cherry picked from commit f68ce4de7f)

Change-Id: I131448f3907115054a592af73db86d2b9257ea33
2014-12-18 17:23:34 -08:00
Andreas Gampe f68ce4de7f Installd: Swap file for dex2oat
Add swap file support for dex2oat to installd. Only use in low-memory
mode.

Bug: 18596910
Change-Id: I131448f3907115054a592af73db86d2b9257ea33
2014-12-18 16:28:39 -08:00
Andreas Gampe 37321282ec am 1be4021c: Merge "Installd: Remove dalvik paths"
* commit '1be4021c2a867c7e067a3c5b937a054f0eb7817f':
  Installd: Remove dalvik paths
2014-12-16 20:34:31 +00:00
Andreas Gampe bd872e4956 Installd: Remove dalvik paths
Dalvik is dead. Dexopt is dead.

Change-Id: I9ff6b638a3e2c52ae7aec33d7b08a7bee012854f
2014-12-15 11:41:11 -08:00
Dianne Hackborn bbe43a4cdd am e8a4dce8: Merge "Work on issue #18486438: Reduce size of bugreport output" into lmp-mr1-dev
* commit 'e8a4dce8169ba5fdcd86a5fc29aa6986de1711b0':
  Work on issue #18486438: Reduce size of bugreport output
2014-11-25 17:36:43 +00:00
Dianne Hackborn e8a4dce816 Merge "Work on issue #18486438: Reduce size of bugreport output" into lmp-mr1-dev 2014-11-24 17:53:55 +00:00
Bernhard Rosenkränzer 7fb390d10c Mark 2 unused paramters as such
Mark 2 unused paramters to prevent clang from erroring out

Change-Id: Ifc9b4a5b820bd6318e9259e737e708d25fdb174b
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-23 22:28:26 +01:00
Dianne Hackborn 4ba58f69cd Work on issue #18486438: Reduce size of bugreport output
Don't put packages.xml in to the output.

Change-Id: I88a682866365886506a003a64deb4a29c16ba21c
2014-11-21 16:41:31 -08:00
Greg Hackmann 236e790608 am e4c7ec84: Merge "atrace: make fs-specific sysfs entries optional" into lmp-mr1-dev
* commit 'e4c7ec847d83edfb54c215f3ab6093efeb17a586':
  atrace: make fs-specific sysfs entries optional
2014-11-21 20:36:08 +00:00
Mike Lockwood 8b1a27740d am 754f16fc: Merge "Fix installd command line parser"
* commit '754f16fcf4b56f52450f91e3e840bad8a2cc997c':
  Fix installd command line parser
2014-11-21 05:10:57 +00:00
Mike Lockwood 754f16fcf4 Merge "Fix installd command line parser" 2014-11-21 05:02:51 +00:00
Elliott Hughes 8d84b6f9f5 am ba4a43c6: Merge "Kill INCLUDE_SYS_MOUNT_FOR_STATFS."
* commit 'ba4a43c6c78547444446181b4fae20a5d61d35ff':
  Kill INCLUDE_SYS_MOUNT_FOR_STATFS.
2014-11-20 23:00:26 +00:00
Greg Hackmann e80d32c3c2 atrace: make fs-specific sysfs entries optional
The availability of these sysfs entries will vary based on the kernel's
supported filesystems, so don't block the disk category if some of them
are missing.

Bug: 18467498

Change-Id: I96200f1b5cf3f1a8fa8186602552adc96ddffc04
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-11-20 21:10:45 +00:00
Elliott Hughes ba4a43c6c7 Merge "Kill INCLUDE_SYS_MOUNT_FOR_STATFS." 2014-11-20 20:58:53 +00:00
Elliott Hughes 9a4e7f492e Kill INCLUDE_SYS_MOUNT_FOR_STATFS.
Change-Id: I692179cae9d476dd5a0b5fa92813b61934dd7c87
2014-11-20 12:54:21 -08:00
Narayan Kamath 091ea779d4 Add an installd command to mark the end of boot.
bug: 18280671

(cherry picked from commit b1a6c2f95a)

Change-Id: I97542875ffff1b68ab324e9b04fb9266c82633cc
2014-11-19 14:43:05 +00:00
Ian Rogers 35e5423d4d am 11bf9e5c: Merge "Add support for dalvik.vm.isa.<instruction set>.variant"
* commit '11bf9e5c2f90101d56d918e1b3fe780b873e5566':
  Add support for dalvik.vm.isa.<instruction set>.variant
2014-11-14 00:30:33 +00:00
Dmitriy Ivanov 741625a17e resolved conflicts for merge of 37878b1e to lmp-mr1-dev-plus-aosp
Change-Id: I748a7d2fb43fd63189f4688edbd0991e2b609dba
2014-11-11 16:08:29 -08:00
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
Ian Rogers 16a95b267a Add support for dalvik.vm.isa.<instruction set>.variant
Bug: 18056890
Change-Id: Ia266fa9f2a79158ced82016106aa1cd2529259c9
2014-11-08 16:58:13 -08:00
Igor Murashkin cd647d01e5 am 106e5820: Merge "installd: Set priority to background for dexopting" into lmp-mr1-dev
* commit '106e582053121f1934c33a6c98d35377e8ae384a':
  installd: Set priority to background for dexopting
2014-11-06 02:55:23 +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
Serguei Katkov 62bb385728 Fix installd command line parser
Parser does not take into account that the last argument can be empty.
In this case it will skip end of line marker and continue parsing.

Change-Id: I2d029a69ed22cef497893e592ff3275ced97f85f
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
2014-11-05 13:39:43 +06:00
Mark Salyzyn ea14602e6e am 9cea6ccb: dumpstate: report device uptime mmc performance
* commit '9cea6ccbd8789f9583c78ce2b36ac5dd75717b6c':
  dumpstate: report device uptime mmc performance
2014-11-05 00:15:47 +00: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 de0cdcd42c am 70ec2941: atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing
* commit '70ec2941530766bdca09ef2983a3ff794c028ee6':
  atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing
2014-10-28 07:21:22 +00: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 54d613e33c am bf46706f: Merge "dumpstate: Add trusty version if driver is found" into lmp-mr1-dev
* commit 'bf46706f366f0446e60971e32acfcd221b7f19cf':
  dumpstate: Add trusty version if driver is found
2014-10-20 22:07:49 +00: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 664a72d3ac am 91c395f6: am 60fd3fee: Migrate CA certificates to all users
* commit '91c395f6c344682f1ae5926766d4d7247dee6df4':
  Migrate CA certificates to all users
2014-10-15 23:57:04 +00:00
Robin Lee 0adea3b792 am 60fd3fee: Migrate CA certificates to all users
* commit '60fd3feecab4336d964ca8e31c7c3220e1afb558':
  Migrate CA certificates to all users
2014-10-15 19:26:36 +00: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 5653d5de0d am a91968fd: Merge "Accept socket connection before tracing." into lmp-dev
* commit 'a91968fd099378d1673c7443be16adcb97ee40af':
  Accept socket connection before tracing.
2014-10-02 13:38:38 +00:00
Christopher Ferris f625a249b9 am a91968fd: Merge "Accept socket connection before tracing." into lmp-dev
* commit 'a91968fd099378d1673c7443be16adcb97ee40af':
  Accept socket connection before tracing.
2014-10-02 01:16:58 +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
Narayan Kamath 7f8ecd6dba am cde4b13a: Merge "Allow more than one dex2oat extra option"
* commit 'cde4b13a12a0bc8a7bd031f5d5c1b2b2bdd13335':
  Allow more than one dex2oat extra option
2014-10-01 11:18:25 +00:00
Narayan Kamath 28da32889b am cde4b13a: Merge "Allow more than one dex2oat extra option"
* commit 'cde4b13a12a0bc8a7bd031f5d5c1b2b2bdd13335':
  Allow more than one dex2oat extra option
2014-10-01 11:15:12 +00:00
Lorenzo Colitti 63a8e04d2d am d9485403: Merge "Include the VPN server IP address in the VPN state file." into lmp-dev
* commit 'd94854030c76fc4ee4126ca1707a76fbd1f29126':
  Include the VPN server IP address in the VPN state file.
2014-09-23 15:50:59 +00:00
Lorenzo Colitti 7a99e281dd am d9485403: Merge "Include the VPN server IP address in the VPN state file." into lmp-dev
* commit 'd94854030c76fc4ee4126ca1707a76fbd1f29126':
  Include the VPN server IP address in the VPN state file.
2014-09-23 02:53:42 +00: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
Yevgeny Rouban b0d8d00b29 Allow more than one dex2oat extra option
All extra options are provided as one argument to dex2oat.
The patch splits all options to individual ones.

Change-Id: Ied65bb9cf38b114611e88a8d5d86305021700d0b
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
2014-09-17 10:58:35 +00:00
Dan Albert 4355c0c986 am e1e3d278: Merge "Clean cruft out of makefiles."
* commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2':
  Clean cruft out of makefiles.
2014-09-12 16:22:03 +00:00
Dan Albert 9e8b528926 resolved conflicts for merge of 07c9557f to lmp-dev-plus-aosp
Change-Id: Ic212ab2ee90b1cc7db7203210b047c870bb5c476
2014-09-12 09:00:50 -07:00
Jeff Brown 6f3e466b14 am 70b9e6c8: Merge "Make dumpstate vibrate immediately." into lmp-dev
* commit '70b9e6c8f3221bbbeefc85c70746541a5b318afc':
  Make dumpstate vibrate immediately.
2014-09-12 05:36:59 +00:00
Dan Albert b79dfe6721 Clean cruft out of makefiles.
Cleans up manual uses of stlport and bionic (and removes uses of private
bionic headers).

Change-Id: I157309d702e59152adfa3450939082248ae4c043
2014-09-11 18:49:47 -07:00
Chih-Hung Hsieh 99d9fb15b4 Fix warnings on unused variables and parameters.
BUG: 17474723
Change-Id: If40f5e765090cfb970e4129b78b1e74cf8bad217
2014-09-11 16:57:59 -07: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 500c086a7e am 5ef471c5: Merge "Use time() instead of clock() for timeouts." into lmp-dev
* commit '5ef471c5f986a52c681a29856c38f72127cdf8ac':
  Use time() instead of clock() for timeouts.
2014-09-09 21:56:14 +00:00
Christopher Ferris e2c86c71c2 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

(cherry picked from commit 89d4949f86)

Change-Id: I42f0f24ee53ef99955fd482a1089e39d491f3bd5
2014-09-09 13:36:52 -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 0ffb91383f am 464e539c: Merge "Add new system APK locations." into lmp-dev
* commit '464e539cd3e931aaca99a67d0addc6d68bd96b3d':
  Add new system APK locations.
2014-09-09 16:44:52 +00: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
Nick Kralevich 2a8bb978d5 am 51eec3b9: Merge "Fix relabeling of secondary user package directories."
* commit '51eec3b98788039afc5fd7ffe76612c7f8d9b39c':
  Fix relabeling of secondary user package directories.
2014-09-08 20:55:32 +00:00
Stephen Smalley 8ac2a648b6 Fix relabeling of secondary user package directories.
When relabeling secondary user package directories, we need to use
the uid of the directory rather than the primary package UID;
otherwise, levelFrom=user will not work correctly.

Change-Id: I0d76ec6ec6fe56a566023ca5e1398efdf28fc81e
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-09-08 15:51:55 -04:00
Brian Carlstrom ad2a4083fe am 8c1642ad: Merge "Remove obsolete prunedexcache"
* commit '8c1642ad4ea8fbeb7d03f30e5f50e03c28d40065':
  Remove obsolete prunedexcache
2014-08-29 11:39:54 +00: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
Alex Light 5f727f8694 Remove obsolete prunedexcache
Bug: 16875245

Change-Id: I06e14c405aa4af295795982c1d236be3cb00e893
2014-08-28 23:30:52 +00:00
Jeff Sharkey 18a9457edd am 7903c6a2: Merge "Make clear data stricter." into lmp-dev
* commit '7903c6a263354506ace10fc32aa65c231b64f62b':
  Make clear data stricter.
2014-08-27 18:26:20 +00: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 7330016a75 am 97477d20: Set compiler filter flag to true when vmSafeMode is present.
* commit '97477d203eaf0c3235bbe2415356f20a0431cada':
  Set compiler filter flag to true when vmSafeMode is present.
2014-08-27 16:33:27 +00:00
Calin Juravle 4f60ac2bbc Add vm_safe_mode to dexopt.
The flag enforces interpret-only flag for dex2oat.

Bug: 12457423

(cherry picked from commit b1efac1035)
(cherry picked from commit 97477d203e)

Change-Id: I215339527e998b24e274c8df42a5024839e6a9fa
2014-08-27 16:16:05 +01: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 2d509c0113 am 7de2bde3: Merge "Add vm_safe_mode to dexopt." into lmp-dev
* commit '7de2bde3c4c3a6ecc7e6f21e3f3322688b718c4a':
  Add vm_safe_mode to dexopt.
2014-08-26 19:28:57 +00:00
Calin Juravle 7de2bde3c4 Merge "Add vm_safe_mode to dexopt." into lmp-dev 2014-08-26 19:10:06 +00:00
Calin Juravle 188fb813c1 am 20558f11: Merge "Pass isa features flag to dex2oat." into lmp-dev
* commit '20558f1154abcf3360fd972f6d2c80bb80f78502':
  Pass isa features flag to dex2oat.
2014-08-26 17:51:57 +00:00
Calin Juravle e9eb12c291 Pass isa features flag to dex2oat.
Bug: 16716262

(cherry picked from commit 8fc7315a67)

Change-Id: I3cb1d82604612bc7212bcbdeef685bc05b695b6a
2014-08-26 18:48:30 +01: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 03d45ded3c am 47c166a9: Merge "Fix deadlock when killing adb bugreport" into lmp-dev
* commit '47c166a9ad740707f86719e0de56e20c73f407c1':
  Fix deadlock when killing adb bugreport
2014-08-25 17:49:18 +00: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 01f481649d am c597b6dd: Fix validation of system paths in installd.
* commit 'c597b6dd895dbb2b28c757ce7a2651b3cdc9b00c':
  Fix validation of system paths in installd.
2014-08-22 14:54:28 +00:00
Calin Juravle f53c08befc 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

(cherry picked from commit c597b6dd89)

Change-Id: Ic5f15d1864c6af9f4c4b07dc27244ebbb521ad5e
2014-08-22 15:33:30 +01: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 c542d1141d am 67cfe0c0: Merge "Allow apk path to contain one subdirectory." into lmp-dev
* commit '67cfe0c0660c36ca385ad0eeb1352a2df721b49c':
  Allow apk path to contain one subdirectory.
2014-08-22 13:15:53 +00:00
Calin Juravle 9d76156266 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

(cherry picked from commit fd88ff2edd)

Change-Id: I1002529b0c35852c67540d3165d1444523460592
2014-08-22 14:04:45 +01:00
Calin Juravle 67cfe0c066 Merge "Allow apk path to contain one subdirectory." into lmp-dev 2014-08-22 12:58:11 +00:00
Colin Cross 368e2eceb7 am 61a4eecb: Merge "atrace: avoid unnecessary writes to trace_clock" into lmp-dev
* commit '61a4eecbe615bc94944161c4cf4aa590dfca1b2e':
  atrace: avoid unnecessary writes to trace_clock
2014-08-21 03:06:23 +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 7477a8a0a3 am b1f0f288: Merge changes I4cfb3138,I45356c29 into lmp-dev
* commit 'b1f0f288e30c0448cabd46d19c60b3bd0d272f74':
  atrace: add memory reclaim tracing
  atrace: Add IRQ events
2014-08-19 01:48:59 +00: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 9612a31003 am c8c5e4c6: Merge "Add trace tag for power management." into lmp-dev
* commit 'c8c5e4c66b858fc41bdb696421eb13c3ea65a238':
  Add trace tag for power management.
2014-08-16 03:14:00 +00:00
Jeff Brown c8c5e4c66b Merge "Add trace tag for power management." into lmp-dev 2014-08-15 21:23:40 +00:00
Brian Carlstrom 46ab27e624 am e18987ef: Disable verification based on vold.decrypt. [frameworks/native]
* commit 'e18987efb5e39ca1bed15527b7b82bde55c99669':
  Disable verification based on vold.decrypt. [frameworks/native]
2014-08-15 17:20:38 +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
Brian Carlstrom f7765c4a17 Disable verification based on vold.decrypt. [frameworks/native]
Bug: 15165413

(cherry picked from commit e18987efb5)

Change-Id: Ie55ef400c9d1f231b3be64248c756ac798a11ffe
2014-08-15 10:05:32 -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
Andreas Gampe f12e678d4b am 1a22eb7b: Merge "Change an accidental ALOGE to an ALOGV"
* commit '1a22eb7ba1062ed1ee35cdb9d797019699cbce8b':
  Change an accidental ALOGE to an ALOGV
2014-08-11 20:00:46 +00:00
Andreas Gampe 1a22eb7ba1 Merge "Change an accidental ALOGE to an ALOGV" 2014-08-11 18:01:48 +00:00
Narayan Kamath 93b1b9a42c am 82e98c21: Merge "Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup"
* commit '82e98c21f8606e0de8c6beb4372bc4ae9f52b515':
  Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup
2014-08-11 17:36:11 +00: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
Alex Light a7915d437c Change an accidental ALOGE to an ALOGV
Change-Id: If07bcef597dd9e531ce6d92c7780ba6ad5090f9a
2014-08-11 10:07:02 -07:00
Brian Carlstrom 0378aaf257 Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup
Bug: 15927194
Change-Id: Id8bc188de68d62fd5f91a99aaaa6c8f2dea06abd
2014-08-08 22:10:06 -07: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
Brian Carlstrom 021843c78d am 8ce28672: Merge "Make system use patchoat to relocate during runtime."
* commit '8ce28672106956eeff6d0ed2d1d826ec192e58ee':
  Make system use patchoat to relocate during runtime.
2014-08-05 21:00:09 +00:00
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 755d35f5fa am 74b3ecf4: Merge "Disable compilation based on vold.decrypt. [frameworks/native]"
* commit '74b3ecf485254d8cb4ae2b1d4d5221454738a58d':
  Disable compilation based on vold.decrypt. [frameworks/native]
2014-08-04 18:37:31 +00:00
Brian Carlstrom 6461ddb4e1 am 9c49e21d: Merge "Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]"
* commit '9c49e21d80cb55b7d77fdf118f06b88100141678':
  Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]
2014-08-04 18:37:26 +00: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
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
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 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