OSDN Git Service
Treehugger Robot [Wed, 8 Mar 2017 16:22:32 +0000 (16:22 +0000)]
Merge "libbinder: use sysconf(_SC_PAGESIZE) to get pagesize"
Calin Juravle [Tue, 7 Mar 2017 19:00:18 +0000 (19:00 +0000)]
Merge "Installd: Clean up code related to foreign dex use"
Ganesh Mahendran [Fri, 3 Mar 2017 01:41:14 +0000 (09:41 +0800)]
libbinder: use sysconf(_SC_PAGESIZE) to get pagesize
pagesize is not always 4KB, use sysconf(_SC_PAGESIZE) to get
real pagesize.
Change-Id: Ib2c82c3a842257601a5c304da3a1f0b07c6ab8c0
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Yifan Hong [Mon, 6 Mar 2017 20:20:18 +0000 (20:20 +0000)]
Merge "lshal: update descriptions in output."
Jeff Sharkey [Sun, 5 Mar 2017 00:48:59 +0000 (00:48 +0000)]
Merge "Small change for testing."
Jeff Sharkey [Sun, 5 Mar 2017 00:48:00 +0000 (17:48 -0700)]
Small change for testing.
Bug:
35970955,
35969439,
35968280
Change-Id: I56c6626221b456e13b1371b69e9c980edaddfa91
Calin Juravle [Sat, 4 Mar 2017 01:00:35 +0000 (17:00 -0800)]
Installd: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.
Also, fix the getUserSize by considering the size of the actual profiles
not of the set of empty markers.
Test: device boots, foreign dex markers are not created anymore
Bug:
32871170
Change-Id: I9250e816a1bfa95cb10155e513ae28ebfda7ce4b
Yifan Hong [Fri, 3 Mar 2017 18:57:43 +0000 (10:57 -0800)]
lshal: update descriptions in output.
Test: pass
Change-Id: I912e2153e531a35ecdf1e76fd6bafa68880b8721
Yifan Hong [Fri, 3 Mar 2017 17:49:54 +0000 (17:49 +0000)]
Merge changes from topic 'lshal_32'
* changes:
lshal: Put more description to output
lshal: also list libraries in 32-bit.
Yifan Hong [Fri, 3 Mar 2017 03:19:29 +0000 (19:19 -0800)]
lshal: Put more description to output
Split the output by three parts according to the source of information.
Describe each part before the table.
--sort will be applied to each table individually.
Bug:
35803917
Test: lshal
Change-Id: Ief0dae21fdeb58ebaed46d2aa68f298b8b75218d
Yifan Hong [Fri, 3 Mar 2017 00:54:11 +0000 (16:54 -0800)]
lshal: also list libraries in 32-bit.
Add an "Arch" column (selected by -r) to lshal
to show whether the HAL runs in 32 bit or 64 bit.
* For binderized services, whether the process
runs in 32bit or 64bit (__LP64__)
* For passthrough libraries (-impl.so), whether
the library is in /{system,vendor,odm}/lib/hw
or /{system,vendor,odm}lib64/hw
Bug:
35803184
Test: lshal -itrpc
Change-Id: I328da4ad9eacbf2959be4ac2e478c16535a89068
Calin Juravle [Thu, 2 Mar 2017 23:54:22 +0000 (23:54 +0000)]
Merge changes from topic 'secondary-dex'
* changes:
Fix the ownership of compiler artifacts for secondary dex files
DEXOPT_FORCE may be passed for primary apk as well.
[Installd] Clean up logic for secondary dex oat files
Add installd logic for compiling secondary dex files
Calin Juravle [Wed, 15 Feb 2017 20:44:14 +0000 (12:44 -0800)]
Fix the ownership of compiler artifacts for secondary dex files
odex, vdex and art files should be owned by the app and not by system.
Test: verify odex and vdex owner:
adb shell cmd package compile -m speed --secondary-dex -f
com.google.android.gms
adb shell ls
/data/user/0/com.google.android.gms/app_chimera/m/
00000004/oat/arm64/
-al
-rw-r--r-- 1 u0_a17 u0_a17
5640832 2017-02-02 18:00
DynamiteModulesA_GmsCore_prodmnc_alldpi_release.odex
-rw-r--r-- 1 u0_a17 u0_a17
3016818 2017-02-15 12:42
DynamiteModulesA_GmsCore_prodmnc_alldpi_release.vdex
Bug:
35389574
Bug:
32871170
(cherry picked from commit
944d0def1a628bcbd76056683085efd2b999fe5b)
Change-Id: I1f0d09d04807b6284d42f0cf89956322a4214d5f
Merged-In: I0650265cedcc572d43bb1fc0d0758ae43ea890b2
Calin Juravle [Tue, 31 Jan 2017 21:53:00 +0000 (13:53 -0800)]
DEXOPT_FORCE may be passed for primary apk as well.
Remove the check that DEXOPT_FORCE is not set for primary apks. PM will
set it when forcing compilation.
Bug:
32871170
Test: adb shell cmd package compile -f m speed pkgname
(cherry picked from commit
259702336f5826d2a205a2b038cb5a3263fb10e9)
Change-Id: Id34cd1ec929a1e196caf61651a18eb9c275b2590
Merged-In: I690608c48a2c486230ca7d2328ac5c6181427328
Calin Juravle [Wed, 25 Jan 2017 09:17:17 +0000 (01:17 -0800)]
[Installd] Clean up logic for secondary dex oat files
Add a new method to installd, reconcileSecondaryOdex, which checks if
the given dex files still exist and if not, deletes the oat files that
were generated for it.
Test: devices bots
adb shell cmd package reconcile-secondary-dex
com.android.google.gms (after artificially/temporarily renaming some
dex files)
Bug:
32871170
(cherry picked from commit
bd9683607d391a29b1422a50f8972267e9bddc47)
Change-Id: Icb5c71b43a0e531d5be5d900149e707d0fe0a8de
Merged-In: I8465a7be9fd4e44e191ad40f7bd0f41c8b2d6f73
Calin Juravle [Tue, 17 Jan 2017 22:43:25 +0000 (14:43 -0800)]
Add installd logic for compiling secondary dex files
Secondary dex compilation takes almost the same path as primary apk
compilation.
The main difference is in the fact that for secondary dex files we
create the oat dir on the fly and execute dexoptanalyzer (the equivalent
of GetDexOptNeeded) to check if we really need to perform the
compilation.
Test: adb shell cmd package compile -f -m speed --secondary-dex com.google.android.gms
Bug:
32871170
(cherry picked from commit
42451c029b0e87990e5833daea2286bb12c21df5)
Change-Id: Ie5efe6eccc6b8c91ca7bd7c9e680aa7288d79ae8
Merged-In: I2c56d57322899968a338ccabffca575d66f8ee08
Elliott Hughes [Wed, 1 Mar 2017 23:27:07 +0000 (23:27 +0000)]
Merge "Move dumpstate to calling getprop."
Elliott Hughes [Tue, 28 Feb 2017 18:14:22 +0000 (10:14 -0800)]
Move dumpstate to calling getprop.
There's no obvious reason for reinventing the wheel like this (given that
dumpstate already spends most of its time calling out to other utilities),
and I keep having to come and fix this code.
(This time the problem being that there's no longer a limit on system
property names.)
Bug: http://b/
33926793
Test: ran dumpstate
Merged-In: I08281680df5aabfdb39228abf8c2aab089cc8b9e
Change-Id: I08281680df5aabfdb39228abf8c2aab089cc8b9e
Treehugger Robot [Wed, 1 Mar 2017 06:05:13 +0000 (06:05 +0000)]
Merge "lshal --vintf to create a skeleton hal manifest."
Yifan Hong [Wed, 1 Mar 2017 03:38:24 +0000 (19:38 -0800)]
lshal --vintf to create a skeleton hal manifest.
Run it as follows:
lshal --init-vintf=/data/a.xml
lshal --init-vintf > /data/a.xml
Test: lshal --init-vintf with and without path argument
Bug:
35852743
Change-Id: Ief9385fc2764a487d1a70644699e01133bdc8a8e
Treehugger Robot [Wed, 1 Mar 2017 03:50:11 +0000 (03:50 +0000)]
Merge "lshal: separate timeout for hwservicemanager list"
Steven Moreland [Wed, 1 Mar 2017 01:52:58 +0000 (17:52 -0800)]
lshal: separate timeout for hwservicemanager list
Bug:
35752836
Test: lshal works
Change-Id: I201da49e375d2d5e9ea67dfdf34ef2d5a8b537b0
Martijn Coenen [Tue, 28 Feb 2017 09:08:33 +0000 (09:08 +0000)]
Merge "Truncate trace output files."
Jesse Hall [Sun, 26 Feb 2017 05:54:04 +0000 (05:54 +0000)]
Merge changes I6437dc95,I77261381
* changes:
vulkan: update Vulkan headers to 1.0.38
vulkan: Update Vulkan headers to 1.0.22
Jesse Hall [Fri, 24 Feb 2017 23:13:45 +0000 (15:13 -0800)]
vulkan: update Vulkan headers to 1.0.38
Test: make ; mmm frameworks/native/vulkan
Change-Id: I6437dc951bd694cb848f75d0de7eb7dbe8a4d1fe
Jesse Hall [Tue, 26 Jul 2016 22:20:40 +0000 (15:20 -0700)]
vulkan: Update Vulkan headers to 1.0.22
Meaningful changes to platform code:
* VKAPI_ATTR is now defined properly when building for 32-bit ARMv8a.
* The pData parameter to vkCmdUpdateBuffer changed from uint32_t* to
void*. Alignment is still required to be four bytes (by spec), and
the size parameter was always supposed to be bytes, not words.
Bug:
29460769
Test: make ; mmm frameworks/native/vulkan
Change-Id: I77261381e5702a3b2bc1d1ea4c0606151547be47
(cherry picked from commit
56d386a7a46c8ac36df8820c3ccf3da048ef1970)
Yifan Hong [Wed, 22 Feb 2017 18:28:23 +0000 (18:28 +0000)]
Merge "lshal: Fix timeout causes unexpected exits."
Martijn Coenen [Wed, 22 Feb 2017 08:25:31 +0000 (09:25 +0100)]
Truncate trace output files.
To avoid creating trace files with garbage at the end.
Bug:
35588070
Test: atrace runs
Change-Id: I26ef4c652ca2e2dd8ff9d11d4f380b44791cb960
Yifan Hong [Tue, 21 Feb 2017 22:59:00 +0000 (14:59 -0800)]
lshal: Fix timeout causes unexpected exits.
with thread::detach the background thread keeps running even after
the thread object is destroyed; the background thread will access
caller's stack memory, causing segfault. Change it to a thread join
to avoid the issue. To avoid waiting too long on the child thread,
send a SIGINT if timeout (child thread's signal handler will then
call pthread_exit() to terminate the thread).
Since we are using pthread_* functions, change usage of std::thread
to pthread_t for consistency.
Test: lshal
Test: run lshal with IPC_CALL_TIMEOUT set to zero will no longer
cause SIGSEGV and SIGABRT (test 10 times)
Bug:
35623669
Change-Id: I4eef8ffd8ff399793648e861ca4c1a2bdcc7ec50
Isaac Chen [Tue, 21 Feb 2017 02:05:22 +0000 (02:05 +0000)]
Merge "Removed build time variable ENABLE_CPUSETS."
Isaac Chen [Thu, 16 Feb 2017 03:51:51 +0000 (11:51 +0800)]
Removed build time variable ENABLE_CPUSETS.
Use runtime check, cpuset_enabled(), instead of build time varianble
usually set in BoardConfog.mk.
Bug:
34726944
Test: Tested on Sailfish
without cpuset mounted
with cpuset mounted, but without schedtune
with cpuset mounted and with schedtune
Change-Id: I00153628db62abfbaa0ba75d571ba1bda0611ff3
Treehugger Robot [Sat, 18 Feb 2017 01:03:15 +0000 (01:03 +0000)]
Merge "Fix lshal cannot be run without root"
Yifan Hong [Fri, 17 Feb 2017 21:38:47 +0000 (13:38 -0800)]
Fix lshal cannot be run without root
Root cause is invoking copy constructor on a Return<T> object
implicitly, while the old object contains a failed status and
gets destroyed. Use the move constructor instead to fix this.
Test: adb unroot && adb shell lshal
Change-Id: I44710166cc5d7da30bf54b10d1860be1b91dc98a
Treehugger Robot [Fri, 17 Feb 2017 18:38:53 +0000 (18:38 +0000)]
Merge "atrace: Don't output service lookup/notification errors."
Martijn Coenen [Fri, 17 Feb 2017 13:57:38 +0000 (14:57 +0100)]
atrace: Don't output service lookup/notification errors.
Bug:
34933232
Test: android.atrace.cts.AtraceHostTests
Change-Id: If981106fb1bf7db24b9fd173c6936a1e189756f0
Yifan Hong [Thu, 16 Feb 2017 18:02:51 +0000 (18:02 +0000)]
Merge changes from topic 'lshal'
* changes:
lshal: Add option to print cmd lines instead of pids.
lshal: Add timeout for IPC calls.
lshal: Allow selecting columns and sorting by column.
lshal: Refactor lshal to use an Lshal class; combined instance column with interface column
Yifan Hong [Wed, 15 Feb 2017 01:33:50 +0000 (17:33 -0800)]
lshal: Add option to print cmd lines instead of pids.
Add -m to arguments of lshal. When this flag is set,
/proc/{pid}/cmdline is printed instead of a plain PID.
If the file doesn't exist, it will be striped out from
the PID column as well (the process is considered died
and won't hold a reference to the binder object.)
Test: lshal -icm
Bug:
35160832
Change-Id: I4345bf06112a1f87ce91bec6f6f787703e46cd17
Yifan Hong [Tue, 14 Feb 2017 23:43:31 +0000 (15:43 -0800)]
lshal: Add timeout for IPC calls.
IPC calls into interfaces should be done fault-torelently.
Add a timeout for each IPC call made so that lshal won't be
indefinitely blocked even if the interface don't reply
promptly.
Bug:
35317039
Test: lshal
Change-Id: Icb8157716ad68bddb5b33304b9063aa6f233985d
Yifan Hong [Tue, 14 Feb 2017 01:51:59 +0000 (17:51 -0800)]
lshal: Allow selecting columns and sorting by column.
Examples: see tests below.
Test: lshal
Test: lshal -intpac
Test: lshal --sort=i
Test: lshal --sort=p
Bug:
34984175
Change-Id: Ia09823776a206868a5d58a2ede153a4538147756
Yifan Hong [Sat, 11 Feb 2017 01:49:58 +0000 (17:49 -0800)]
lshal: Refactor lshal to use an Lshal class; combined instance column with interface column
We need to be able to select columns, sort columns,
and do IPC calls fault-tolerently.
Refactoring lshal.cpp into an Lshal class for more
objective-oriented programming, so that global variables
can be avoided and less parameters will need
to be passed around.
Test: lshal outputs identical output as without this CL, except
with the column merged.
Change-Id: I9668c998da692222aef96ae67bbab8066172543d
Treehugger Robot [Tue, 14 Feb 2017 03:44:52 +0000 (03:44 +0000)]
Merge "Revert "dumpsys: add option to list hardware services.""
Steven Moreland [Mon, 13 Feb 2017 23:44:17 +0000 (23:44 +0000)]
Revert "dumpsys: add option to list hardware services."
This reverts commit
6270dd1bf7f4a6eaa0e36b2cbb0f9bdd4790b5d8.
Reason for revert: obsolete, removed in favor of lshal
Test: dumpsys_test
Change-Id: I06e256a5bd0995727a3d6f3f88f79a623b1474f3
Yifan Hong [Mon, 13 Feb 2017 19:32:37 +0000 (19:32 +0000)]
Merge changes from topic 'lshal'
* changes:
Dump client PIDs for passthrough HALs.
Fix permissions for lshal
Yifan Hong [Fri, 3 Feb 2017 23:23:47 +0000 (15:23 -0800)]
Dump client PIDs for passthrough HALs.
* This is done with registerPassthroughClient in IServiceManager; when a
service is retrieved through the passthrough service manager, its PID
will be recoreded by the binderized service manager.
* The action of dumping all available dynamic libraries is now done by
dumpAllLibraries.
Bug:
34712252
Test: lshal
Change-Id: I7f08e3255ffed0f46435843504e0e225d0d9bbc9
Yifan Hong [Fri, 3 Feb 2017 21:40:04 +0000 (13:40 -0800)]
Fix permissions for lshal
Instead of IServiceManager::debugDump, lshal now relies
on list and get. lshal itself will call getDebugInfo
on each interface, so that each interface can check if
the call is from a root user, then decide to leak
addresses or not.
Bug:
34899586
Test: lshal
Change-Id: I8eb9168c3b071b8b1f27dbeaa0ac27d2067200d7
quddusc [Thu, 9 Feb 2017 21:26:19 +0000 (21:26 +0000)]
Merge "NDK docs: Fixed in-line comments for A8 and ARGB444 bitmap configurations. Test: Verified changes with romainguy@. Related bugs: b/
26922523"
Quddus Chong [Wed, 8 Feb 2017 18:38:21 +0000 (10:38 -0800)]
NDK docs: Fixed in-line comments for A8 and ARGB444 bitmap configurations.
Test: Verified changes with romainguy@.
Related bugs: b/
26922523
Change-Id: Id51445b09896407e808b519f3ee2f4be90f5b7eb
wyau [Tue, 7 Feb 2017 04:07:15 +0000 (04:07 +0000)]
Merge "SurfaceFlinger supports ClearClientTarget for Sideband"
Gray Huang [Wed, 11 Jan 2017 05:41:09 +0000 (13:41 +0800)]
SurfaceFlinger supports ClearClientTarget for Sideband
When clearing the layer's intersection with the dirty region,
HWC2::Composition::Sideband layer needs to be cleared as well.
Bug:
33443134
Test: manual - enter PIP mode with Live Channel
Change-Id: I4fecc7b5db8a2bf220b681bd087264290d1a2443
Treehugger Robot [Fri, 3 Feb 2017 02:39:19 +0000 (02:39 +0000)]
Merge "Fix warning: macro redefined"
Treehugger Robot [Thu, 2 Feb 2017 19:32:48 +0000 (19:32 +0000)]
Merge "lshal: print pids of client processes."
Yifan Hong [Wed, 1 Feb 2017 23:54:01 +0000 (15:54 -0800)]
lshal: print pids of client processes.
Bug:
34777099
Bug:
34861460
Test: lshal
Test: NFC / light / audio with and without persistent.hal.binderized;
run lshal to reflect this.
Change-Id: I50aa5d99fb14957b1e40a405836e68c235a22006
Treehugger Robot [Wed, 1 Feb 2017 21:15:42 +0000 (21:15 +0000)]
Merge "Do not -1 for lshal."
Evgenii Stepanov [Wed, 1 Feb 2017 19:24:10 +0000 (19:24 +0000)]
Merge "Disable integer sanitization on host."
Treehugger Robot [Wed, 1 Feb 2017 07:09:50 +0000 (07:09 +0000)]
Merge "Fix a use-of-uninitialized-value warning"
Yifan Hong [Tue, 31 Jan 2017 23:54:39 +0000 (15:54 -0800)]
Do not -1 for lshal.
Test: compiles
Change-Id: I99e6306a6b82ec85bc84f9572f3e4f2f8cdf2847
Treehugger Robot [Wed, 1 Feb 2017 03:14:59 +0000 (03:14 +0000)]
Merge "Fix -Wdouble-promotion warnings"
Evgenii Stepanov [Wed, 1 Feb 2017 00:37:44 +0000 (16:37 -0800)]
Disable integer sanitization on host.
Test: NFC until https://android-review.googlesource.com/#/c/329510
Change-Id: I0183556d5b945c689934664fe7f15caa18a0997d
George Burgess IV [Wed, 1 Feb 2017 00:21:25 +0000 (16:21 -0800)]
Fix a use-of-uninitialized-value warning
Caught by clang's static analyzer:
frameworks/base/core/jni/com_google_android_gles_jni_GLImpl.cpp:190:30:
warning: The right operand of '+' is a garbage value
buf = (char*)buf + offset;
This is because getPointer doesn't always set `offset` to a value. We
could fix it locally by initializing `offset`, but it seems to be less
error-prone to just fix getPointer instead.
Bug: None
Test: Still builds; warning is now gone.
Change-Id: I90bea0c94cf8d7f92a0d9a4db4e64e7e563bfb09
Treehugger Robot [Tue, 31 Jan 2017 03:29:05 +0000 (03:29 +0000)]
Merge "Add permission bits to open calls with O_CREAT"
George Burgess IV [Wed, 25 Jan 2017 19:36:12 +0000 (11:36 -0800)]
Add permission bits to open calls with O_CREAT
Open needs a third argument if you pass it O_CREAT:
https://linux.die.net/man/3/open
This turns into a compile-time error with FORITFY, so we need this fixed
before our unbroken FORTIFY can go in.
(The TEMP_FAILURE_RETRY open isn't detected by clang FORTIFY, but I
noticed that open_reference_profile potentially passes in O_CREAT as an
open_flag.)
Bug:
32073964
Test: Now builds with clang FORTIFY; CtsCompilationTestCases passes;
manually verified that /data/misc/profiles/ref/*/primary.prof has rw
permissions after a successful `cmd package compile -m speed-profile`.
Change-Id: Ie707d5ad403d2f86c769277b3e0f147c45000a6b
Treehugger Robot [Thu, 26 Jan 2017 20:06:50 +0000 (20:06 +0000)]
Merge "Replace strlen with arraysize in array bounds."
George Burgess IV [Wed, 25 Jan 2017 21:33:38 +0000 (13:33 -0800)]
Fix -Wdouble-promotion warnings
With the new clang FORTIFY, this code emits the following error:
error: implicit conversion increases floating-point precision: 'float'
to 'double' [-Werror,-Wdouble-promotion]
This is because strncpy is now a function, not a macro defined in a
system header. So, the warning is considered to appear in user code
(instead of system code), and is therefore no longer suppressed.
Bug:
32073964
Test: Now builds with clang FORTIFY
Change-Id: Id5fcfe91755535f90b542e11bc42b66976fe24fc
Merged-In: I5e8292d7800434268793bc4db4a96f20b7022e17
George Burgess IV [Wed, 25 Jan 2017 19:52:01 +0000 (11:52 -0800)]
Replace strlen with arraysize in array bounds.
clang-FORTIFY doesn't let us evaluate strlen("foo") as a constant
expression that can be used in static array bounds. Instead, we'd need
to either do __builtin_strlen("foo") or arraysize("foo") - 1. Just use
arraysize here, since the extra 1 byte per array isn't likely to be a
terrible thing.
Happy to swap to __builtin_strlen if anyone cares deeply enough.
Bug:
32073964
Test: Now builds with clang FORTIFY.
Change-Id: I4c9b3eb74775901554b939246722bd3a22326d10
Yifan Hong [Thu, 26 Jan 2017 18:18:19 +0000 (18:18 +0000)]
Merge changes from topic 'lshal'
* changes:
Add debugDump() to IServiceManager.
Add an lshal command.
Treehugger Robot [Thu, 26 Jan 2017 17:37:23 +0000 (17:37 +0000)]
Merge "Fix two bugs in external storage accounting."
Yifan Hong [Thu, 26 Jan 2017 06:53:37 +0000 (22:53 -0800)]
Add debugDump() to IServiceManager.
Test: mma
Change-Id: I04289500c7ee42a84d3593b4c0e45a0b829370a7
Yifan Hong [Wed, 25 Jan 2017 22:20:34 +0000 (14:20 -0800)]
Add an lshal command.
lshal lists services registered to the binderized
IServiceManager and all services available to the
passthrough IServiceManager as *.so libraries. It
also dumps the reference count for each service.
Bug:
34712252
Test: adb shell lshal
Change-Id: I9436a033cf736b8a8c307a2e87549c9db6379f3f
Jeff Sharkey [Thu, 26 Jan 2017 05:15:42 +0000 (22:15 -0700)]
Fix two bugs in external storage accounting.
When doing a manual tree walk, we always want to inherit fts_number
from the parent fts node.
For create_data_media_package_path(), two of the arguments had been
swapped.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug:
27948817,
30927649
Change-Id: Ic3cbf387cf119aa82af6e380bde9d9b069f6bfb0
Treehugger Robot [Thu, 26 Jan 2017 01:25:52 +0000 (01:25 +0000)]
Merge "Add mode to open call with O_CREAT"
George Burgess IV [Wed, 25 Jan 2017 21:51:53 +0000 (13:51 -0800)]
Add mode to open call with O_CREAT
This change was already applied internally. For us to submit FORTIFY, we
need to push it out here. Otherwise, we get compile-time errors about
this.
Bug:
32073964
Test: Builds with FORTIFY.
Change-Id: Ib500aca933468c06f7ceb796a9bb6a16c118e366
Merged-In: I63eb3d5499ae7e9ff9a77393763e39b747fd4611
Treehugger Robot [Tue, 24 Jan 2017 01:15:06 +0000 (01:15 +0000)]
Merge "Properly align a packed structure."
Treehugger Robot [Mon, 23 Jan 2017 18:20:51 +0000 (18:20 +0000)]
Merge "Update atrace to work with tracefs, not debugfs"
Treehugger Robot [Sat, 21 Jan 2017 21:11:50 +0000 (21:11 +0000)]
Merge "dumpsys: add option to list hardware services."
Steven Moreland [Fri, 20 Jan 2017 23:24:51 +0000 (15:24 -0800)]
dumpsys: add option to list hardware services.
This gives a convenient way to dump information about hidl services.
When hidl services dump information themselves as well, that dump will
be made here as well.
Bug:
33382892
Test: dumpsys_test, dumpsys --hw works as expected
Change-Id: Ib08b5d052e63ed6260035ee8d3ad3dac296202b1
Paul Lawrence [Tue, 17 Jan 2017 17:50:18 +0000 (09:50 -0800)]
Update atrace to work with tracefs, not debugfs
When tracefs is mounted, tracing is under /sys/kernel/tracing not
/sys/kernel/debug/tracing. Modify atrace to detect this situation and
get the right files.
Bug:
31856701
Test: Run atrace, check output is same where ever tracefs is mounted
Change-Id: I78df0da91d9f56c56077d1b8b9dba7b0126b2d8d
Jeff Sharkey [Fri, 20 Jan 2017 22:45:03 +0000 (22:45 +0000)]
Merge "Add Binder support for Parcelable exceptions."
Treehugger Robot [Fri, 20 Jan 2017 20:07:13 +0000 (20:07 +0000)]
Merge "Add i2c tracing support to atrace"
Treehugger Robot [Fri, 20 Jan 2017 19:55:15 +0000 (19:55 +0000)]
Merge "Add feature flag for TelephonyManager#get/setAllowedCarriers"
Michael Wright [Thu, 18 Aug 2016 18:56:43 +0000 (19:56 +0100)]
Add i2c tracing support to atrace
Cherry-picking from internal master
Test: None
Change-Id: Iaf0daa0982bd8d2355d3590d43ad78711e764ee0
Jeff Sharkey [Thu, 19 Jan 2017 22:00:50 +0000 (22:00 +0000)]
Merge "Measure external storage using new GIDs."
Jeff Sharkey [Thu, 19 Jan 2017 16:21:36 +0000 (09:21 -0700)]
Measure external storage using new GIDs.
We just defined a new range of GIDs that will be used to mark per-app
data files stored on external storage, so start measuring them.
Also measure all OBB files using another new GID that was defined.
Note that we're relying on the per-app cache GIDs to track cache
usage on *both* internal and external storage, which means that stats
and extStats won't always add up. (The framework already combines
these values together, and we didn't want to waste precious GID
space on explicitly tracking cache files on external storage.)
Test: builds, boots
Bug:
27948817,
34263266
Change-Id: Ife087df299ff8ee1a75fce1e39b4b737cf9375d5
Jeff Sharkey [Thu, 19 Jan 2017 16:16:02 +0000 (16:16 +0000)]
Merge "First pass at updated cache clearing logic."
Peng Xu [Thu, 19 Jan 2017 01:11:49 +0000 (01:11 +0000)]
Merge "TYPE_DYNAMIC_SENSOR_META should be wake up sensor"
Calin Juravle [Wed, 18 Jan 2017 23:49:13 +0000 (23:49 +0000)]
Merge "Clean up and simplify the logic in dexopt"
Josh Gao [Wed, 18 Jan 2017 23:04:08 +0000 (23:04 +0000)]
Merge changes from topic 'kill_debuggerd'
* changes:
dumpstate: use O_APPEND for anr file.
dumpstate: switch to using libdebuggerd_client.
Treehugger Robot [Wed, 18 Jan 2017 23:00:41 +0000 (23:00 +0000)]
Merge "libGLES_android: Add generic 32bpp BGRA EGLConfig"
Calin Juravle [Sun, 15 Jan 2017 00:23:30 +0000 (16:23 -0800)]
Clean up and simplify the logic in dexopt
Make some order in dexopt logic by extracting independent parts in their
own helpers.
It will make further updates of dexopt simpler and easier to reason
about (e.g. for secondary dex files).
Test: device boots
adb shell cmd package compile -m speed|speed-profile packageName
install new packages
Bug:
32871170
(cherry picked from commit
4a391f80601d7f65d7e63353363e6d32868161d5)
Change-Id: If0c96174e904519a4332e54553690b691ff63149
Jeff Sharkey [Wed, 18 Jan 2017 01:05:54 +0000 (18:05 -0700)]
First pass at updated cache clearing logic.
The old clearing algorithm is very naive and it sorts all cached files
globally by modified time. This sadly lets apps gamify the system by
setting their modified times far in the future, and it's very
expensive because it requires a global filesystem traversal to free
up even the smallest amount of data.
Instead, this CL introduces a much more fair cache clearing algorithm
that deletes files from specific UIDs based on how much cache space
that UID is using proportional to the space allocated to them. This
new design has several nice properties:
-- It uses the recently added quotactl() feature to rapidly target
the apps that are using the most space.
-- We only need to traverse the filesystem for UIDs that actively
enter the crosshairs of the clearing algorithm.
-- Disciplined apps who stay under their allocated quota will be
the last to have their cached data cleared.
-- This design can be easily adapted to support additional features
such as atomic purging and tombstones.
In summary, the new algorithm is extremely efficient when freeing up
the typical small-to-medium amounts of disk space, and is only
moderately less efficient than the old algorithm when forced to clear
all cached data.
Test: builds, boots, clearing strategy looks sane
Bug:
33965858
Change-Id: I66f95089cb33f1add3f31fcf1082ab2469870fda
Polina Bondarenko [Thu, 12 Jan 2017 20:14:14 +0000 (21:14 +0100)]
Add feature flag for TelephonyManager#get/setAllowedCarriers
Add android.hardware.telephony.carrierlock feature flag declaration.
Bug:
33480084
Test: cts
Change-Id: Ib6ede97d7ee8d6e924c1483ee51f52bdfa09950b
Jeff Sharkey [Wed, 18 Jan 2017 01:10:59 +0000 (01:10 +0000)]
Merge "Add systrace details to storage measurements."
Treehugger Robot [Wed, 18 Jan 2017 00:36:55 +0000 (00:36 +0000)]
Merge "servicemanager: selinux: set selinux callbacks early"
Jeff Sharkey [Tue, 17 Jan 2017 22:25:01 +0000 (15:25 -0700)]
Add systrace details to storage measurements.
Can be used to find bottlenecks, and confirm that quota stuff is
being used when expected.
Test: builds, boots
Bug:
34341727
Change-Id: Ifefc155e5d3b0c74245e0d287e84df699ce09d16
Josh Gao [Sat, 14 Jan 2017 06:09:40 +0000 (22:09 -0800)]
dumpstate: use O_APPEND for anr file.
Bug: http://b/
30705528
Test: ran dumpstate, grepped dmesg for new selinux denials
Change-Id: I28814edcf37a7edbde79279feff0e7def64316f2
Josh Gao [Fri, 6 Jan 2017 02:27:33 +0000 (18:27 -0800)]
dumpstate: switch to using libdebuggerd_client.
Bug: http://b/
30705528
Test: manual inspection of dumpstate output
Change-Id: I8f9822f67f1a81fcfa2b3a9120e6631b19b29854
Jeff Sharkey [Tue, 17 Jan 2017 20:53:04 +0000 (13:53 -0700)]
Add Binder support for Parcelable exceptions.
Follow the new framework changes that support sending EX_PARCELABLE
exception types.
Test: builds, boots
Bug:
33749182
Change-Id: I7a856fa89f23aab4f782c4e5ae2beb8166fa8da4
Jeff Sharkey [Tue, 17 Jan 2017 16:54:00 +0000 (16:54 +0000)]
Merge "Handle devices without quota, speed up lookup."
Sandeep Patil [Tue, 27 Dec 2016 20:40:45 +0000 (12:40 -0800)]
servicemanager: selinux: set selinux callbacks early
SELinux library error logs are never be shown in logcat if
there's a failure before the callbacks are set. We missed
all logs from service context initialization because of this.
Bug:
33746484
Test: Restart new service manager to make sure context init logs
show up in logcat.
Change-Id: I5479cf5fe10ceb1a210eda26946b6ea344792e24
Signed-off-by: Sandeep Patil <sspatil@google.com>
Treehugger Robot [Tue, 17 Jan 2017 04:02:45 +0000 (04:02 +0000)]
Merge changes Ic746ea89,Iebaa8063
* changes:
Wrap all installd operations in lock.
Mask st_mode before comparing it.
Jeff Sharkey [Tue, 17 Jan 2017 03:57:45 +0000 (20:57 -0700)]
Handle devices without quota, speed up lookup.
Start tracking which block devices have quota support, and gracefully
clear FLAG_USE_QUOTA when no support is present.
Also build a cached map of mounted volumes that support quota, which
halves the average quota calculation speed from 0.70ms to 0.35ms,
since we're no longer parsing procfs every time.
Test: builds, boots, common operations work
Bug:
34249218
Change-Id: Ie791df7801b67495331f3eea256c018860c9b4f6