summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Switch to toybox ls."Elliott Hughes2015-05-152-0/+589
| | | | | | | This reverts commit 9c94aa9982c562585c08c5f95569695ccc64f846. Change-Id: Ie2479ee4a0614e285ce8d57c727200a0381904e2 (cherry picked from commit 88f0f4b2b48ab5c685e91e1f23913cad97015bac)
* Switch to toybox ls.Elliott Hughes2015-05-152-589/+0
| | | | | | Bug: http://b/21171466 Change-Id: I3fa09db7ca43d337cbda60f10269e7607544982b (cherry picked from commit 9c94aa9982c562585c08c5f95569695ccc64f846)
* Switch UniquePtr to std::unique_ptr.Christopher Ferris2015-05-152-9/+9
| | | | | | Bug: 21209050 Change-Id: I91d4c44de479b37f2729382fcdf103b8c69aa668 (cherry picked from commit 6e96403b8fd25a98f2cfc9680de45f39ff4ec491)
* Enable clang compilation.Chih-Hung Hsieh2015-05-151-2/+0
| | | | | | | | Previous clang/llvm bug was fixed. BUG: 18790528 Change-Id: Ib12696030d34ebc3c3ef1bca3cad0139d631417e (cherry picked from commit 1cd02d344331735fbaf76e68d0e66c62151ac836)
* Fix ' escaping in adb.Elliott Hughes2015-05-153-8/+29
| | | | | | | | | You can't just use \' inside a single-quoted string. Bug: http://b/20323053 Bug: http://b/3090932 Change-Id: I73754b097671d02dc11c35052f0534b6dd789e4f (cherry picked from commit 84b0bf22644b35d6b3d3f7dc96311a484c3519b3)
* Reduce the coldboot timeout to 1s.Elliott Hughes2015-05-151-1/+4
| | | | | | | | | | | | | | 5s was already a ridiculously long time to delay booting, and some OEMs are trying to make it even more insane: https://www.codeaurora.org/cgit/quic/la/platform/system/core/commit/?h=lp&id=fd23edd48272976d2fb333f377242173f92aa343 Let's at least ensure that Nexus and Android One devices don't take forever to boot... Bug: http://b/19899875 Change-Id: I9680c166a759360f34118e51cd0645e12b6bd5c8 (cherry picked from commit c7331d02d1c6b1e51b3a1210506f38fd61819495)
* Prevent crashes if a map cannot be created.Christopher Ferris2015-05-155-2/+26
| | | | | | | | | | | | | | | Under some conditions, /proc/<pid>/maps might return nothing. If we try and unwind in this case, we'll crash. Check this case and fail the unwind. Add checks that no other functions try and use map_ without checking for nullptr. Add logging when an unwind fails so it's clear what happened. Bug: 21162746 Change-Id: I56ce51dda0cfc9db20475a441f118108196aa07c (cherry picked from commit 30c942cf1024bf791c28ab9b67a1f752de72248c)
* Merge "Move SoftGateKeeper into gatekeeperd" into mnc-devAndres Morales2015-05-144-15/+216
|\
| * Move SoftGateKeeper into gatekeeperdAndres Morales2015-05-144-15/+216
| | | | | | | | | | | | | | | | | | Allows for easy determination of whether there's a hardware module in place. Permits tighter coupling of software implementation with upper-level stack. Bug:21090356 Change-Id: I275b57cd976c233c43c476c5869c5a4b29fbc175
* | Add tests for elf unwinding in memory.Christopher Ferris2015-05-132-4/+304
| | | | | | | | | | | | | | Bug: 19517541 (cherry picked from commit 67aba6881d8857d3017e11695207eb2ade45a274) Change-Id: I914636ccd814e041475b6b2d81119cac1745a9ff
* | Remove libbacktrace definition of gettid.Dan Albert2015-05-136-31/+16
| | | | | | | | | | | | | | | | | | | | | | Also simplifies the Darwin implementation of gettid, because apparently libbacktrace had a better way of doing it. Bug: 19517541 (cherry picked from commit 23f750b068ddf5b20fb5d153a798b22562368992) Change-Id: I2f888e8ed7a2f5719973786cbcbb399a81867ee9
* | Fix gettid() on Windows.Dan Albert2015-05-132-28/+31
| | | | | | | | | | | | | | | | | | | | Accidentally had this all hidden by an #ifndef _WIN32 when I wrote it. Bug: 19517541 (cherry picked from commit b3a36ca5ee79411c18984b85b224d9285b4468af) Change-Id: Ifbd5d19e506e7313700e2e29a2dae5736e049844
* | am 2557cd21: am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to ↵Iliyan Malchev2015-05-131-1/+21
|\ \ | | | | | | | | | | | | | | | | | | be specified as percentage of total memory" into lmp-mr1-dev * commit '2557cd21f0af31d6dafee24d649f83314d2896d4': fs_mgr: allow for zramsize to be specified as percentage of total memory
| * \ am 8b448629: am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified ↵Iliyan Malchev2015-05-121-1/+21
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | as percentage of total memory" into lmp-mr1-dev * commit '8b4486294053ea96ac50d8c07d4fc23729ef7c52': fs_mgr: allow for zramsize to be specified as percentage of total memory
| | * \ am 16092b7a: Merge "fs_mgr: allow for zramsize to be specified as percentage ↵Iliyan Malchev2015-05-121-1/+21
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of total memory" into lmp-mr1-dev * commit '16092b7a48e8426515f67206be2f0aee92fd6006': fs_mgr: allow for zramsize to be specified as percentage of total memory
| | | * \ Merge "fs_mgr: allow for zramsize to be specified as percentage of total ↵Iliyan Malchev2015-05-121-1/+21
| | | |\ \ | | | | | | | | | | | | | | | | | | memory" into lmp-mr1-dev
| | | | * | fs_mgr: allow for zramsize to be specified as percentage of total memoryIliyan Malchev2015-05-011-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the zramsize entry has a % size at the end, as in the following example: /dev/block/zram0 none swap defaults zramsize=25% then we will set the value as that percentage of total RAM, as read by scanning /proc/meminfo. b/20760266 Seed common build allocated too much for zRAM-backed swap Change-Id: I17c91d311ba99ae7adae112bfe1b38542ea69b80 Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | | | | liblog: gtest open("/dev/pmsg0", "a")Mark Salyzyn2015-05-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit df0257d344b6d85bbbdae248748040e15aac35b8) Change-Id: I918025a8ac28204076ce4831ce277b04091619f6
* | | | | | logd: Add TID statisticsMark Salyzyn2015-05-134-3/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit 17ed6797df722464eb5cc6dfc3e1e32aec284b70) Bug: 19608965 Change-Id: Ifbf0b00c48ef12b5970b9f9f217bd1dd8f587f2c
* | | | | | logd: CleanupMark Salyzyn2015-05-1312-119/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit 7718778793b106498b931dd708a466cf3a6f6a0f) - Android Coding Standard for Constructors - Side effects NONE Change-Id: I2cda9dd73f3ac3ab58f394015cb810820093d47b
* | | | | | logcat: liblog: Add "usec" format argumentMark Salyzyn2015-05-133-28/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit e1f2004ecc05ce2d5d4313d16c7791594643f2ef) - Add additional 3 digits of time precision for time output adding in the reporting of usec - Remove trailing space in header file Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
* | | | | | logd: Add klogdMark Salyzyn2015-05-139-24/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit ae4d928d816e30dbe57c2c321b0f0759d0567b3f) - Add a klogd to collect the kernel logs and place them into a new kernel log buffer - Parse priority, tag and message from the kernel log messages. - Turn off pruning for worst UID for the kernel log buffer - Sniff for 'PM: suspend exit', 'PM: suspend enter' and 'Suspended for' messages and correct the internal definition time correction against monotonic dynamically. - Discern if we have monotonic or real time (delineation 1980) in audit messages. - perform appropriate math to correct the timestamp to be real time - filter out any external sources of kernel logging Change-Id: I8d4c7c5ac19f1f3218079ee3a05a50e2ca55f60d
* | | | | | liblog: Add kernel log idMark Salyzyn2015-05-134-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit 440e109d642b691eb857d14bcd1af76740e305fa) Change-Id: I53002f05a8bdf8d67e1d761c56c8761d3b534a76
* | | | | | Fix file descriptor leak when opening invalid archives.Narayan Kamath2015-05-133-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add -Wunreachable-code to the set of compiler flags, otherwise noreturn becomes considerably less useful. bug: https://code.google.com/p/android/issues/detail?id=171099 Change-Id: I9a95d45633c731c7046d4e4a39844d9cebfd1718
* | | | | | Merge "rootdir: add permission for /dev/dvb*" into mnc-devTerry Heo2015-05-131-0/+3
|\ \ \ \ \ \
| * | | | | | rootdir: add permission for /dev/dvb*Terry Heo2015-05-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 20112245 Change-Id: I513c6ed5b65d5bd4edef6cb12d7fc20eb9cad4f1
* | | | | | | Merge changes Ie9d9a7ad,If7479bdc into mnc-devElliott Hughes2015-05-135-11/+16
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Fix insmod module size Enable property expansion for insmod
| * | | | | | | Fix insmod module sizeTom Cherry2015-05-125-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_file() used to append a new line character to the end of the buffer it returns, because parse_config() isn't able to cope with input that's not '\n'-terminated. Fix read_file() to be less insane, and push the workarounds into the parse_config() callers. Longer term we should rewrite parse_config(). Bug: http://b/21079470 Change-Id: Ie9d9a7adcd33b66621726aef20c4b8cc51c08be7 (cherry picked from commit eaa3b4ec6f79fe06163b8dd6fe8ba2581d3b9c0b)
| * | | | | | | Enable property expansion for insmodEmmanuel Berthier2015-05-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Useful for dynamic kernel module location. This permits to use init rule like: insmod ${persist.modules.location}/<module_name> Change-Id: If7479bdcb4e69ea7666f52a0075c785be025c2e9 Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com> (cherry picked from commit ac41230cbc10bae95a049282238adb03605579c2)
* | | | | | | | logd: Add Tag statisticsMark Salyzyn2015-05-125-2/+110
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit 344bff4391dd434dda501e812f18f524290c5a7c) - Optional class of statistics for events Tags - export tagToName from LogBuffer (located in main.cp to address https://android-review.googlesource.com/#/c/110204) - Can not handle dropped because getTag() can not work, will need to be fixed if we start filtering. Bug: 19608965 Change-Id: I7b90607ca588bf37bab71f19b1570a290e772776
* | | | | | | logd: pidToName deficiencyMark Salyzyn2015-05-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Cherry pick from commit aa43ae2268076227e8b72ea095f8aeac439b3168) any logging in zygote permanently sets the pidToName Change-Id: I0b8fdc96fb5965a04d4dc4293c39815beef5eb8e
* | | | | | | logd: uidToName add dex2oat UIDMark Salyzyn2015-05-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit 023f51f360472f6bb9bad495e55cdb32b5411bc5) - When searching for uidToName from /data/system/packages.list one must search for the uid % AID_USER; - If uid % AID_USER is greater than AID_SHARED_GID_START - AID_APP, then subract it and try again to pick up uidToName. Change-Id: I24df42957ff7e746fffa5d39484637b1b726b9c0
* | | | | | | Revert "libaudit: limit to 5 selinux denials per sec"Nick Kralevich2015-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shamu instabilities continued even after throttling SELinux denials to 5/second. 5 denials per second is too low when doing device bringup, and there have been some complaints about lost SELinux denials. See, for example, http://comments.gmane.org/gmane.comp.security.selinux/21941 Bring the limit back up to 20/second to prevent dropping too many denials on the floor. This reverts commit a15db51bbf961ff711d71c10d20e18ad2bfaef45. (cherrypick of commit 9667a66019388fb09430d3f8896ccc531eb24ef5) Change-Id: I05e85cce0a792d05aa557fcc614c0fc019c15014
* | | | | | | Failure to find an oem partition should not be a remount failure.Elliott Hughes2015-05-113-31/+20
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many devices don't have an /oem partition, so find_mount should be expected to fail, but shouldn't cause the overall remount to fail. Also clean up all the error handling and reporting, and remove the dead int* globals. Bug: http://b/21024141 Change-Id: Ie31021b03c9cab8e972269d7d1ffe383cd30ee9e (cherry picked from commit 9aa4fda4e64c1882faf019cc2a483ee4917e0c85)
* | | | | | Merge "load ro.recovery_id property from recovery partition" into mnc-devAndres Morales2015-05-094-1/+65
|\ \ \ \ \ \
| * | | | | | load ro.recovery_id property from recovery partitionAndres Morales2015-05-084-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9dc1f325e353375d9c1c8ed949636e2404601076
* | | | | | | Switch liblog.so to hash-style=bothDmitriy Ivanov2015-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/19059885 Change-Id: I7cde911f11b09c3a13553154aca6e291bb91befb (cherry picked from commit fd8afe6f31c4dd290d8bc68ce9848d73879f4f8a)
* | | | | | | Fix "adb remount" for devices without an oem partition.Elliott Hughes2015-05-082-53/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a device without an oem partition, we now have an /oem directory anyway. This causes find_mount to fail, and that was returning nullptr from a std::string-returning function. Boom! Also clean up the bits of code I had to trace through between "adb remount" on the host to the crash on the device as I debugged this. The only other meaningful change is the error checking in adb_connect_command --- adb_connect can also return -2. Bug: http://b/20916855 Change-Id: I4c3b7858e13f3a3a8bbc7d30b3c0ee470bead587 (cherry picked from commit 5677c23e8d0c085be8d8429a5d125147d11e9bb2)
* | | | | | | Merge "Be tolerant of devices that don't report serials." into mnc-devBenson Leung2015-05-082-28/+30
|\ \ \ \ \ \ \
| * | | | | | | Be tolerant of devices that don't report serials.Dan Albert2015-05-072-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB spec explicitly says this is optional, so we shouldn't be relying on it. Bug: http://b/20883914 Change-Id: Icf38405b00275199bcf51a70c47d428ae7264f2b
* | | | | | | | Try to include the SHA in a ddmslib-compatible way.Elliott Hughes2015-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/20918202 Change-Id: I0c1a48459372b0d28aaf9d09d82540e44b438c9c (cherry picked from commit f3bbfa6a216669c4cd91d5f936662e89e0ae07ca)
* | | | | | | | Merge changes Iac33dbaa,I18fcd37d into mnc-devAndres Morales2015-05-082-2/+1
|\ \ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: pass in correct buffer to print_id stop including rootdir build.prop
| * | | | | | | pass in correct buffer to print_idAndres Morales2015-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hdr.id is actually larger than sha Change-Id: Iac33dbaaf4bea9acde5ba49d8601f7ac767677d5
| * | | | | | | stop including rootdir build.propAndres Morales2015-05-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merged with default.prop Change-Id: I18fcd37ddc63e3607278d0741181d0779118132d
* | | | | | | | Merge "mkbootimg: make mkbootimg print image cksum to stdout" into mnc-devAndres Morales2015-05-081-34/+54
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | / / / / / / | |/ / / / / / |/| | | | | |
| * | | | | | mkbootimg: make mkbootimg print image cksum to stdoutAndres Morales2015-05-071-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | used by the build system as a fingerprint for the image Change-Id: Ifaf230b881e68d921a8158ed2e8a3ee41f27a4b3
* | | | | | | mkbootimg: use fixed-size types for image formatRom Lemarchand2015-05-072-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I471ef420c3944b3ffefdba9ca7122c6a7f09e5ac
* | | | | | | am 6269a95a: resolved conflicts for merge of b67b92f2 to lmp-mr1-ub-devChristopher Ferris2015-05-070-0/+0
|\ \ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | * commit '6269a95a8fe74193d25039cda45b42bfac243586': Do not dump maps/memory/code of sibling threads. DO NOT MERGE
| * | | | | | resolved conflicts for merge of b67b92f2 to lmp-mr1-ub-devChristopher Ferris2015-05-070-0/+0
| |\ \ \ \ \ \ | | | |_|/ / / | | |/| | | | | | | | | | | Change-Id: I6aa2ee2c4bf1802e5aa814374f9842a34179ffea
| | * | | | | Do not dump maps/memory/code of sibling threads. DO NOT MERGEChristopher Ferris2015-05-071-43/+39
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modifies the code so that if the unwind fails, the code still prints as much data as possible. Also, for sibling threads, skip printing the maps and memory/code since it's not likely to be very relevant. Fix a few cases where extra space is at the end of lines. Fix an inverted if statement that was checking the wrong condition. Bug: 18816322 Bug: 20829534 (cherry picked from ab9e7dcef62ae05b3c74215325a2bd2b554d383a) Change-Id: If2d3a734724c23df4192f4dfc6bd69d6729fbc8d